Esempio n. 1
0
        public static void MainMenuSystem(WndWindow element, WndWindowMessage message, UIElementCallbackContext context)
        {
            switch (message.MessageType)
            {
            case WndWindowMessageType.SelectedButton:
                switch (message.Element.Name)
                {
                case "MainMenu.wnd:ButtonOptions":
                    context.WindowManager.PushWindow(@"Menus\OptionsMenu.wnd");
                    break;

                case "MainMenu.wnd:ButtonExit":
                    var exitWindow = context.WindowManager.PushWindow(@"Menus\QuitMessageBox.wnd");
                    exitWindow.Root.FindChild("QuitMessageBox.wnd:StaticTextTitle").Text          = "EXIT?";
                    exitWindow.Root.FindChild("QuitMessageBox.wnd:StaticTextTitle").TextAlignment = TextAlignment.Leading;
                    exitWindow.Root.FindChild("QuitMessageBox.wnd:StaticTextMessage").Text        = "Are you sure you want to exit?";
                    exitWindow.Root.FindChild("QuitMessageBox.wnd:ButtonOk").Show();
                    exitWindow.Root.FindChild("QuitMessageBox.wnd:ButtonOk").Text = "YES";
                    exitWindow.Root.FindChild("QuitMessageBox.wnd:ButtonCancel").Show();
                    exitWindow.Root.FindChild("QuitMessageBox.wnd:ButtonCancel").Text = "NO";
                    break;
                }
                break;
            }
        }
Esempio n. 2
0
        public static void PassSelectedButtonsToParentSystem(Control control, WndWindowMessage message, ControlCallbackContext context)
        {
            if (message.MessageType != WndWindowMessageType.SelectedButton)
            {
                return;
            }

            control.Parent.SystemCallback.Invoke(control.Parent, message, context);
        }
Esempio n. 3
0
        public static void PassSelectedButtonsToParentSystem(WndWindow element, WndWindowMessage message, UIElementCallbackContext context)
        {
            if (message.MessageType != WndWindowMessageType.SelectedButton)
            {
                return;
            }

            element.Parent.SystemCallback.Invoke(element.Parent, message, context);
        }
Esempio n. 4
0
 public static void MainMenuInput(WndWindow element, WndWindowMessage message, UIElementCallbackContext context)
 {
     // Any input at all (mouse, keyboard) will trigger the main menu fade-in.
     if (!_doneMainMenuFadeIn)
     {
         context.WindowManager.TransitionManager.QueueTransition(null, element.Window, "MainMenuFade");
         context.WindowManager.TransitionManager.QueueTransition(null, element.Window, "MainMenuDefaultMenu");
         element.Window.Root.FindChild("MainMenu.wnd:MainMenuRuler").Show();
         _doneMainMenuFadeIn = true;
     }
 }
Esempio n. 5
0
 public static void OptionsMenuSystem(WndWindow element, WndWindowMessage message, UIElementCallbackContext context)
 {
     switch (message.MessageType)
     {
     case WndWindowMessageType.SelectedButton:
         switch (message.Element.Name)
         {
         case "OptionsMenu.wnd:ButtonBack":
             context.WindowManager.PopWindow();
             break;
         }
         break;
     }
 }
Esempio n. 6
0
 public static void QuitMessageBoxSystem(WndWindow element, WndWindowMessage message, UIElementCallbackContext context)
 {
     switch (message.MessageType)
     {
     case WndWindowMessageType.SelectedButton:
         switch (message.Element.Name)
         {
         case "QuitMessageBox.wnd:ButtonCancel":
             context.WindowManager.PopWindow();
             break;
         }
         break;
     }
 }
Esempio n. 7
0
 public static void PassMessagesToParentSystem(Control control, WndWindowMessage message, ControlCallbackContext context)
 {
     control.Parent.SystemCallback.Invoke(control.Parent, message, context);
 }
Esempio n. 8
0
 public static void PassMessagesToParentSystem(WndWindow element, WndWindowMessage message, UIElementCallbackContext context)
 {
     element.Parent.SystemCallback.Invoke(element.Parent, message, context);
 }