mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- removed useless conditions from options menu
This commit is contained in:
parent
526a576d89
commit
31ebeaf833
1 changed files with 8 additions and 11 deletions
|
@ -123,7 +123,7 @@ class OptionMenu : Menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDesc != NULL && mDesc.mSelectedItem == -1) mDesc.mSelectedItem = FirstSelectable();
|
if (mDesc.mSelectedItem == -1) mDesc.mSelectedItem = FirstSelectable();
|
||||||
mDesc.CalcIndent();
|
mDesc.CalcIndent();
|
||||||
|
|
||||||
// notify all items that the menu was just created.
|
// notify all items that the menu was just created.
|
||||||
|
@ -158,8 +158,6 @@ class OptionMenu : Menu
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
int FirstSelectable()
|
int FirstSelectable()
|
||||||
{
|
|
||||||
if (mDesc != NULL)
|
|
||||||
{
|
{
|
||||||
// Go down to the first selectable item
|
// Go down to the first selectable item
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
@ -169,8 +167,7 @@ class OptionMenu : Menu
|
||||||
}
|
}
|
||||||
while (i < mDesc.mItems.Size() && !mDesc.mItems[i].Selectable());
|
while (i < mDesc.mItems.Size() && !mDesc.mItems[i].Selectable());
|
||||||
if (i>=0 && i < mDesc.mItems.Size()) return i;
|
if (i>=0 && i < mDesc.mItems.Size()) return i;
|
||||||
}
|
else return -1;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
Loading…
Reference in a new issue