Page 1 of 1

Area Mex + IceUI howto make a button?

Posted: 27 Sep 2012, 14:40
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.

Re: Area Mex + IceUI howto make a button?

Posted: 27 Sep 2012, 16:52
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.

Re: Area Mex + IceUI howto make a button?

Posted: 28 Sep 2012, 01:45
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)

Re: Area Mex + IceUI howto make a button?

Posted: 28 Sep 2012, 07:34
by meme_1
Ah ok thanks, that helps me further on.
C.