private static void AddSaveButton(ArcenUI_ButtonSet elementAsType, SaveGameData saveGame, Vector2 offset) { //This adds a given save game bSaveGameButton newButtonController = new bSaveGameButton(saveGame); Vector2 size; size.x = elementAsType.ButtonWidth; size.y = elementAsType.ButtonHeight; elementAsType.AddButton(newButtonController, size, offset); }
private static void AddHeaderButton(ArcenUI_ButtonSet elementAsType, String Name, Vector2 offset) { /* This is for the campaign header */ bSaveGameButton newButtonController = new bSaveGameButton(Name); newButtonController.doNothing = true; //this is a button, but don't do anything when its pressed Vector2 size; size.x = elementAsType.ButtonWidth + 2; //make it a bit larger size.y = elementAsType.ButtonHeight + 3; elementAsType.AddButton(newButtonController, size, offset); }
private static void AddSaveButton(ArcenUI_ButtonSet elementAsType, String saveName, int index) { bSaveGameButton newButtonController = new bSaveGameButton(saveName); Vector2 offset; offset.x = 0; offset.y = index * elementAsType.ButtonHeight; Vector2 size; size.x = elementAsType.ButtonWidth; size.y = elementAsType.ButtonHeight; elementAsType.AddButton(newButtonController, size, offset); }