Ejemplo n.º 1
0
        public MainWindow(FuelBalanceController controller, Settings settings, SettingsWindow settingsWindow, HelpWindow helpWindow)
            : base("TAC Fuel Balancer", 500, 500)
        {
            this.controller     = controller;
            this.settings       = settings;
            this.settingsWindow = settingsWindow;
            this.helpWindow     = helpWindow;
            SetVisible(true);

            var settingstexture = TextureHelper.FromResource("Tac.icons.settings.png", 16, 16);

            settingsContent = (settingstexture != null) ? new GUIContent(settingstexture, "Settings window") : new GUIContent("S", "Settings window");

            var helptexture = TextureHelper.FromResource("Tac.icons.help.png", 16, 16);

            helpContent = (helptexture != null) ? new GUIContent(helptexture, "Help window") : new GUIContent("?", "Help window");

            var resettexture = TextureHelper.FromResource("Tac.icons.reset.png", 16, 16);

            resetContent = (resettexture != null) ? new GUIContent(resettexture, "Reset resource lists") : new GUIContent("?", "Reset resource lists");
        }
Ejemplo n.º 2
0
 public MainWindow(FuelBalanceController controller, Settings settings, SettingsWindow settingsWindow, HelpWindow helpWindow)
     : base("TAC Fuel Balancer", 400, 500)
 {
     this.controller     = controller;
     this.settings       = settings;
     this.settingsWindow = settingsWindow;
     this.helpWindow     = helpWindow;
     SetVisible(true);
 }
Ejemplo n.º 3
0
        public MainWindow(FuelBalanceController controller, Settings settings, /* SettingsWindow settingsWindow,*/ HelpWindow helpWindow)
            : base("TAC Fuel Balancer", 500, 500)
        {
            Debug.Log("MainWindow");
            this.controller = controller;
            this.settings   = settings;
#if false
            this.settingsWindow = settingsWindow;
#endif
            this.helpWindow = helpWindow;
            //SetVisible(true);

#if false
            //var settingstexture = TextureHelper.FromResource("Tac.icons.settings.png", 16, 16);
            Texture2D settingstexture = null;
            try
            {
                settingstexture = TextureHelper.FromResource("icons.settings.png", 16, 16);
            }
            catch { }
            settingsContent = (settingstexture != null) ? new GUIContent(settingstexture, "Settings window") : new GUIContent("S", "Settings window");
#endif
            //var helptexture = TextureHelper.FromResource("Tac.icons.help.png", 16, 16);
            Texture2D helptexture = null;
            try
            {
                helptexture = TextureHelper.FromResource("icons.help.png", 16, 16);
            }
            catch (Exception ex)
            {
                Debug.Log("exception loading helptexture from resource: " + ex.Message);
                helptexture = new Texture2D(16, 16);
                if (!ToolbarControl.LoadImageFromFile(ref helptexture, "GameData/TacFuelBalancer/Icons/help.png"))
                {
                    helptexture = null;
                }
            }
            helpContent = (helptexture != null) ? new GUIContent(helptexture, "Help window") : new GUIContent("?", "Help window");

            //var resettexture = TextureHelper.FromResource("Tac.icons.reset.png", 16, 16);
            Texture2D resettexture;
            try
            {
                resettexture = TextureHelper.FromResource("icons.reset.png", 16, 16);
            }
            catch (Exception ex)
            {
                Debug.Log("exception loading resettexture from resource: " + ex.Message);
                resettexture = new Texture2D(16, 16);
                if (!ToolbarControl.LoadImageFromFile(ref resettexture, "GameData/TacFuelBalancer/Icons/reset.png"))
                {
                    resettexture = null;
                }
            }
            resetContent = (resettexture != null) ? new GUIContent(resettexture, "Reset resource lists") : new GUIContent("?", "Reset resource lists");
        }