Variable width menu titles


Questions, Explanations, Howtos

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Friday, 23rd August 2013, 17:52

Variable width menu titles

So I'm working on a new feature for the search menu, and it involves adding another toggle to the top of the results screen. This isn't a problem if you're using a nice, roomy tiles window, but for standard size consoles, things get cut off. I can chop and squeeze and abbreviate to fit things on a console screen, but I though it would be nice if the code were smart enough to make use of larger window sizes when available.

To that end, is anyone aware of any menus in crawl that already do something like this, so I can see how it was implemented?

Ziggurat Zagger

Posts: 6454

Joined: Tuesday, 30th October 2012, 19:06

Post Friday, 23rd August 2013, 20:10

Re: Variable width menu titles

The inventory menu seems to be aware and make use of wider console windows, although I'm not sure if that's what you're looking for.
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of $9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Monday, 26th August 2013, 18:32

Re: Variable width menu titles

Decided to just wing it. Here are two patches that add a toggle to the stash search results menu allowing you to filter out useless items by pressing '='. The first patch cuts down the menu title to fit in the help text and status for the new toggle, and the second patch adds back some of what was cut if the window is big enough.

Return to Coding

Who is online

Users browsing this forum: No registered users and 13 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.