I cannot recall the commands and one of you might remember them.
I need to hide the line it draws from a unit to the command location..
as in that dotted line.
I need to remove the little green selection box on the units
I need to hide the buildbar/commandbar whatever you call it.
Hide the command line, selection box and command menu
Moderator: Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Hide the command line, selection box and command menu
I don't know of a simple way to do those things.
Here is a hacky way to remove unit boxes. I'm not saying this is the only solution but it is a solution. It is used in the 5 unit selection visualisation widgets that are in ZK so it may be the only solution. You could use this method to edit Command Queue Rendering as well such that all commands draw as fully transparent.
In case you aren't aware here is a list of undocumented UI commands. Of course the wiki may be out of date. That should have the command to disable the build menu, maybe it's 'ctrlpanel'?
Here is a hacky way to remove unit boxes. I'm not saying this is the only solution but it is a solution. It is used in the 5 unit selection visualisation widgets that are in ZK so it may be the only solution. You could use this method to edit Command Queue Rendering as well such that all commands draw as fully transparent.
In case you aren't aware here is a list of undocumented UI commands. Of course the wiki may be out of date. That should have the command to disable the build menu, maybe it's 'ctrlpanel'?
Re: Hide the command line, selection box and command menu
In cmdcolors.txt have alwaysDrawQueue 0smoth wrote:I need to hide the line it draws from a unit to the command location..
smoth wrote:I need to remove the little green selection box on the units
Code: Select all
local function SetupCommandColors(state)
local alpha = state and 1 or 0
local f = io.open('cmdcolors.tmp', 'w+')
if (f) then
f:write('unitBox 0 1 0 ' .. alpha)
f:close()
spSendCommands({'cmdcolors cmdcolors.tmp'})
end
os.remove('cmdcolors.tmp')
end
Spring.SendCommands({"ctrlpanel LuaUI/Widgets/YourOwnCtrlPanel.txt"})-- With xPos or yPos out of screen thereI need to hide the buildbar/commandbar whatever you call it.
None of my three answers are pretty so now Smoth will raeg all over the place about how angry it makes him to have his topics desacrated by unwanted solutions.
Re: Hide the command line, selection box and command menu
I don't know what I'm talking about but commenting in a "maybe I'll inspire someone who does to think of a solution" capacity:
If the functions to draw those things are Lua couldn't you just make your own versions of those functions that didn't draw them, overriding the default behaviour?
If not, consider this a request to investigate moving said features from engine core to Lua.
If the functions to draw those things are Lua couldn't you just make your own versions of those functions that didn't draw them, overriding the default behaviour?
If not, consider this a request to investigate moving said features from engine core to Lua.
Re: Hide the command line, selection box and command menu
You could do it the crazy route and disable selections, merely passing the few commands you want to let the player use through a gadget. I think that's how Air Raid avoids all these issues.