where can i find the worlbuilder screen in python

tesb

Emperor
Joined
Jan 16, 2010
Messages
1,593
Hi,

just a quick question, which python file draws the panels in the worlbuilder menus?

i could not find them.

many thanks in advance.
 
there is no such file (at least not in MoM).
if the file is not in the mod folder, i guess the game uses default bts file?
 
ok perhaps you help me further i was looking for the code that draws the menu on the edit: left, where you can choose units, buildings and so on.

Spoiler :
attachment.php


edit: i am just looking out for the background panels, not the unit buttons etc.
 

Attachments

  • worldbuilder.jpg
    worldbuilder.jpg
    131.1 KB · Views: 123
i found a line in CvWorldBuilderScreen.py that i think controls this:


self.m_tabCtrlEdit.addSectionDropdown("Current_Unit", strTest, "CvScreensInterface", "WorldBuilderHandleUnitEditPullDownCB", "UnitEditPullDown", 0, self.m_iCurrentUnit)

but where are those entries defined especially:
WorldBuilderHandleUnitEditPullDownCB

edit: i found those entries in CvScreensInterface, but there is no code that draws that panel just the call of an argument list
 
I think that panel is actually the "self.m_normalPlayerTabCtrl" panel, since that has 3 tabbs (units, buildings, adn technologies).

The panel would be set up in the "self.m_normalPlayerTabCtrl = getWBToolNormalPlayerTabCtrl()" call. Unfortunately this is not defined in Python anywhere. It is apparently done by the .exe witht he function being defined via the "CvPythonExtensions" import thing.

However, all the panels are defined via the theme. There is no WB specific stuff in the theme files, so figuring out which one it is using could be a tad time consuming. The basic panels and controls are mostly defined in Resource\Theme\Civ4\Civ4Theme_Custom.thm. The art that is used to show the panels and controls is in Resource\Civ4 (and sub-folders). Since Master of Mana already includes some interface adjustments, it has a full set of Resource files in the mod already.

Changing one panel theme, or the tab control theme, will naturally affect every panel/tab that uses the theme.
 
thank you letoII :D for your answer.
i wanted to simply draw the panes of main interfaces similar to the border of the panel in worldbuilder (see the screenshot above), but i have only found two panel styles in CvWorldBuilderScreen.py, with both being the wrong ones.

there are so many possibilities to improve the interface but getting behind, how the code works is really difficult for a beginner. for an example in the worldbuilder you can go in unit mode click on a unit and open the promotions tab, which is a scrollable list of promotions. such an implementation would be perfect for main screen for example to fix the issue that you can not look at the stats of a unit with too much promotions, i.e. instead of spreading all over the place the promotions would be a scrollable 'array' (like three promotions wide and scrollable in height if too many promotions are there to be displayed).
 
Back
Top Bottom