private void showRules() { //contain everything else inside of it GUI.BeginGroup(buttonRect); //tabs GUILayout.BeginHorizontal(GUILayout.Height(buttonRect.height * 0.1f)); if (GUILayout.Button("Prospecting")) { currentTab = RulesTab.PROSPECTING; } else if (GUILayout.Button("Mining")) { currentTab = RulesTab.MINING; } else if (GUILayout.Button("Scoring")) { currentTab = RulesTab.SCORING; } else if (GUILayout.Button("Back")) { //return rules to default currentTab = RulesTab.PROSPECTING; textSize = TextSize.BULLET; currentMenuState = MenuState.MAIN; } GUILayout.EndHorizontal(); GUILayoutOption[] options = { GUILayout.Width(buttonRect.width), GUILayout.Height(buttonRect.height * 0.75f) }; if (textSize == TextSize.BULLET) { GUILayout.Box(rulesText[(int)currentTab], GuiStyle, options); } else { GUILayout.Box(fullText[(int)currentTab], GuiStyle, options); } string title = "Bullet Form"; if (textSize == TextSize.BULLET) { title = "More Info"; } if (GUILayout.Button(title)) { if (textSize == TextSize.BULLET) { textSize = TextSize.FULL; } else { textSize = TextSize.BULLET; } } GUI.EndGroup(); }
private void showRules() { //contain everything else inside of it GUI.BeginGroup(buttonRect); //tabs GUILayout.BeginHorizontal(GUILayout.Height(buttonRect.height * 0.1f)); if (GUILayout.Button("Prospecting")) currentTab = RulesTab.PROSPECTING; else if (GUILayout.Button("Mining")) currentTab = RulesTab.MINING; else if (GUILayout.Button("Scoring")) currentTab = RulesTab.SCORING; else if (GUILayout.Button("Back")) { //return rules to default currentTab = RulesTab.PROSPECTING; textSize = TextSize.BULLET; currentMenuState = MenuState.MAIN; } GUILayout.EndHorizontal(); GUILayoutOption[] options = { GUILayout.Width(buttonRect.width), GUILayout.Height(buttonRect.height * 0.75f) }; if (textSize == TextSize.BULLET) GUILayout.Box(rulesText[(int)currentTab], GuiStyle, options); else GUILayout.Box(fullText[(int)currentTab], GuiStyle, options); string title = "Bullet Form"; if (textSize == TextSize.BULLET) title = "More Info"; if (GUILayout.Button(title)) { if (textSize == TextSize.BULLET) textSize = TextSize.FULL; else textSize = TextSize.BULLET; } GUI.EndGroup(); }