public void setButtonListeners(string a_button, TextButton.clickDelegate a_delegate) { if (a_button != null) { ((TextButton)findButton(a_button)).m_clickEvent += a_delegate; } else { foreach (TextButton l_button in m_buttonList) { l_button.m_clickEvent += a_delegate; } } }
public void load() { m_gameState = (GameState)Game.getInstance().getCurrentState(); m_gameStart = new TextButton(new Vector2(400, 15), "Start Game", "Arial"); m_gameStart.m_clickEvent += new TextButton.clickDelegate(gameStartClick); m_gameStart.load(); m_addons.Add(new GUIAddon("Content/Scripts/GUI/CreateGUI.lua")); registerFunctions(m_lua); foreach (GUIAddon l_guiAddon in m_addons) { l_guiAddon.load(); } }