The International Simutrans Forum

Development => Bug Reports => Known bugs and features => Topic started by: Andarix on April 28, 2024, 11:09:33 AM

Title: show blank menu
Post by: Andarix on April 28, 2024, 11:09:33 AM
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.
Title: Re: show blank menu
Post by: prissi on April 28, 2024, 12:28:24 PM
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.
Title: Re: show blank menu
Post by: danivenk on April 28, 2024, 11:20:16 PM
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.
Title: Re: show blank menu
Post by: Andarix on April 29, 2024, 07:23:26 AM
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.
Title: Re: show blank menu
Post by: Andarix on April 29, 2024, 08:59:30 AM
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.
Title: Re: show blank menu
Post by: Andarix on May 04, 2024, 08:34:22 AM
sorry, is not script tool

is tool WKZ_CLEAR_RESERVATION
Title: Re: show blank menu
Post by: prissi on May 04, 2024, 11:28:56 AM
That tool cannot know whether it is needed or not. I have removed it in pak64 from the waytype specific menues