mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- added a DrawSelector hook to the customizer.
This commit is contained in:
parent
06b00887f5
commit
a7035a932f
3 changed files with 17 additions and 1 deletions
|
@ -29,6 +29,12 @@ class MenuCustomizerBlood : MenuCustomize
|
||||||
int h = texid.isValid()? texsize.Y : fonth;
|
int h = texid.isValid()? texsize.Y : fonth;
|
||||||
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override bool DrawSelector(ListMenuDescriptor desc)
|
||||||
|
{
|
||||||
|
return true; // do not draw any selector.
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -268,7 +268,10 @@ class ListMenu : Menu
|
||||||
if (mDesc.mItems[i].mEnabled) mDesc.mItems[i].Draw(mDesc.mSelectedItem == i, mDesc);
|
if (mDesc.mItems[i].mEnabled) mDesc.mItems[i].Draw(mDesc.mSelectedItem == i, mDesc);
|
||||||
}
|
}
|
||||||
if (mDesc.mSelectedItem >= 0 && mDesc.mSelectedItem < mDesc.mItems.Size())
|
if (mDesc.mSelectedItem >= 0 && mDesc.mSelectedItem < mDesc.mItems.Size())
|
||||||
mDesc.mItems[mDesc.mSelectedItem].DrawSelector(mDesc.mSelectOfsX, mDesc.mSelectOfsY, mDesc.mSelector, mDesc);
|
{
|
||||||
|
if (!menuCustomizer.DrawSelector(mDesc))
|
||||||
|
mDesc.mItems[mDesc.mSelectedItem].DrawSelector(mDesc.mSelectOfsX, mDesc.mSelectOfsY, mDesc.mSelector, mDesc);
|
||||||
|
}
|
||||||
Super.Drawer();
|
Super.Drawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,11 @@ class MenuCustomize
|
||||||
screen.DrawText(fnt, OptionMenuSettings.mTitleColor, (screen.GetWidth() - fnt.StringWidth(title) * CleanXfac_1) / 2, 10 * CleanYfac_1, title, DTA_CleanNoMove_1, true);
|
screen.DrawText(fnt, OptionMenuSettings.mTitleColor, (screen.GetWidth() - fnt.StringWidth(title) * CleanXfac_1) / 2, 10 * CleanYfac_1, title, DTA_CleanNoMove_1, true);
|
||||||
return (y + fnt.GetHeight()) * CleanYfac_1; // return is spacing in screen pixels.
|
return (y + fnt.GetHeight()) * CleanYfac_1; // return is spacing in screen pixels.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool DrawSelector(ListMenuDescriptor desc)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue