Beispiel #1
0
        public MainMenu(View parent, View layoutParent = null, string id = null, Template template = null, bool deferInitialization = false) :
            base(parent, layoutParent, id, template ?? MainMenuTemplates.Default, deferInitialization)
        {
            if (deferInitialization)
            {
                return;
            }

            // constructing Region (Region1)
            Region1 = new Region(this, this, "Region1", Region1Template);
            Group1  = new Group(this, Region1.Content, "Group1", Group1Template);
            Button1 = new Button(this, Group1.Content, "Button1", Button1Template);
            Button1.Click.RegisterHandler(this, "Play");
            Button2 = new Button(this, Group1.Content, "Button2", Button2Template);
            Button2.Click.RegisterHandler(this, "ShowOptions");
            Button3 = new Button(this, Group1.Content, "Button3", Button3Template);
            Button3.Click.RegisterHandler(this, "Quit");

            // constructing Region (Region2)
            Region2         = new Region(this, this, "Region2", Region2Template);
            SubmenuSwitcher = new ViewSwitcher(this, Region2.Content, "SubmenuSwitcher", SubmenuSwitcherTemplate);
            LevelSelect     = new LevelSelect(this, SubmenuSwitcher.Content, "LevelSelect", LevelSelectTemplate);
            Options         = new Options(this, SubmenuSwitcher.Content, "Options", OptionsTemplate);
            this.AfterInitializeInternal();
        }
        public TabPanel(View parent, View layoutParent = null, string id = null, Template template = null, Action <View> initializer = null) :
            base(parent, layoutParent, id, template ?? TabPanelTemplates.Default, initializer)
        {
            // constructing ViewSwitcher (TabSwitcher)
            TabSwitcher = new ViewSwitcher(this, this, "TabSwitcher", TabSwitcherTemplate);

            // constructing ToggleGroup (TabHeaderGroup)
            TabHeaderGroup   = new ToggleGroup(this, this, "TabHeaderGroup", TabHeaderGroupTemplate);
            ContentContainer = TabSwitcher;
            this.AfterInitializeInternal();
        }
Beispiel #3
0
        public MainMenuDemoScene(View parent, View layoutParent = null, string id = null, Template template = null, bool deferInitialization = false) :
            base(parent, layoutParent, id, template ?? MainMenuDemoSceneTemplates.Default, deferInitialization)
        {
            if (deferInitialization)
            {
                return;
            }

            // constructing ViewSwitcher (SubmenuSwitcher)
            SubmenuSwitcher = new ViewSwitcher(this, this, "SubmenuSwitcher", SubmenuSwitcherTemplate);
            MainMenuWindow  = new MainMenuExample(this, SubmenuSwitcher.Content, "MainMenuWindow", MainMenuWindowTemplate);
            MainMenuWindow.Play.RegisterHandler(this, "MainMenuPlay");
            LevelSelectWindow = new LevelSelectExample(this, SubmenuSwitcher.Content, "LevelSelectWindow", LevelSelectWindowTemplate);
            LevelSelectWindow.NavigateBack.RegisterHandler(this, "LevelSelectNavigateBack");
            this.AfterInitializeInternal();
        }