how to get Wii work with CEGUI

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

lw89
Just popping in
Just popping in
Posts: 11
Joined: Tue Jul 28, 2009 09:57

how to get Wii work with CEGUI

Postby lw89 » Mon Mar 22, 2010 04:46

hi everyone:

This is my first time use CEGUI, i am totally new at here. I work with a project use Wii and ogre with CEGUI. I get one problem. I got a problem at moment, i don't know how to get Wii work with CEGUI, i have create a buttom and i test it with mouse clicked, it's worked. and then i try use Wii, it wont work.

Wii only work in the update loop, and i don't have listener for Wii. So is anyone know do i active CEGUI buttom.

this part code is worked, when press the buttom on Wii, program will know i clicked on GUI, but The Buttom wont work.

Code: Select all


CEGUI::Window *root = CEGUI::WindowManager::getSingleton().getWindow("root");
if ( root->getChildAtPosition(CEGUI::MouseCursor::getSingleton().getPosition()))      
        clickOnGUI = true;
else
{
          clickOnGUI = false;
}


This code is i try to call mouse pressed when press Wii buttom

Code: Select all

if (remote.Button.A())
{
    OIS::MouseButtonID id = OIS::MB_Left;
    CEGUI::System::getSingleton().injectMouseButtonDown(convertOISMouseButtonToCegui(OIS::MouseButtonID::MB_Left));
    if (id == OIS::MB_Left)
    {   
    clickRight = false;
    onLeftPressed();   
    mLMouseDown = true;
            
    } // if
         
}

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: how to get Wii work with CEGUI

Postby CrazyEddie » Mon Mar 22, 2010 07:16

You must also ensure you inject other events too, especially mouse 'up' events, since these are used in conjunction with the down events to form 'clicks'. This is basically the same question as was asked yesterday: viewtopic.php?p=22279#p22279

HTH

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests