Area Mex + IceUI howto make a button?

Area Mex + IceUI howto make a button?

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

Moderator: Moderators

Post Reply
meme_1
Posts: 20
Joined: 20 May 2012, 21:24

Area Mex + IceUI howto make a button?

Post by meme_1 »

Hi,

how can I change the code of AreaMex that there is a button in IceUI like UpgradeMex?
How can I assign a hotkey so that there is a AREA_MEX command send?
Can't figure out myself.
I'm just beginning to hate LUA which is incomprehensible, because of all the complex and hidden manipulation of the data structures. Argh. Can't it be c like??

Cheers,
C.
meme_1
Posts: 20
Joined: 20 May 2012, 21:24

Re: Area Mex + IceUI howto make a button?

Post by meme_1 »

Ok I give myself one answer. Write:

bind ctrl+w areamex

In the file uikeys.txt.

Where comes that "areamex" from? I would have guessed to write the defined value 10100 of the command starting the script together with the keybinding. I've read the script tutorial, and the wiki page and I must say it is not very consistent or easy to learn...

C.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Area Mex + IceUI howto make a button?

Post by knorke »

Such custom commands are added like this:
http://answers.springlobby.info/questio ... -of-a-unit
(afaik it is same whether gadget or widget)
Where comes that "areamex" from?
it is the
action entry in the table that declares the command.

How to add the button to IceUI I do not know. (that would be something specifique to IceUI and not general spring lua)
meme_1
Posts: 20
Joined: 20 May 2012, 21:24

Re: Area Mex + IceUI howto make a button?

Post by meme_1 »

Ah ok thanks, that helps me further on.
C.
Post Reply

Return to “Lua Scripts”