Esempio n. 1
0
 public override void PaintMenuItemSeparator(MenuItemSeparator component)
 {
     Position origin = UI.Instance.GetOrigin();
     GL.Disable(EnableCap.Texture2D);
     GL.Color3((byte)79, (byte)91, (byte)84);
     GL.Begin(BeginMode.Lines);
     GL.Vertex2(10 + origin.X + component.Position.X, origin.Y + component.Position.Y + 1);
     GL.Vertex2(origin.X + component.Position.X + component.Size.width - 10, origin.Y + component.Position.Y + 1);
     GL.End();
 }
Esempio n. 2
0
 public override Size GetMenuItemSeparatorPreferedSize(MenuItemSeparator component)
 {
     return new Size(component.Size);
 }
Esempio n. 3
0
 public abstract Size GetMenuItemSeparatorPreferedSize(MenuItemSeparator component);
Esempio n. 4
0
 public abstract void PaintMenuItemSeparator(MenuItemSeparator component);
Esempio n. 5
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("File");
            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);
        }