Page 1 of 1

Static window

Posted: Mon May 30, 2011 12:50
by pista75
Hello.
I would like to ask that the movable window make to not move?

Re: Static window

Posted: Mon May 30, 2011 13:12
by crond
I'm no expert with CEGUI, although there is this thing called documentation. For CEGUI, try here: http://www.cegui.org.uk/docs/current/index.html

To your question, if it is a FrameWindow, you can use the `setDragMovingEnabled` method to control that sort of behavior.

edit: Or, you could set it from a layout file.

Re: Static window

Posted: Mon May 30, 2011 17:33
by pista75
formulated differently:
How do I turn off the window movement?

Re: Static window

Posted: Tue May 31, 2011 18:32
by Kulik
crond wrote:I'm no expert with CEGUI, although there is this thing called documentation. For CEGUI, try here: http://www.cegui.org.uk/docs/current/index.html

To your question, if it is a FrameWindow, you can use the `setDragMovingEnabled` method to control that sort of behavior.

edit: Or, you could set it from a layout file.

Re: Static window

Posted: Tue May 31, 2011 19:57
by belkacem
check your case in loop Message

you should have something like this


Code: Select all

case WM_MOUSEMOVE:
         POINT p ;
         ::GetCursorPos ( &p);
         ::ScreenToClient (hwnd , &p);
         CEGUI::System::getSingleton().injectMousePosition(p.x, p.y);
        break;

    case WM_LBUTTONDOWN:
        CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::LeftButton);
        break;

    case WM_LBUTTONUP:
        CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::LeftButton);
        break;

    case WM_RBUTTONDOWN:
        CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::RightButton);
        break;

    case WM_RBUTTONUP:
        CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::RightButton);
        break;

    case WM_MBUTTONDOWN:
        CEGUI::System::getSingleton().injectMouseButtonDown(CEGUI::MiddleButton);
        break;

    case WM_MBUTTONUP:
        CEGUI::System::getSingleton().injectMouseButtonUp(CEGUI::MiddleButton);
        break;


if don't just make one and for more information about injecting inputs
http://www.cegui.org.uk/wiki/index.php/The_Beginner_Guide_to_Injecting_Inputs