Hello, I have been trying to add a new button to the GUI of all production facilities. The button would allow you to upgrade the facility, much like warehouses and resident buildings upgrade. I would like to place this button next to the "call market cart/Instant pickup" button in the object menu. My reason for this placing it here is that the other instances of upgrade buttons throughout the game appear at the top of the menu, where the "cultivate" button appears on production facilities. I figure adding the button below, near the other functions wouldn't interfere with the cultivate function. So far I have added the following to patch0.rda\addondata\config\gui\menudefinitions\objectmenu_manufactory.dlg:
<BUTTON>
<PATHID>UPGRADE_FACTORY</PATHID>
<TEMPLATE_REF_ID>ROUND_MENU_BUTTON_SMALL</TEMPLATE_REF_ID>
<EXTENT>
<TOP>75</TOP>
<LEFT>17</LEFT>
<WIDTH>40</WIDTH>
<HEIGHT>40</HEIGHT>
</EXTENT>
<ICONGUID>7074</ICONGUID>
<EVENTHANDLER>
<UPGRADE_HOUSE/>
<EVENT>OnLeftClick</EVENT>
</EVENTHANDLER>
<ACCESSID>PRODUCTION_UPGRADE_FACTORY_BUTTON</ACCESSID>
<IS_DRAGGABLE>0</IS_DRAGGABLE>
<BACKGROUND>addondata/config/gui/backgrounds/final/general_buttons/35x35_circle.bkg</BACKGROUND>
<TOOLTIP>
<TEXT>10157526</TEXT>
</TOOLTIP>
<ZORDER>4</ZORDER>
<ICONSTRETCH>1</ICONSTRETCH>
<ICONSPACE>
<LEFT>4</LEFT>
<TOP>4</TOP>
</ICONSPACE>
<SOUNDGUIDCLICK>2809</SOUNDGUIDCLICK>
</BUTTON>
However the button will not appear in game. I searched through the other files in the gui directory for instances of the other buttons that appear on the menu, but it would appear that the objectmenu_manufactory.dlg is the only place where you can find the button definitions. Am I missing an obvious step? any help would be appreciated.
Edit: I should also mention that i have added the "upgradable" properties(including upgrade guid, etc) to the assets.xml entry, including the "Upgrade" function on the entry list of the asset's context menu.