News:

Want to praise Simutrans?
Your feedback is important for us ;D.

show blank menu

Started by Andarix, April 28, 2024, 11:09:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

r11146
QuoteFIX: hide wayremover, wayobjremover and signalremove icons when those ways are not available

Thank you for this fix.

Script tools also require this treatment.

prissi

If script tools had a function to query if they are active, then this would be possible as the opening of a menubar happens by tool execution and thus it would be safe to call a script to check the state. But I have never bothered with the scripting code beyond bug fixing so I have no idea how to actually implement this.

danivenk

Besides hiding it would also make it so that people might have a harder time realizing it even exists. Which I am not sure if hiding features is always a good thing, then again there is the balance between showing things and keeping things orderly.

Andarix

If it is not available, you could perhaps darken the button.

The problem is that such menus cannot be moved because they have no title to touch. And if they are opened above other menus, this is not always noticeable.

Andarix

Quote from: prissi on April 28, 2024, 12:28:24 PMIf script tools had a function to query if they are active, then this would be possible as the opening of a menubar happens by tool execution and thus it would be safe to call a script to check the state. But I have never bothered with the scripting code beyond bug fixing so I have no idea how to actually implement this.

Maybe a different approach.

If there is no way, make the menu button not clickable at all. So the menu doesn't even open.

Andarix

sorry, is not script tool

is tool WKZ_CLEAR_RESERVATION

prissi

That tool cannot know whether it is needed or not. I have removed it in pak64 from the waytype specific menues