Page 1 of 1

how to get Wii work with CEGUI

Posted: Mon Mar 22, 2010 04:46
by lw89
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;
          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;
    if (id == OIS::MB_Left)
    clickRight = false;
    mLMouseDown = true;
    } // if

Re: how to get Wii work with CEGUI

Posted: Mon Mar 22, 2010 07:16
by CrazyEddie
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