Пример #1
0
 public virtual void Init(uint width, uint height)
 {
     this.width = width;
     this.height = height;
     theme = new DefaultTheme(width, height);
     theme.Setup("aw.png", "./Resources/GUI/aw.png");
 }
Пример #2
0
        public void Init(uint width, uint height)
        {
            ReSize(width, height);

            DefaultTheme theme = new DefaultTheme(width, height);
            theme.Setup("aw.png", "./Resources/");
            //selectionManager.setup(width,height);
            UI.Instance.CurrentTheme = theme;
            MenuBar.Instance.Init(width);

            /*

            menuFile = new Menu("FlightData");
            menuItemFileOpen = new MenuItemButton("Open");
            menuItemFileSave = new MenuItemButton("Save");
            menuItemFileSaveAs = new MenuItemButton("Save As");
            menuItemFileSeparator = new MenuItemSeparator();
            menuItemFileExit = new MenuItemButton("Exit");
            menuItemFileExport = new MenuItemSubMenu("Export");
            menuItemFilePNG = new MenuItemSubMenu("PNG Image");
            menuItemFilePNGNone = new MenuItemButton("None");
            menuItemFilePNGInterlaced = new MenuItemButton("Interlaced");
            menuItemFilePNG.AddItem(menuItemFilePNGNone);
            menuItemFilePNG.AddItem(menuItemFilePNGInterlaced);
            menuItemFileJPEG = new MenuItemButton("JPEG Image");
            menuItemFileExport.AddItem(menuItemFilePNG);
            menuItemFileExport.AddItem(menuItemFileJPEG);
            menuItemFileImport = new MenuItemSubMenu("Import");
            menuItemFile3DS = new MenuItemButton("3DS Model");
            menuItemFileOBJ = new MenuItemButton("OBJ Model");
            menuItemFileSIA = new MenuItemButton("SIA Model");
            menuItemFileImport.AddItem(menuItemFile3DS);
            menuItemFileImport.AddItem(menuItemFileOBJ);
            menuItemFileImport.AddItem(menuItemFileSIA);
            menuFile.AddItem(menuItemFileOpen);
            menuFile.AddItem(menuItemFileSave);
            menuFile.AddItem(menuItemFileSaveAs);
            menuFile.AddItem(menuItemFileExport);
            menuFile.AddItem(menuItemFileImport);
            menuFile.AddItem(menuItemFileSeparator);
            menuFile.AddItem(menuItemFileExit);

            menuHelp = new Menu("Help");
            menuItemHelpAbout = new MenuItemButton("About");
            menuItemHelpHelp = new MenuItemButton("Help");
            menuHelp.AddItem(menuItemHelpAbout);
            menuHelp.AddItem(menuItemHelpHelp);

            menuAssortedWidgetsTest = new Menu("Assorted Widgets Test");

            dialogTestDialog = new DialogTestDialog();
            menuItemDialogTest = new MenuItemButton("Modal Dialog Test");
            menuAssortedWidgetsTest.AddItem(menuItemDialogTest);

            checkNRadioTestDialog = new CheckNRadioTestDialog();
            menuItemCheckNRadioTest = new MenuItemButton("Check & Radio Test");
            menuAssortedWidgetsTest.AddItem(menuItemCheckNRadioTest);

            progressNSliderTestDialog = new ProgressNSliderTestDialog();
            menuItemProgressNSliderTest = new MenuItemButton("Progress & Slider Test");
            menuAssortedWidgetsTest.AddItem(menuItemProgressNSliderTest);

            multipleLayoutTestDialog = new MultipleLayoutTestDialog();
            menuItemMultipleTest = new MenuItemButton("MultipleLayout Test");
            menuAssortedWidgetsTest.AddItem(menuItemMultipleTest);

            scrollPanelTestDialog = new ScrollPanelTestDialog();
            menuItemScrollPanelTest = new MenuItemButton("Scroll Panel Test");
            menuAssortedWidgetsTest.AddItem(menuItemScrollPanelTest);

            textNDropTestDialog = new TextNDropTestDialog();
            menuItemTextNDropTest = new MenuItemButton("DropList Test");
            menuAssortedWidgetsTest.AddItem(menuItemTextNDropTest);

            MenuBar.Instance.AddMenu(menuFile);
            MenuBar.Instance.AddMenu(menuHelp);
            MenuBar.Instance.AddMenu(menuAssortedWidgetsTest);

            menuItemDialogTest.MousePressedEvent += new MousePressedHandler(menuItemDialogTest_MousePressedEvent);
            menuItemCheckNRadioTest.MousePressedEvent += new MousePressedHandler(menuItemCheckNRadioTest_MousePressedEvent);
            menuItemProgressNSliderTest.MousePressedEvent += new MousePressedHandler(menuItemProgressNSliderTest_MousePressedEvent);
            menuItemMultipleTest.MousePressedEvent += new MousePressedHandler(menuItemMultipleTest_MousePressedEvent);
            menuItemScrollPanelTest.MousePressedEvent += new MousePressedHandler(menuItemScrollPanelTest_MousePressedEvent);
            menuItemTextNDropTest.MousePressedEvent += new MousePressedHandler(menuItemTextNDropTest_MousePressedEvent);

            */
        }