mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
corrects PopupMenu::checkItem() not checking the item. also prepends m to member variables for the MenuItem class to correct a few more locals hiding classvar reports.
This commit is contained in:
parent
0a09aaba2e
commit
9141d37ca2
4 changed files with 91 additions and 85 deletions
|
|
@ -100,7 +100,7 @@ GuiPopupMenuTextListCtrl::GuiPopupMenuTextListCtrl()
|
|||
void GuiPopupMenuTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver)
|
||||
{
|
||||
//check if we're a real entry, or if it's a divider
|
||||
if (mPopup->mMenuItems[cell.y].isSpacer)
|
||||
if (mPopup->mMenuItems[cell.y].mIsSpacer)
|
||||
{
|
||||
S32 yp = offset.y + mCellSize.y / 2;
|
||||
GFX->getDrawUtil()->drawLine(offset.x + 5, yp, offset.x + mCellSize.x - 5, yp, ColorI(128, 128, 128));
|
||||
|
|
@ -214,8 +214,8 @@ void GuiPopupMenuTextListCtrl::onMouseUp(const GuiEvent &event)
|
|||
|
||||
if (item)
|
||||
{
|
||||
if (item->enabled)
|
||||
dAtob(Con::executef(mPopup, "onSelectItem", Con::getIntArg(getSelectedCell().y), item->text.isNotEmpty() ? item->text : ""));
|
||||
if (item->mEnabled)
|
||||
dAtob(Con::executef(mPopup, "onSelectItem", Con::getIntArg(getSelectedCell().y), item->mText.isNotEmpty() ? item->mText : ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -247,9 +247,9 @@ void GuiPopupMenuTextListCtrl::onCellHighlighted(Point2I cell)
|
|||
{
|
||||
MenuItem *list = &mPopup->mMenuItems[selectionIndex];
|
||||
|
||||
if (list->isSubmenu && list->subMenu != nullptr)
|
||||
if (list->mIsSubmenu && list->mSubMenu != nullptr)
|
||||
{
|
||||
list->subMenu->showPopup(getRoot(), getPosition().x + mCellSize.x, getPosition().y + (selectionIndex * mCellSize.y));
|
||||
list->mSubMenu->showPopup(getRoot(), getPosition().x + mCellSize.x, getPosition().y + (selectionIndex * mCellSize.y));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue