コード例 #1
0
 public void ResetCursorToDefaultForState(eCursorState state)
 {
     if (m_defaultCursors.ContainsKey(state))
     {
         SetCursorForState(state, m_defaultCursors[state]);
     }
 }
コード例 #2
0
        public void SetCursorForState(eCursorState state, CursorInfo cursorInfo, bool isDefault = false)
        {
            if (!cursors.ContainsKey(state))
            {
                cursors.Add(state, cursorInfo);
            }
            else
            {
                cursors[state] = cursorInfo;
            }

            if (isDefault)
            {
                if (!m_defaultCursors.ContainsKey(state))
                {
                    m_defaultCursors.Add(state, cursorInfo);
                }
                else
                {
                    m_defaultCursors[state] = cursorInfo;
                }
            }

            StateChanged();
        }
コード例 #3
0
 public void TrySet(eCursorState state)
 {
     if (State != eCursorState.WAITING)
     {
         State = state;
     }
 }
コード例 #4
0
 public void SetCursorForState(eCursorState state, Texture2D cursor, Vector2 hotspot, bool isDefault = false)
 {
     SetCursorForState(state, new CursorInfo {
         cursor = cursor, hotspot = hotspot
     }, isDefault);
 }