public static void ShowWindow(GUIContent label, GUIContent[] lines) { EdGameHelpWindow win = GetWindow <EdGameHelpWindow>(true, "EdGames Help", true); win.label = label; win.lines = lines; }
// ------------------------------------------------------------------------------------------------------------------ private void DoDraw(Event ev) { // UI GUI.Label(labelRect, string.Format("Score: {0}", score), EditorStyles.largeLabel); if (GUI.Button(resetButtonRect, GC_Reset, EditorStyles.miniButtonLeft)) { ResetGame(); } if (GUI.Button(helpButtonRect, GC_Help, EditorStyles.miniButtonRight)) { EdGameHelpWindow.ShowWindow(GC_Label, GC_HelpLines); } if (ev.type == EventType.Repaint) { DrawBoard(); DrawIndicator(ev); DrawBubble(); foreach (ScoreInfo s in floatingScores) { GUI.Label(s.pos, s.label, scoreStyle); } } }
// ------------------------------------------------------------------------------------------------------------------ private void DoDraw(Event ev) { // UI GUI.Label(labelRect, string.Format("Score: {0}", score), EditorStyles.largeLabel); if (GUI.Button(resetButtonRect, GC_Reset, EditorStyles.miniButtonLeft)) { ResetGame(); } if (GUI.Button(helpButtonRect, GC_Help, EditorStyles.miniButtonRight)) { EdGameHelpWindow.ShowWindow(GC_Label, GC_HelpLines); } if (ev.type == EventType.Repaint) { DrawBoard(); DrawBlock(); } }