本文整理汇总了C++中cegui::Window::isDisabled方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::isDisabled方法的具体用法?C++ Window::isDisabled怎么用?C++ Window::isDisabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::Window
的用法示例。
在下文中一共展示了Window::isDisabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnEventKeyDown
bool TabNavigation::OnEventKeyDown(const CEGUI::EventArgs& e)
{
const CEGUI::KeyEventArgs& args = static_cast<const CEGUI::KeyEventArgs&>(e);
if (args.scancode == CEGUI::Key::Tab) // Tab or Shift+Tab
{
WidgetList::iterator itCurrent = Containers::find(mTabOrder.begin(), mTabOrder.end(), args.window);
OC_ASSERT(itCurrent != mTabOrder.end());
WidgetList::iterator itFocus = itCurrent;
CEGUI::Window* newWidget = 0;
do
{
if (args.sysKeys & CEGUI::Shift)
{
// Set previous
if (itFocus == mTabOrder.begin())
itFocus = mTabOrder.end();
--itFocus;
}
else
{
// Set next
++itFocus;
if (itFocus == mTabOrder.end())
itFocus = mTabOrder.begin();
}
newWidget = *itFocus;
}
while ((!newWidget->isVisible() || newWidget->isDisabled() || newWidget->getProperty("ReadOnly") == "True" ) && itFocus != itCurrent);
newWidget->activate();
// Make sure active widget will be visible
if (mScrollablePane)
{
CEGUI::Window* w = newWidget;
CEGUI::Vector2 widgetOffset(0, 0);
do
{
widgetOffset += w->getPosition().asAbsolute(w->getParentPixelSize());
w = w->getParent();
}
while (w != mScrollablePane && w != 0);
float32 scrollViewTop = mScrollablePane->getContentPaneArea().getSize().d_height * mScrollablePane->getVerticalScrollPosition();
float32 scrollViewBottom = scrollViewTop + mScrollablePane->getClipRect().getHeight();
if (widgetOffset.d_y < scrollViewTop || widgetOffset.d_y + newWidget->getPixelSize().d_height > scrollViewBottom)
{
// We need to scroll
mScrollablePane->setVerticalScrollPosition(widgetOffset.d_y / mScrollablePane->getContentPaneArea().getSize().d_height);
}
}
return true;
}
return false;
}
示例2: handleMineButtonDown
/************************************************************************
Handle click on a mine button (any mouse button)
************************************************************************/
bool MinesweeperSample::handleMineButtonDown(const CEGUI::EventArgs& event)
{
const CEGUI::MouseEventArgs& me = static_cast<const CEGUI::MouseEventArgs&>(event);
if (me.button == CEGUI::RightButton)
{
CEGUI::Window* button = me.window;
if (!button->isDisabled())
{
if (button->getID() == 0)
{
button->setID(1);
button->setText("F");
}
else
{
button->setID(0);
button->setText("");
}
return true;
}
}
return false;
}