本文整理汇总了C++中ui::Widget::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Widget::GetName方法的具体用法?C++ Widget::GetName怎么用?C++ Widget::GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ui::Widget
的用法示例。
在下文中一共展示了Widget::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoWork
void DoWork(Threading::DefaultThreadSpecificStorage::Type& CurrentThreadStorage)
{
//User Input through a WorldQueryTool
Input::InputManager* InputMan = Input::InputManager::GetSingletonPtr();
Input::Mouse* SysMouse = InputMan->GetSystemMouse();
Input::Keyboard* SysKeyboard = InputMan->GetSystemKeyboard();
Input::Controller* Controller1 = NULL;
if( InputMan->GetNumControllers() > 0 )
Controller1 = InputMan->GetController(0);
if( SysKeyboard->IsButtonPressed(Input::KEY_LEFT) || (Controller1 ? Controller1->IsHatPushedInDirection(1,Input::CONTROLLERHAT_LEFT) : false) )
{ CamControl->StrafeLeft( 300 * ( TheEntresol->GetLastFrameTimeMilliseconds() * 0.001 ) ); }
if( SysKeyboard->IsButtonPressed(Input::KEY_RIGHT) || (Controller1 ? Controller1->IsHatPushedInDirection(1,Input::CONTROLLERHAT_RIGHT) : false) )
{ CamControl->StrafeRight( 300 * ( TheEntresol->GetLastFrameTimeMilliseconds() * 0.001 ) ); }
if( SysKeyboard->IsButtonPressed(Input::KEY_UP) || (Controller1 ? Controller1->IsHatPushedInDirection(1,Input::CONTROLLERHAT_UP) : false) )
{ CamControl->MoveForward( 300 * ( TheEntresol->GetLastFrameTimeMilliseconds() * 0.001 ) ); }
if( SysKeyboard->IsButtonPressed(Input::KEY_DOWN) || (Controller1 ? Controller1->IsHatPushedInDirection(1,Input::CONTROLLERHAT_DOWN) : false) )
{ CamControl->MoveBackward( 300 * ( TheEntresol->GetLastFrameTimeMilliseconds() * 0.001 ) ); }
static bool MouseCam = false;
if( SysKeyboard->IsButtonPressed(Input::KEY_HOME) )
{ MouseCam = true; }
if( SysKeyboard->IsButtonPressed(Input::KEY_END))
{ MouseCam = false; }
Physics::PhysicsManager* PhysMan = static_cast<Physics::PhysicsManager*>( this->OneWorld->GetManager(ManagerBase::MT_PhysicsManager) );
if( SysKeyboard->IsButtonPressed(Input::KEY_BACKSLASH) )
{ PhysMan->SetTimeMultiplier(1.0); }
if( SysKeyboard->IsButtonPressed(Input::KEY_RIGHTBRACKET) ) {
Real Factor = PhysMan->GetTimeMultiplier() * 1.5;
if( Factor > 2.0 )
{ Factor = 2.0; }
PhysMan->SetTimeMultiplier(Factor);
}
if( SysKeyboard->IsButtonPressed(Input::KEY_LEFTBRACKET) ) {
Real Factor = PhysMan->GetTimeMultiplier() * .75;
if( Factor < 0.01 )
{ Factor = 0.01; }
PhysMan->SetTimeMultiplier(Factor);
}
Vector2 Offset = SysMouse->GetMouseDelta();
if( MouseCam && Vector2(0,0) != Offset )
CamControl->Rotate(Offset.X * 0.01,Offset.Y * 0.01,0);
if( SysKeyboard->IsButtonPressing(Input::KEY_M) || (Controller1 ? Controller1->IsButtonPressed(1) : false) ) {
Audio::iSound* Theme = Soundtrack.at(1);
if( !Theme->IsPlaying() ) {
Theme->Play();
}
}
if( SysKeyboard->IsButtonPressing(Input::KEY_N) || (Controller1 ? Controller1->IsButtonPressed(2) : false) ) {
Audio::iSound* Theme = Soundtrack.at(1);
if( Theme->IsPlaying() ) {
Theme->Stop();
}
}
// Audio test fun
if( SysKeyboard->IsButtonPressing(Input::KEY_T) ) {
static Boole Toggle = true;
Audio::iSound* Welcome = ( Announcer.size() >= 2 ? ( Toggle ? Announcer[1] : Announcer[0] ) : NULL );
if( Welcome != NULL ) {
if( Welcome->IsPlaying() ) {
Welcome->Stop();
}
Welcome->Play();
}
Toggle = !Toggle;
}
// Make a declaration for a static constrain so it survives the function lifetime
static Physics::Point2PointConstraint* Dragger = NULL;
if( SysMouse->IsButtonPressed(1) ) {
UI::UIManager* UIMan = UI::UIManager::GetSingletonPtr();
if( UIMan->MouseIsInUISystem() ) {
//UI::Screen* DScreen = UIMan->GetScreen("DefaultScreen");
UI::Widget* Hover = UIMan->GetHoveredWidget();
if(Hover) {
Hover = Hover->GetBottomMostHoveredWidget();
if( "D_Exit" == Hover->GetName() ) {
TheEntresol->BreakMainLoop();
}
}
}else{
Ray MouseRay = RayQueryTool::GetMouseRay();
RayCaster.GetFirstObjectOnRayByPolygon(MouseRay,Mezzanine::WO_RigidDebris);
bool firstframe=false;
if( 0 == RayCaster.LastQueryResultsObjectPtr() ) {
#ifdef MEZZDEBUG
//.........这里部分代码省略.........