Just like there is /console 0, there should be a way to turn off build/ordermenu using a console command.
Also it should only disable the drawing of the buildmenu and not change anything about the icons.
Buildmenu on/off
Moderator: Moderators
Re: Buildmenu on/off
already possible to hide it -> redundant request
Re: Buildmenu on/off
It's already possible to do almost everything in lua -> almost everything is a redundant request?jK wrote:already possible to hide it -> redundant request
It is possible to disable the menu only in a silly hackish way. And every other default spring ui element has a console command to on/off.
Re: Buildmenu on/off
and your gui is completely ignoring that interface -> when you want to replace the buildmenu you have to touch that code no matter what, you just don't want to spend a minute on it -> your problem and not the one of the engine
Re: Buildmenu on/off
?????????????????jK wrote:and your gui is completely ignoring that interface -> when you want to replace the buildmenu you have to touch that code no matter what, you just don't want to spend a minute on it -> your problem and not the one of the engine
What the fuck are you talking about? What does having the ability to turn buildmenu on/off with a console command has to do with my UI?
I already managed to disable it in my UI and it works the way I want. I am requesting it because it is the only element in spring UI that can't be disabled ingame and that has to be hacked around.
Re: Buildmenu on/off
1. You can hide buildmenu items, or anything else you want, through Spring.EditUnitCmdDesc()
See P.U.R.E.'s source code (specifically, Tiercontrol.lua) for an example use case, specifically showing / hiding some icons like you want.
2. If you want to do anything fancier than hide it or disable it, then you need to sit down and alter Layout.lua and write a custom version.
See P.U.R.E.'s source code (specifically, Tiercontrol.lua) for an example use case, specifically showing / hiding some icons like you want.
2. If you want to do anything fancier than hide it or disable it, then you need to sit down and alter Layout.lua and write a custom version.
Re: Buildmenu on/off
How is that related to anything? I already said this is not about my UI or what I am doing in my UI, can you please get your head out of your ass.Argh wrote:1. You can hide buildmenu items, or anything else you want, through Spring.EditUnitCmdDesc()
See P.U.R.E.'s source code (specifically, Tiercontrol.lua) for an example use case, specifically showing / hiding some icons like you want.
2. If you want to do anything fancier than hide it or disable it, then you need to sit down and alter Layout.lua and write a custom version.
I said console command to hide ingame, just like you can hide any other thing.
Re: Buildmenu on/off
Showing other elements of your UI while F5 behavior is in effect is easy. Why do you want to just hide the buildmenu, and not the whole default UI?
Re: Buildmenu on/off
Why want to hide just the resource bars with /resbar 0, why just the info display with /info 0, why just the tooltip with /tooltip 0?Argh wrote:Showing other elements of your UI while F5 behavior is in effect is easy. Why do you want to just hide the buildmenu, and not the whole default UI?
Re: Buildmenu on/off
OK, so you just want to selectively drop the panel?
Here's a solution for you.
Spring.SendCommands({"ctrlpanel hidden_panel.txt"})
Where hidden_panel.txt:
It's not as perfect as turning it off at the engine would be, performance-wise, but it's certainly hidden at that point. I'm sure there are other ways to do it, but that's simple and easy, and can be done in a Widget.
To reverse it, just do the same command, using the current ctrlpanel.txt file, in case that wasn't obvious.
Here's a solution for you.
Spring.SendCommands({"ctrlpanel hidden_panel.txt"})
Where hidden_panel.txt:
Code: Select all
////////////////////////////////////////////////////////////////////////////////
//
// Spring Control Panel Configuration
//
outlinefont 1
// dropShadows 1
// useOptionLEDs 1
textureAlpha 1.0
frameAlpha 0.0 // use the GUI alpha if < 0.0
selectGaps 0
selectThrough 1
// newAttackMode 1 // enable attack by area selection
// attackRect 1 // use a rectangular selection
// invColorSelect 1 // use color inversion instead of tinting
frontByEnds 1 // use endpoints to create movement fronts
////////////////////////////////////////////////////////////////////////////////
//
// 5X5 specific placement
//
xIcons 5
yIcons 5
prevPageSlot auto
deadIconSlot auto
nextPageSlot auto
xIconSize 0.045
yIconSize 0.06
textBorder 0.0000
iconBorder 0.0000
frameBorder 0.0000
xPos 5.0
yPos 5.0
xSelectionPos 0.018
ySelectionPos 0.115
////////////////////////////////////////////////////////////////////////////////
To reverse it, just do the same command, using the current ctrlpanel.txt file, in case that wasn't obvious.