mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Made GuiFadeinBitmapCtrl not only respond to mouse and keyboard events, but gamepad events as well, allowing gamepad inputs to skip opening splash pages
Ensured that guiGameListMenuCtrl adjusts values for rows marked as sliders via the left and right gamepad actions Corrected the button maps for look and move on the gamepad for the ExampleModule's default movement binds Fixed ExampleModule's default keybinds so alt+enter correctly toggles fullscreen Fixed joinServerMenu so it has a guiInputCtrl that can catch keybind events and pass them to the menuInputButtons Removed erroneous input consumption on OptionsMenuList Removed unneeded check against Graphics API list Flipped order of Anti Aliasing option to match ordering of the others Removed old, unneeded legacy option menu script files Added logic for message boxes to automatically return active MenuInputButton control to the holder before it was pushed Added fill color for the UI list gui profile so the sliders render more legibly
This commit is contained in:
parent
5b289bce5e
commit
5f95f9f8c0
15 changed files with 78 additions and 1518 deletions
|
|
@ -278,7 +278,7 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
|
|||
|
||||
bool isRowSelected = (getSelected() != NO_ROW) && (row == mRows[getSelected()]);
|
||||
bool isRowHighlighted = (getHighlighted() != NO_ROW) ? ((row == mRows[getHighlighted()]) && (row->mEnabled)) : false;
|
||||
if (profileHasArrows)
|
||||
/*if (profileHasArrows)
|
||||
{
|
||||
// render the left arrow
|
||||
bool arrowOnL = (isRowSelected || isRowHighlighted) && (row->mValue > row->mRange.x);
|
||||
|
|
@ -297,7 +297,7 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
|
|||
|
||||
drawer->clearBitmapModulation();
|
||||
drawer->drawBitmapStretchSR(profile->mTextureObject, RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
|
||||
}
|
||||
}*/
|
||||
|
||||
//Draw the slider bar
|
||||
if (row->mEnabled)
|
||||
|
|
@ -324,8 +324,8 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
|
|||
ColorI barOutlineColor;
|
||||
if (isRowSelected)
|
||||
{
|
||||
barColor = profile->mFillColorHL;
|
||||
barOutlineColor = profile->mFillColor;
|
||||
barColor = profile->mFillColor;
|
||||
barOutlineColor = profile->mFillColorSEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1161,10 +1161,22 @@ void GuiGameListMenuCtrl::changeOption(Row* row, S32 delta)
|
|||
}
|
||||
row->mSelectedOption = newSelection;
|
||||
|
||||
if (row->mMode == GuiGameListMenuCtrl::Row::Slider)
|
||||
{
|
||||
row->mValue += row->mStepSize * delta;
|
||||
|
||||
row->mValue = mRound(row->mValue / row->mStepSize) * row->mStepSize;
|
||||
|
||||
if (row->mValue < row->mRange.x)
|
||||
row->mValue = row->mRange.x;
|
||||
if (row->mValue > row->mRange.y)
|
||||
row->mValue = row->mRange.y;
|
||||
}
|
||||
|
||||
static StringTableEntry LEFT = StringTable->insert("LEFT", true);
|
||||
static StringTableEntry RIGHT = StringTable->insert("RIGHT", true);
|
||||
|
||||
if (row->mScriptCallback != NULL && row->mSelectedOption != NO_OPTION)
|
||||
if (row->mScriptCallback != NULL && (row->mSelectedOption != NO_OPTION && row->mMode != GuiGameListMenuCtrl::Row::Slider))
|
||||
{
|
||||
setThisControl();
|
||||
StringTableEntry direction = NULL;
|
||||
|
|
@ -1714,9 +1726,6 @@ void GuiGameListMenuProfile::initPersistFields()
|
|||
|
||||
removeField("modal");
|
||||
removeField("opaque");
|
||||
removeField("fillColor");
|
||||
removeField("fillColorHL");
|
||||
removeField("fillColorNA");
|
||||
removeField("border");
|
||||
removeField("borderThickness");
|
||||
removeField("borderColor");
|
||||
|
|
|
|||
|
|
@ -132,6 +132,12 @@ bool GuiFadeinBitmapCtrl::onKeyDown(const GuiEvent &)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool GuiFadeinBitmapCtrl::onGamepadButtonDown(const GuiEvent& event)
|
||||
{
|
||||
click_callback();
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool GuiFadeinBitmapCtrl::onWake()
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ class GuiFadeinBitmapCtrl : public GuiBitmapCtrl
|
|||
virtual void onPreRender();
|
||||
virtual void onMouseDown(const GuiEvent &);
|
||||
virtual bool onKeyDown(const GuiEvent &);
|
||||
virtual bool onGamepadButtonDown(const GuiEvent& event);
|
||||
virtual bool onWake();
|
||||
virtual void onRender(Point2I offset, const RectI &updateRect);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue