how to get Wii work with CEGUI
Posted: 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.
This code is i try to call mouse pressed when press Wii buttom
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
}