An Extended version of the UnityEngine.MonoBehaviour Class Basically a template for a Window, has the MonoBehaviourExtended properties and extra bits to make drawing a window easier
Inheritance: MonoBehaviourExtended
            //public DropDownList(Enum Items)
            //    : this()
            //{
            //    this.Items = EnumExtensions.ToEnumDescriptions(Items);
            //}
            public DropDownList(MonoBehaviourWindow Window)
            {
                this.Window = Window;
                //set internal variable so we dont trigger the event before the object exists
                _ListVisible  = false;
                SelectedIndex = 0;

                SkinsLibrary.OnSkinChanged += SkinsLibrary_OnSkinChanged;
            }
 void TWPWindow_WindowVisibleChanged(MonoBehaviourWindow sender, bool NewVisibleState)
 {
     //if its toggling on make sure the window is in scene
     if (NewVisibleState)
     {
         this.ClampToScreenNow();
         if (!Running && !Done) {
             SetDepartureMinToYesterday();
             SetupDestinationControls();
         }
     }
 }
        void TWPWindowSettings_onWindowVisibleChanged(MonoBehaviourWindow sender, bool NewVisibleState)
        {
            if (NewVisibleState)
            {
                if (settings.VersionAttentionFlag)
                    ddlSettingsTab.SelectedIndex = (Int32)SettingsTabs.About;
                else
                    ddlSettingsTab.SelectedIndex = (Int32)SettingsTabs.General;

                //reset the flag
                settings.VersionAttentionFlag = false;
            }
        }
示例#4
0
 void EditorWindow_OnWindowMoveComplete(MonoBehaviourWindow sender)
 {
     Log("Saving editor window position");
     tfScenario.userSettings.editorWindowPosition = WindowRect;
     tfScenario.userSettings.Save();
 }
 void ARPWindow_onWindowMoveComplete(MonoBehaviourWindow sender)
 {
     settings.WindowPosition = WindowRect;
     settings.Save();
 }
 public DropDownList(IEnumerable <String> Items, MonoBehaviourWindow Window)
     : this(Window)
 {
     this.Items = Items.ToList <String>();
 }
 //Constructors
 public DropDownList(IEnumerable <String> Items, Int32 Selected, MonoBehaviourWindow Window)
     : this(Items, Window)
 {
     SelectedIndex = Selected;
 }
示例#8
0
 void MainWindow_OnWindowMoveComplete(MonoBehaviourWindow sender)
 {
     tfScenario.userSettings.mainWindowPosition = WindowRect;
     tfScenario.userSettings.Save();
 }
示例#9
0
 void Tips_onWindowMoveComplete(MonoBehaviourWindow sender)
 {
     KSPTips.settings.TipsTopLeftPos.x = WindowRect.x;
     KSPTips.settings.TipsTopLeftPos.y = WindowRect.y;
     KSPTips.settings.Save();
 }
示例#10
0
 // GUI EVent Handlers
 void Window_OnWindowMoveComplete(MonoBehaviourWindow sender)
 {
     Log("TestFlightHUD Saving window position");
     tfScenario.userSettings.flightHUDPosition = WindowRect;
     tfScenario.userSettings.Save();
 }