Dom Pedro II
Modder For Life
Ok, I've been trying to figure this out on my own and I finally have to concede the point that I can't... so I'm hoping somebody here can explain it for me.
The best example of what I'm trying to understand is the commerce percent interface. I see in the python code where the it says to display the current values for the commerces and draw the buttons for increasing or decreasing those percentages. What I don't see is the code that tells the program that if the "decrease" button is clicked, then decrease the amount by the particular increment (which is set in the XML IIRC).
I ask because I've created some wonderful little functions in the SDK to change certain values for a new game feature but I have no idea how to connect it with the player input so that if I click this button in this screen it'll call that function and make that change to the value. Of course, I could work out some kind of way of doing this myself, but I certainly don't want to go about creating some redundant way of doing this if there's already a pre-existing way of doing it.
The best example of what I'm trying to understand is the commerce percent interface. I see in the python code where the it says to display the current values for the commerces and draw the buttons for increasing or decreasing those percentages. What I don't see is the code that tells the program that if the "decrease" button is clicked, then decrease the amount by the particular increment (which is set in the XML IIRC).
I ask because I've created some wonderful little functions in the SDK to change certain values for a new game feature but I have no idea how to connect it with the player input so that if I click this button in this screen it'll call that function and make that change to the value. Of course, I could work out some kind of way of doing this myself, but I certainly don't want to go about creating some redundant way of doing this if there's already a pre-existing way of doing it.