 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:16
|
|
There's a special trigger construct:
#
There is also a special format for triggering by UI components:
Trigger 'name' on "UI Component Name" when (expression) {
commands
}
It behaves in the same way as the normal format, except that it is only evaluated when the UI component is used. The name follows the same rules as for message boxes.
The body of the trigger is executed only when the expression is true (not equal to 0).
#
For example:
code:
trigger 'NewTreatyData' on "DipWizard.Stage1.Tabs.Treaty.TabButton" when (1) {
message(g.player,'TreatyLength');
}
will send a message to the game player when he clicks on the 'Treaty' tab in the process of forming a new proposal. (It will ask him to set a length for the treaty.) But this is a bit awkward, it would be better to trigger the message when the game player clicks on the name of the actual treaty (which is some kind of list element). Does anyone know how to do this, or if it's possible? (I suppose these list elements might not count as UI componants.)
|
|
|  |
 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:16
|
|
In this case (and actually in lots of others) from Winnie's tut2_*** files. She had to deal with so many events that you can find tons of simple working examples there. I just came across this the other day, there's probably still lots of stuff to be excavated from those files.
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:16
|
|
Soon I guess, but I've got to finish off this NewDiplomod first. It's becoming a bit gargantuan.
And I may be away for a few days. I seem to have picked up some debilitating flu bug that makes it very difficult to stay awake.
|
|
|  |
 |
|  |
 |
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:16
|
|
quote: Originally posted by Martin Gühmann
Yes there is no DB that is called GoodsDB it is called or from the slic documentation it should be called ResourceDB. I found in the slic documentaion an example that mentioned the GoodDB instead of ResourceDB or GoodsDB. But I think ResourceDB is the entry that works, as I found it in the ctp2.exe.
|
Ah, thanks Martin, I was sure I'd see it used, but I couldn't find it anywhere. I'll try that again, it will save a lot of time if I can get it to work.
Big mc, sorry, I had no idea before, I think the UI file you are looking for is controlpanel.ldl. Search through it for FARM, or MINE or something, and try to make some sense of it. 
|
|
|  |
All times are GMT. The time now is 05:16. Apolyton Time is 00:16. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|