本文整理汇总了C++中cegui::PushButton::isDisabled方法的典型用法代码示例。如果您正苦于以下问题:C++ PushButton::isDisabled方法的具体用法?C++ PushButton::isDisabled怎么用?C++ PushButton::isDisabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cegui::PushButton
的用法示例。
在下文中一共展示了PushButton::isDisabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: boardDiscover
bool MinesweeperSample::boardDiscover(const Location& loc)
{
CEGUI::PushButton* btn = d_buttons[loc.d_row][loc.d_col];
if (btn->isDisabled() || btn->getID() > 0)
return true;
if (d_board[loc.d_row][loc.d_col] > 8)
return false;
d_buttons[loc.d_row][loc.d_col]->setText(CEGUI::PropertyHelper<CEGUI::uint>::toString(d_board[loc.d_row][loc.d_col]));
d_buttons[loc.d_row][loc.d_col]->setEnabled(false);
++d_boardCellDiscovered;
// Discover surrounding case
if (d_board[loc.d_row][loc.d_col] == 0)
{
Location l;
if (loc.d_row > 0)
{
l.d_row = loc.d_row - 1;
if ( loc.d_col > 0)
{
l.d_col = loc.d_col - 1;
boardDiscover(l);
}
l.d_col = loc.d_col;
boardDiscover(l);
if ( loc.d_col < MinesweeperSize - 1)
{
l.d_col = loc.d_col + 1;
boardDiscover(l);
}
}
l.d_row = loc.d_row;
if ( loc.d_col > 0)
{
l.d_col = loc.d_col - 1;
boardDiscover(l);
}
if ( loc.d_col < MinesweeperSize - 1)
{
l.d_col = loc.d_col + 1;
boardDiscover(l);
}
if (loc.d_row < MinesweeperSize - 1)
{
l.d_row = loc.d_row + 1;
if ( loc.d_col > 0)
{
l.d_col = loc.d_col - 1;
boardDiscover(l);
}
l.d_col = loc.d_col;
boardDiscover(l);
if ( loc.d_col < MinesweeperSize - 1)
{
l.d_col = loc.d_col + 1;
boardDiscover(l);
}
}
}
return true;
}