コード例 #1
0
 /// <summary> Set cursor type </summary>
 public void SetCursor(GLWindowControl.GLCursorType t)
 {
     if (t == GLWindowControl.GLCursorType.Wait)
     {
         glControl.Cursor = Cursors.WaitCursor;
     }
     else if (t == GLWindowControl.GLCursorType.EW)
     {
         glControl.Cursor = Cursors.SizeWE;
     }
     else if (t == GLWindowControl.GLCursorType.NS)
     {
         glControl.Cursor = Cursors.SizeNS;
     }
     else if (t == GLWindowControl.GLCursorType.Move)
     {
         glControl.Cursor = Cursors.Hand;
     }
     else if (t == GLWindowControl.GLCursorType.NWSE)
     {
         glControl.Cursor = Cursors.SizeNWSE;
     }
     else
     {
         glControl.Cursor = Cursors.Default;
     }
 }
コード例 #2
0
 // we are in control display, and if control change the cursor is the current control mouse over, set it
 protected void Gc_CursorTo(GLBaseControl c, GLWindowControl.GLCursorType ct)
 {
     if (currentmouseover == c)
     {
         ((GLControlDisplay)this).SetCursor(ct);
     }
 }
コード例 #3
0
 /// <summary> Internal interface do not use </summary>
 public void SetCursor(GLWindowControl.GLCursorType t)
 {
     if (t != lastcursor)
     {
         glwin.SetCursor(t);
         lastcursor = t;
         //System.Diagnostics.Debug.WriteLine($"Cursor to {t}");
     }
 }