Пример #1
0
        private void createButtons()
        {
            blue = GUIExt.Add("RedButton", "TestButton", (go) =>
            {
                blue_enabled = !blue_enabled;
                if (blue_enabled)
                {
                    GUIExt.SetFrameColor(blue, Color.blue);
                    WriteLine("Blue Enabled!");
                }
                else
                {
                    GUIExt.ResetFrameColor(blue);
                    WriteLine("Blue Disabled!");
                }
            });

            green = GUIExt.Add("GreenButton", "TestButton2", (go) =>
            {
                green_enabled = !green_enabled;
                if (green_enabled)
                {
                    GUIExt.SetFrameColor(green, Color.green);
                    WriteLine("Green Enabled!");
                }
                else
                {
                    GUIExt.ResetFrameColor(green);
                    WriteLine("Green Disabled!");
                }
            });
        }
Пример #2
0
 private void OnDisable()
 {
     WriteLine("Plugin Disabled!");
     GUIExt.ResetFrameColor(button);
     destroyButtons();
 }