Exemple #1
0
 private void keyMap_onButtonUp(WiiButtonEvent evt)
 {
     if (this.OnButtonUp != null)
     {
         this.OnButtonUp(evt);
     }
 }
Exemple #2
0
 private void keyMap_onButtonDown(WiiButtonEvent evt)
 {
     if (this.OnButtonDown != null)
     {
         this.OnButtonDown(evt);
     }
 }
 private void WiiButton_Up(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "pointertoggle" && !evt.Handled)
         {
             this.showPointer = this.showPointer ? false : true;
             if (this.showPointer)
             {
                 this.duoTouch.enableHover();
             }
             else
             {
                 this.duoTouch.disableHover();
             }
         }
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             touchDownMaster = false;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             touchDownSlave = false;
         }
     }
 }
Exemple #4
0
 private void WiiButton_Up(WiiButtonEvent evt)
 {
     /*
      * foreach (string action in evt.Actions)
      * {
      *  if (action.ToLower() == "nextlayout" && !evt.Handled)
      *  {
      *      List<LayoutChooserSetting> layoutList = this.keyMapper.GetLayoutList();
      *      int curpos = 0;
      *      int foundpos = 0;
      *      foreach (LayoutChooserSetting setting in layoutList)
      *      {
      *          JToken token = setting.Keymap;
      *          if (token != null)
      *          {
      *              if (token.ToString() == this.currentKeymap)
      *              {
      *                  foundpos = curpos;
      *              }
      *          }
      *          curpos++;
      *      }
      *      LayoutChooserSetting nextLayout = layoutList.ElementAt(++foundpos % (layoutList.Count() - 1));
      *      if (nextLayout.Keymap != null)
      *      {
      *          this.keyMapper.SetFallbackKeymap(nextLayout.Keymap);
      *          evt.Handled = true;
      *      }
      *  }
      *  if (action.ToLower() == "pointertoggle" && !evt.Handled)
      *  {
      *      this.showPointer = this.showPointer ? false : true;
      *      if (this.showPointer)
      *      {
      *          this.duoTouch.enableHover();
      *          if (this.usingCursors() && !mouseMode)
      *          {
      *              this.masterCursor.Show();
      *          }
      *      }
      *      else
      *      {
      *          this.duoTouch.disableHover();
      *          if (this.usingCursors())
      *          {
      *              this.masterCursor.Hide();
      *              this.slaveCursor.Hide();
      *          }
      *      }
      *  }
      * }
      */
 }
 private void WiiButton_Down(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             touchDownMaster = true;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             touchDownSlave = true;
         }
     }
 }
Exemple #6
0
 private void WiiButton_Down(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.masterCursor.SetPressed();
             }
             touchDownMaster = true;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.slaveCursor.SetPressed();
             }
             touchDownSlave = true;
         }
     }
 }
Exemple #7
0
 private void WiiButton_Up(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "nextlayout" && !evt.Handled)
         {
             IEnumerable<JObject> layoutList = this.keyMapper.GetLayoutList();
             int curpos = 0;
             int foundpos = 0;
             foreach (JObject obj in layoutList)
             {
                 JToken token = obj.GetValue("Keymap");
                 if (token != null)
                 {
                     if (token.ToString() == this.currentKeymap)
                     {
                         foundpos = curpos;
                     }
                 }
                 curpos++;
             }
             JObject nextLayout = layoutList.ElementAt(++foundpos % (layoutList.Count() - 1));
             if (nextLayout.GetValue("Keymap") != null)
             {
                 this.keyMapper.SetFallbackKeymap(nextLayout.GetValue("Keymap").ToString());
                 evt.Handled = true;
             }
         }
         if (action.ToLower() == "pointertoggle" && !evt.Handled)
         {
             this.showPointer = this.showPointer ? false : true;
             if (this.showPointer)
             {
                 this.duoTouch.enableHover();
                 if (this.usingCursors() && !mouseMode)
                 {
                     this.masterCursor.Show();
                 }
             }
             else
             {
                 this.duoTouch.disableHover();
                 if (this.usingCursors())
                 {
                     this.masterCursor.Hide();
                     this.slaveCursor.Hide();
                 }
             }
         }
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.masterCursor.SetReleased();
             }
             touchDownMaster = false;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.slaveCursor.SetReleased();
             }
             touchDownSlave = false;
         }
     }
 }
Exemple #8
0
 private void WiiButton_Down(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.masterCursor.SetPressed();
             }
             touchDownMaster = true;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.slaveCursor.SetPressed();
             }
             touchDownSlave = true;
         }
     }
 }
 private void WiiButton_Up(WiiButtonEvent evt)
 {
     /*
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "nextlayout" && !evt.Handled)
         {
             List<LayoutChooserSetting> layoutList = this.keyMapper.GetLayoutList();
             int curpos = 0;
             int foundpos = 0;
             foreach (LayoutChooserSetting setting in layoutList)
             {
                 JToken token = setting.Keymap;
                 if (token != null)
                 {
                     if (token.ToString() == this.currentKeymap)
                     {
                         foundpos = curpos;
                     }
                 }
                 curpos++;
             }
             LayoutChooserSetting nextLayout = layoutList.ElementAt(++foundpos % (layoutList.Count() - 1));
             if (nextLayout.Keymap != null)
             {
                 this.keyMapper.SetFallbackKeymap(nextLayout.Keymap);
                 evt.Handled = true;
             }
         }
         if (action.ToLower() == "pointertoggle" && !evt.Handled)
         {
             this.showPointer = this.showPointer ? false : true;
             if (this.showPointer)
             {
                 this.duoTouch.enableHover();
                 if (this.usingCursors() && !mouseMode)
                 {
                     this.masterCursor.Show();
                 }
             }
             else
             {
                 this.duoTouch.disableHover();
                 if (this.usingCursors())
                 {
                     this.masterCursor.Hide();
                     this.slaveCursor.Hide();
                 }
             }
         }
     }
     */
 }
 private void WiiButton_Up(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "pointertoggle" && !evt.Handled)
         {
             this.showPointer = this.showPointer ? false : true;
             if (this.showPointer)
             {
                 this.duoTouch.enableHover();
             }
             else
             {
                 this.duoTouch.disableHover();
             }
         }
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             touchDownMaster = false;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             touchDownSlave = false;
         }
     }
 }
Exemple #11
0
 private void keyMap_onButtonDown(WiiButtonEvent evt)
 {
     if (this.OnButtonDown != null)
     {
         this.OnButtonDown(evt);
     }
 }
        /*
        private void row_OnClick(string keymap)
        {
            if (!this.hidden)
            {
                Select_Layout(keymap);
            }
        }
        */
        private void keyMapper_OnButtonUp(WiiButtonEvent e)
        {
            if(!hidden)
            {
                if (e.Button.ToLower().Equals("down"))
                {
                    highlightNext();
                }
                else if (e.Button.ToLower().Equals("up"))
                {
                    highlightPrev();
                }
                else if (e.Button.ToLower().Equals("right") || e.Button.ToLower().Equals("a"))
                {
                    selectHighlighted();
                }

            }
        }
        private void keyMapper_OnButtonDown(WiiButtonEvent e)
        {
            if(!hidden)
            {

            }
        }
Exemple #14
0
 private void WiiButton_Up(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "nextlayout" && !evt.Handled)
         {
             IEnumerable <JObject> layoutList = this.keyMapper.GetLayoutList();
             int curpos   = 0;
             int foundpos = 0;
             foreach (JObject obj in layoutList)
             {
                 JToken token = obj.GetValue("Keymap");
                 if (token != null)
                 {
                     if (token.ToString() == this.currentKeymap)
                     {
                         foundpos = curpos;
                     }
                 }
                 curpos++;
             }
             JObject nextLayout = layoutList.ElementAt(++foundpos % (layoutList.Count() - 1));
             if (nextLayout.GetValue("Keymap") != null)
             {
                 this.keyMapper.SetFallbackKeymap(nextLayout.GetValue("Keymap").ToString());
                 evt.Handled = true;
             }
         }
         if (action.ToLower() == "pointertoggle" && !evt.Handled)
         {
             this.showPointer = this.showPointer ? false : true;
             if (this.showPointer)
             {
                 this.duoTouch.enableHover();
                 if (this.usingCursors() && !mouseMode)
                 {
                     this.masterCursor.Show();
                 }
             }
             else
             {
                 this.duoTouch.disableHover();
                 if (this.usingCursors())
                 {
                     this.masterCursor.Hide();
                     this.slaveCursor.Hide();
                 }
             }
         }
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.masterCursor.SetReleased();
             }
             touchDownMaster = false;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             if (this.usingCursors())
             {
                 this.slaveCursor.SetReleased();
             }
             touchDownSlave = false;
         }
     }
 }
Exemple #15
0
 private void WiiButton_Up(WiiButtonEvent evt)
 {
 }
Exemple #16
0
 private void WiiButton_Down(WiiButtonEvent evt)
 {
 }
 private void WiiButton_Down(WiiButtonEvent evt)
 {
 }
Exemple #18
0
 private void keyMap_onButtonUp(WiiButtonEvent evt)
 {
     if (this.OnButtonUp != null)
     {
         this.OnButtonUp(evt);
     }
 }
 private void WiiButton_Down(WiiButtonEvent evt)
 {
     foreach (string action in evt.Actions)
     {
         if (action.ToLower() == "touchmaster" && !evt.Handled)
         {
             touchDownMaster = true;
         }
         if (action.ToLower() == "touchslave" && !evt.Handled)
         {
             touchDownSlave = true;
         }
     }
 }