- Am I the only one who thinks that static_casts can create really clunky code? (Thanks, GCC, for your overly paranoid warning settings that necessitate such ugliness. :( )
SVN r2844 (trunk)
This commit is contained in:
parent
15d74dab56
commit
16fa8cc249
7 changed files with 18 additions and 15 deletions
|
|
@ -392,13 +392,14 @@ void DOptionMenu::Drawer ()
|
|||
for (i = 0; i < mDesc->mItems.Size() && y <= lastrow; i++, y += fontheight)
|
||||
{
|
||||
// Don't scroll the uppermost items
|
||||
if (i == static_cast<unsigned int> (mDesc->mScrollTop))
|
||||
if ((int)i == mDesc->mScrollTop)
|
||||
{
|
||||
i += mDesc->mScrollPos;
|
||||
if (i >= mDesc->mItems.Size()) break; // skipped beyond end of menu
|
||||
}
|
||||
int cur_indent = mDesc->mItems[i]->Draw(mDesc, y, indent, static_cast<unsigned int> (mDesc->mSelectedItem) == i);
|
||||
if (cur_indent >= 0 && static_cast<unsigned int> (mDesc->mSelectedItem) == i && mDesc->mItems[i]->Selectable())
|
||||
bool isSelected = mDesc->mSelectedItem == (int)i;
|
||||
int cur_indent = mDesc->mItems[i]->Draw(mDesc, y, indent, isSelected);
|
||||
if (cur_indent >= 0 && isSelected && mDesc->mItems[i]->Selectable())
|
||||
{
|
||||
if (((DMenu::MenuTime%8) < 6) || DMenu::CurrentMenu != this)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue