Updated version of OTHGMars' updated window and resolution options modes.

Additional changes include disabling certain options when they are not valid(ie, resolution is disabled when in borderless mode)
This commit is contained in:
Areloch 2020-09-20 02:06:15 -05:00
parent d76c73c252
commit 26ef40950b
12 changed files with 559 additions and 152 deletions

View file

@ -533,6 +533,14 @@ void GuiGameListMenuCtrl::addRow(const char* label, const char* bitmapName, cons
addRow(row, label, callback, icon, yPad, true, enabled, Row::Mode::Keybind, tooltip);
}
void GuiGameListMenuCtrl::removeRow(const S32& row)
{
if (row == -1 || row >= mRows.size())
return;
mRows.erase(row);
}
Point2I GuiGameListMenuCtrl::getMinExtent() const
{
Point2I parentMin = Parent::getMinExtent();
@ -1521,6 +1529,12 @@ DefineEngineMethod(GuiGameListMenuCtrl, addKeybindRow, void,
object->addRow(label, bitmapName, callback, icon, yPad, enabled, tooltip);
}
DefineEngineMethod(GuiGameListMenuCtrl, removeRow, void, (S32 row),,
"Removes the row at the provided index")
{
object->removeRow(row);
}
DefineEngineMethod(GuiGameListMenuCtrl, getCurrentOption, const char*, (S32 row), ,
"Gets the text for the currently selected option of the given row.\n\n"
"@param row Index of the row to get the option from.\n"