string GetMouseOverTexture(MyGuiScreenBase screen) { if (screen != null) { var mouseOverControl = screen.GetMouseOverControl(); if (mouseOverControl != null) { return(mouseOverControl.GetMouseCursorTexture() ?? MyGuiManager.GetMouseCursorTexture()); } } return(MyGuiManager.GetMouseCursorTexture()); }
public virtual string GetMouseCursorTexture() { // this is default mouse cursor texture string mouseCursorTexture = MyGuiManager.GetMouseCursorTexture();//null; if (IsMouseOver) { //// when mouse button pressed and mouse cursor texture for pressed is not null //if (m_mouseButtonPressed && MouseCursorPressedTexture != null) //{ // mouseCursorTexture = MouseCursorPressedTexture; //} //// when mouse over control and mouse cursor texture for hover is not null //else if(MouseCursorHoverTexture != null) //{ // mouseCursorTexture = MouseCursorHoverTexture; //} } return(mouseCursorTexture); }
public MyTexture2D GetMouseCursorTexture() { // this is default mouse cursor texture MyTexture2D mouseCursorTexture = MyGuiManager.GetMouseCursorTexture();//null; if (IsMouseOver()) { // when mouse button pressed and mouse cursor texture for pressed is not null if (m_mouseButtonPressed && m_mouseCursorPressedTexture != null) { mouseCursorTexture = m_mouseCursorPressedTexture; } // when mouse over control and mouse cursor texture for hover is not null else if (m_mouseCursorHoverTexture != null) { mouseCursorTexture = m_mouseCursorHoverTexture; } } return(mouseCursorTexture); }