Dancing Hoskuld
Deity
Assets/Python/Screens/CvMainInterface.pyAnyone know what the name of the interface is for the available building list at the bottom when a city is selected? Can't seem to find it anywhere! lol.
Assets/Python/Screens/CvMainInterface.pyAnyone know what the name of the interface is for the available building list at the bottom when a city is selected? Can't seem to find it anywhere! lol.
You might have to look for that in the python files. I have never been sure if it's the 'city bar' or if that refers to the city help popup.Anyone know what the name of the interface is for the available building list at the bottom when a city is selected? Can't seem to find it anywhere! lol.
There's a lot more than just that in this file though.Assets/Python/Screens/CvMainInterface.py
As far as I know all click events are handled by the exe and then passed to both the dll and the python.Yeah i looked in there previously, couldn't really find what i was looking for. Specifically looking for click event when you click on an available building and it gets added to queue. Ill take another look through.
Another question. Does the civ4 engine host the python environment? Or it it entirely contained in the .dll?
Which is another reason it should be split up.There's a lot more than just that in this file though.
I am not entirely sure. I may have the wrong end of the stick and it is the dll is the link between the Python and the exe. However the Python does call the exe directly as far as I can tell otherwise we would have some documentation about what the parameters meanDarn, was hoping the exe didn't touch the python at all.
Whats the extent that the exe sends stuff directly to python? Does python send anything back to exe?
Ah... you're looking for a spot in the code if you're talking specifically about the building lists. Take a look at CvBuildingFilters.cpp. You can probably find your way through to what it is you're looking for from a study there.Yeah i looked in there previously, couldn't really find what i was looking for. Specifically looking for click event when you click on an available building and it gets added to queue. Ill take another look through.
Those are in the various files in Python/EntryPoints, but as I mentioned they are not straight forward and we have the BUG layer in the mix as well.Yeah, doesn't seem like that particular click event is handled in the python side, at least, in that specific .py file.
That is caused by the fact that the entire city screen is redrawned by python every time you click something inside the city screen.Hmm, my first task i'm looking into is optimizing the time it takes to push buildings into the queue. When the available building list is large (which is very often in c2c), each click takes > 2 seconds to add building to queue.
I've followed the code up to the highest root i can find:
void CvNetPushOrder::Execute()
If i comment out all the code inside, the function speeds up a bit, but there still seems to be a significant lag. I don't know what else is being called when you click on a building. Maybe python side? Would appreciate some help![]()
I've seen one case... Don't remember exactly where or what.Hmm, Aren't there interface widgets controlled entirely by python? I suspect at the least, we could empty out the widget controlled by the exe and just create our own entirely.
Input is handled by the exe as far as I know, when a widget UI is clicked the exe will initiate the CvDLLWidgetData.cpp for the widget interaction, whether it does anything else is unknown as it is a black box.Heh, I tried commenting out all of doConstruct. There is still that significant lag when a building is clicked. Guess Ill keep investigating for now. Do you know where on the python side the click event is first generated?