Example #1
0
        bool Mouse_MouseMoved(MOIS.MouseEvent arg)
        {
            MouseState_NativePtr state = arg.state;

            if (arg.state.Z.rel != 0 && modChooserMenu.GetNumItems() != 0)
            {
                float newIndex   = modChooserMenu.getSelectionIndex() - arg.state.Z.rel / Mogre.Math.Abs((float)arg.state.Z.rel);
                float finalIndex = OpenMB.Utilities.Helper.Clamp <float>(newIndex, 0.0f, (float)(modChooserMenu.GetNumItems() - 1));

                modChooserMenu.SelectItem((uint)finalIndex);
                //modTitle.setCaption("modChooserMenu.getSelectedItem()");
                modTitle.setCaption(
                    LocateSystem.Instance.GetLocalizedString(
                        "module_info_name",
                        modChooserMenu.getSelectedItem(),
                        modDisplayDataList[modChooserMenu.Items.IndexOf(modChooserMenu.getSelectedItem())].ID
                        ));

                //modDescBox.setText(modDisplayDataList[modChooserMenu.Items.IndexOf(modChooserMenu.getSelectedItem())].Desc);
                modDescBox.setText(
                    LocateSystem.Instance.GetLocalizedString(
                        "module_info_desc",
                        modDisplayDataList[modChooserMenu.Items.IndexOf(modChooserMenu.getSelectedItem())].Desc,
                        modDisplayDataList[modChooserMenu.Items.IndexOf(modChooserMenu.getSelectedItem())].ID
                        ));

                selectedModName = modChooserMenu.getSelectedItem();
            }

            UIManager.Instance.InjectMouseMove(arg);
            return(true);
        }
Example #2
0
 bool Mouse_MouseMoved(MOIS.MouseEvent arg)
 {
     if (GameManager.Instance.trayMgr.injectMouseMove(arg))
     {
         return(true);
     }
     return(true);
 }
Example #3
0
 bool Mouse_MousePressed(MOIS.MouseEvent arg, MOIS.MouseButtonID id)
 {
     if (GameManager.Instance.trayMgr.injectMouseDown(arg, id))
     {
         return(true);
     }
     return(true);
 }
Example #4
0
 private bool MousePressed(MOIS.MouseEvent arg, MOIS.MouseButtonID id)
 {
     if (id == MOIS.MouseButtonID.MB_Right)
     {
         changeAppState(findByName("MainMenu"), modData);
     }
     return(true);
 }
Example #5
0
 private bool MousePressed(MOIS.MouseEvent arg, MOIS.MouseButtonID id)
 {
     if (id == MOIS.MouseButtonID.MB_Right)
     {
         ScreenManager.Instance.ExitCurrentScreen();
         changeAppState(findByName("MainMenu"), modData);
     }
     return(true);
 }
Example #6
0
        public UIEvent InjectMouseUp(MOIS.MouseEvent evt, MOIS.MouseButtonID id)
        {
            if (!cursorLayer.IsVisible || id != MOIS.MouseButtonID.MB_Left)
            {
                return(null);
            }

            Mogre.Vector2 cursorPos = new Mogre.Vector2(cursor.Left, cursor.Top);

            return(CurrentLayer.InjectMouseUp(evt, id, cursorPos));
        }
 public bool MousePressed(MOIS.MouseEvent e, MOIS.MouseButtonID button)
 {
     if (button == MouseButtonID.MB_Right)
     {
         if (mCameraCS != null)
         {
             i++;
             mCameraCS.CurrentCameraMode =
                 mCameraCS.GetNextCameraMode(cameraModeNames[i % cameraModeNames.Count]);
         }
     }
     return(true);
 }
        public bool MouseMotion(MOIS.MouseEvent e)
        {
            if (mCameraCS != null)
            {
                var ms = e.state;

                var mode = mCameraCS.CurrentCameraMode;
                var name = mCameraCS.GetCameraModeName(mode);
                if (name == "Orbital + mouse")
                {
                    (mode as OrbitalWithMouseCameraMode).InjectMouseMoved(e);
                }
            }
            return(true);
        }
Example #9
0
        bool Mouse_MouseMoved(MOIS.MouseEvent arg)
        {
            MouseState_NativePtr state = arg.state;

            if (arg.state.Z.rel != 0 && modChooserMenu.getNumItems() != 0)
            {
                float newIndex   = modChooserMenu.getSelectionIndex() - arg.state.Z.rel / Mogre.Math.Abs((float)arg.state.Z.rel);
                float finalIndex = OpenMB.Utilities.Helper.Clamp <float>(newIndex, 0.0f, (float)(modChooserMenu.getNumItems() - 1));
                modChooserMenu.selectItem((uint)finalIndex);
                modTitle.setCaption(modChooserMenu.getSelectedItem());
                modDescBox.setText(modDescs[modNames.ToList().IndexOf(modChooserMenu.getSelectedItem())]);
                selectedModName = modChooserMenu.getSelectedItem();
            }

            return(GameManager.Instance.trayMgr.injectMouseMove(arg));
        }
 public bool MouseReleased(MOIS.MouseEvent e, MOIS.MouseButtonID button)
 {
     return(true);
 }
Example #11
0
 bool mMouse_MouseMoved(MOIS.MouseEvent arg)
 {
     return(true);
 }
Example #12
0
 bool mMouse_MousePressed(MOIS.MouseEvent arg, MOIS.MouseButtonID id)
 {
     return(true);
 }
Example #13
0
 bool Mouse_MouseMoved(MOIS.MouseEvent arg)
 {
     ScreenManager.Instance.InjectMouseMove(arg);
     return(true);
 }
Example #14
0
 bool Mouse_MousePressed(MOIS.MouseEvent arg, MOIS.MouseButtonID id)
 {
     ScreenManager.Instance.InjectMousePressed(arg, id);
     return(true);
 }
Example #15
0
 bool Mouse_MouseReleased(MOIS.MouseEvent arg, MOIS.MouseButtonID id)
 {
     return(true);
 }