12-12-2016, 09:47 PM
to make a toolbar:
if you want it to be on the main toolbar (like DSSV / NMT / Rowhouses etc), you will want to have code like this in your toolbar file (in the Apiary example it is the file example/building/Apiary.rsc):
this is the code from my DS Small Village:
Code:
// Main menu - this is the main menu button
Toolbar DSSVMenu
{
int _sortPriority = 297;
SpriteSheet _spriteSheet = "UI/DSSVSpriteSheet.rsc";
String _image = "DSSVMenu";
StringTable _stringTable = "UI/DSSVStringTable.rsc";
String _toolTip = "DSSVMenuTip";
Action _action = ShowGroup;
}
// Housing - this is the housing menu button second level of menu
Toolbar DSSVHousing: "DSSVMenu"
{
Toolbar _parent = "DSSmallVillage.rsc:DSSVMenu";
int _sortPriority = 100;
SpriteSheet _spriteSheet = "UI/DSSVSpriteSheet.rsc";
String _image = "DSSVHousing";
StringTable _stringTable = "UI/DSSVStringTable.rsc";
String _toolTip = "DSSVHousingTip";
Action _action = ShowGroup;
}
// House button - this is the button that selects a building.
Toolbar DSSVHouse2x2: "DSSVHousing"
{
Toolbar _parent = "DSSmallVillage.rsc:DSSVHousing";
int _sortPriority = 100;
Action _action = Tool;
ComponentDescription _tool = "Template/DSSVHouse2x2.rsc";
bool _autoHotKey = true;
}