Adding new slider(tax slider)

gfurst

Warlord
Joined
Sep 4, 2010
Messages
202
Location
Beagá, MG, Brasil
Hey there, i was looking for some guidance, the thing is:
I'm implementing a tax percent modifier, my plan is to add one more ++/-- slider thingy along with all the other :science::culture::espionage:, while keeping them the same.
So I’m really lost on how to implement this on the interface, and how to make the interface interact with the DLL variables( just one actually).

I know this isn't a bug related question, but since you guys changed the the percent buttons i though you would have a better hang on this. Already saw some python functions that may be the issue here( also altered by BUG)( saw two to be exactly).

I will probably need help concerning the AI( you also seems to have a hang on it), but that is for later :)

If you wish, replies could be sent directly at the thread( links on my signature) although it make this new thread just a waste :p?

Well, whatever, hope anyone can help me! Thanks
 
I recommend starting a thread in the SDK/Python forum as you'll get the most modders to see it there. People coming to this forum typically have questions about playing with BUG. I haven't worked on the AI at all, but other modders certainly have. As for the buttons, I just merged in an existing modcomp. :)

Doing a search in CvMainInterface.py as I wrote in the other thread is still the way to go. You'll see everywhere they are referenced and might see how to create your own. As for making them do something, you typically do that with the handleInput() function. There are lots of examples of new buttons on all the screens.

If you do SDK/DLL modding you can create new WidgetTypes for them so you can get nice hovers (though BUG can give you hovers too) and handle the actions in the DLL. You'll need to do that to have the AI use the tax slider anyway, so I suppose you're already prepared for that eventuality.
 
Top Bottom