Does anyone have the slightest idea of how GUI stuff works? Because I can't seem to figure it out.
For example, in window_court.gui we have a button that ransoms the prisoner.
But I'll be damned if I know how: CharacterListItem.GetBool('can_ransom'), CharacterListItem.OnClick('ransom'), CharacterListItem.GetBool('can_ransom'), CharacterListItem.GetText('ransom_tooltip'). Other than in this file there is for example no file using the ransom_tooltip variable so how does it fill it with text? Same for how do you start to define a widget in a window in such a way that it can get can_ransom as a bool? Or where is the connection to an ransom event?
I've tried to help myself with the Imperator Wiki modding guide but even though I'm able to dump data types I have no idea how to implement them. And when you dump them there is no "ransom" or "ransom_tooltip" keyword to be found so I still don't know where it comes from.
P.S. is there a way to click on a window that is spawned with window_court.gui in GUI editor. Cause I can click on everything but the Court thingy.
Thanks for the answers.
For example, in window_court.gui we have a button that ransoms the prisoner.
Code:
button_round = {
name = "ransom"
enabled = "[CharacterListItem.GetBool('can_ransom')]"
button_prison_ransom = {
parentanchor = center
onclick = "[CharacterListItem.OnClick('ransom')]"
enabled = "[CharacterListItem.GetBool('can_ransom')]"
tooltip = "[CharacterListItem.GetText('ransom_tooltip')]"
using = tooltip_se
}
But I'll be damned if I know how: CharacterListItem.GetBool('can_ransom'), CharacterListItem.OnClick('ransom'), CharacterListItem.GetBool('can_ransom'), CharacterListItem.GetText('ransom_tooltip'). Other than in this file there is for example no file using the ransom_tooltip variable so how does it fill it with text? Same for how do you start to define a widget in a window in such a way that it can get can_ransom as a bool? Or where is the connection to an ransom event?
I've tried to help myself with the Imperator Wiki modding guide but even though I'm able to dump data types I have no idea how to implement them. And when you dump them there is no "ransom" or "ransom_tooltip" keyword to be found so I still don't know where it comes from.
P.S. is there a way to click on a window that is spawned with window_court.gui in GUI editor. Cause I can click on everything but the Court thingy.
Thanks for the answers.