lua gui removecmds

lua gui removecmds

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
monohouse

lua gui removecmds

Post by monohouse »

I have used removecmds to remove commands from the menu, but it also removes the keyboard key with it, I want to remove the command(s) from the menu ONLY but leave the associated command key working, how do I do it ?

also, how to remove the background colors of the menus like in http://www.unknown-files.net/index.php? ... &dlid=2130 ?
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

You should really wait until trepan does his stuff..

But the transperency is done with:

Code: Select all

for i = 1,8 do
  Spring.SendCommands({"decguiopacity"})
end
(from Rays file)

and to remove commands you probably can compare the ID with the constants and just don't display it.. should make some work though..

but I will look into it when I start my work..
monohouse

Post by monohouse »

how do you "don't display it" ? you mean removecmds ? or something else ?
removecmds does not work well it removes the keyboard key associated with the commands as well.
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

Nah, I mean don't display it :P..

If you start with an empty function in the gui.lua, no commands are displayed.. You have to implement stuff so that they are visible.. But it's not that easy to just leave out some commands I think..

I'm to tired to think about it right now but I will get started with GUI stuff when the next version comes..
monohouse

Post by monohouse »

aha now I see......it removes EVERYTHING the entire command menu, actually I wanted to remove only the commands as in stop, attack, patrol....etc... not the build menu icons, only the commands in it, and I would like to remove them without removing their associated keyboard buttons, are you saying that the only way to do it is to re-write the entire menu ?

you can look at my config :
http://newmanoa.ath.cx/ctrlpanel.txt and http://newmanoa.ath.cx/gui.lua it is not a must to use both, the lua does not have any includes, recommend using without the lua as there is nothing special about it
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

well yes, I think you have to implement the function from scratch..

but if you don't want that just wait for the next version..
monohouse

Post by monohouse »

you're sayin that in the next version it will be possible to remove the commands from the menu without removing the keyboard keys ?
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

no :-)

what I'm saying is: I will probably try it but I won't begin before the next release :-)

I'm currently trying to compile the current svn version so I can start now.. But I'm having some difficulties..
monohouse

Post by monohouse »

im also having difficulties to compile, but not the svn version, the 0.74b2 version
Post Reply

Return to “Lua Scripts”