mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
graphic_settings: add scroll wraparound option
This makes the scroll wraparound option available in both games' graphics dialogs. TR1's dialog is also updated to allow scrolling until such times as it's moved to the new UI framework. Resolves #2834.
This commit is contained in:
parent
3030d694a5
commit
0245409890
7 changed files with 41 additions and 0 deletions
|
@ -369,6 +369,7 @@
|
|||
"DETAIL_TITLE": "Graphic Options",
|
||||
"DETAIL_TRAPEZOID_FILTER": "Trapezoid filter",
|
||||
"DETAIL_UI_BAR_SCALE": "UI bar scale",
|
||||
"DETAIL_UI_SCROLL_WRAPAROUND": "UI scroll wrap",
|
||||
"DETAIL_UI_TEXT_SCALE": "UI text scale",
|
||||
"DETAIL_VSYNC": "VSync",
|
||||
"DETAIL_WATER_COLOR_B": "Water color (B)",
|
||||
|
|
|
@ -496,6 +496,7 @@
|
|||
"DETAIL_TITLE": "Graphic Options",
|
||||
"DETAIL_TRAPEZOID_FILTER": "Trapezoid filter",
|
||||
"DETAIL_UI_BAR_SCALE": "UI bar scale",
|
||||
"DETAIL_UI_SCROLL_WRAPAROUND": "UI scroll wrap",
|
||||
"DETAIL_UI_TEXT_SCALE": "UI text scale",
|
||||
"DETAIL_USE_PSX_FOV": "Use PSX FOV",
|
||||
"DETAIL_WATER_COLOR_B": "Water color (B)",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
- added support for a hex water color notation (eg. `#80FFFF`) in the game flow file
|
||||
- added support for antitriggers, like TR2+ (#2580)
|
||||
- added support for aspect ratio-specific images (#1840)
|
||||
- added an option to wraparound when scrolling UI dialogs, such as save/load (#2834)
|
||||
- changed the `draw_distance_min` and `draw_distance_max` to `fog_start` and `fog_end`
|
||||
- changed `Select Detail` dialog title to `Graphic Options`
|
||||
- changed the number of static mesh slots from 50 to 256 (#2734)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr2-1.0...develop) - ××××-××-××
|
||||
- added an option to wraparound when scrolling UI dialogs, such as save/load (#2834)
|
||||
- fixed the selected keyboard/controller layout not being saved (#2830, regression from 1.0)
|
||||
- fixed toggling the PSX FOV option not having an immediate effect (#2831, regression from 1.0)
|
||||
- fixed changing the aspect ratio not updating the current background image (#2832, regression from 1.0)
|
||||
|
|
|
@ -150,5 +150,6 @@ GS_DEFINE(DETAIL_TRAPEZOID_FILTER, "Trapezoid filter")
|
|||
GS_DEFINE(DETAIL_RENDER_MODE, "Render mode")
|
||||
GS_DEFINE(DETAIL_UI_TEXT_SCALE, "UI text scale")
|
||||
GS_DEFINE(DETAIL_UI_BAR_SCALE, "UI bar scale")
|
||||
GS_DEFINE(DETAIL_UI_SCROLL_WRAPAROUND, "UI scroll wrap")
|
||||
GS_DEFINE(PAGINATION_NAV, "%d / %d")
|
||||
GS_DEFINE(MISC_EMPTY_SLOT_FMT, "- EMPTY SLOT -")
|
||||
|
|
|
@ -50,6 +50,7 @@ typedef enum {
|
|||
OPTION_BRIGHTNESS,
|
||||
OPTION_UI_TEXT_SCALE,
|
||||
OPTION_UI_BAR_SCALE,
|
||||
OPTION_UI_SCROLL_WRAPAROUND,
|
||||
OPTION_RENDER_MODE,
|
||||
OPTION_RESOLUTION,
|
||||
OPTION_TRAPEZOID_FILTER,
|
||||
|
@ -95,6 +96,8 @@ static const GRAPHICS_OPTION_ROW m_GfxOptionRows[] = {
|
|||
GS_ID(DETAIL_FLOAT_FMT) },
|
||||
{ OPTION_UI_BAR_SCALE, GS_ID(DETAIL_UI_BAR_SCALE),
|
||||
GS_ID(DETAIL_FLOAT_FMT) },
|
||||
{ OPTION_UI_SCROLL_WRAPAROUND, GS_ID(DETAIL_UI_SCROLL_WRAPAROUND),
|
||||
GS_ID(MISC_ON) },
|
||||
{ OPTION_RENDER_MODE, GS_ID(DETAIL_RENDER_MODE), GS_ID(DETAIL_STRING_FMT) },
|
||||
{ OPTION_RESOLUTION, GS_ID(DETAIL_RESOLUTION),
|
||||
GS_ID(DETAIL_RESOLUTION_FMT) },
|
||||
|
@ -177,6 +180,8 @@ static void M_MenuUp(void)
|
|||
}
|
||||
m_GraphicsMenu.cur_option--;
|
||||
M_UpdateText();
|
||||
} else if (g_Config.ui.enable_wraparound) {
|
||||
M_Reinitialize(m_GfxOptionRows[OPTION_NUMBER_OF - 1].option_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,6 +196,8 @@ static void M_MenuDown(void)
|
|||
}
|
||||
m_GraphicsMenu.cur_option++;
|
||||
M_UpdateText();
|
||||
} else if (g_Config.ui.enable_wraparound) {
|
||||
M_Reinitialize(m_GfxOptionRows[0].option_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,6 +330,10 @@ static void M_UpdateArrows(
|
|||
m_HideArrowLeft = g_Config.ui.bar_scale <= CONFIG_MIN_BAR_SCALE;
|
||||
m_HideArrowRight = g_Config.ui.bar_scale >= CONFIG_MAX_BAR_SCALE;
|
||||
break;
|
||||
case OPTION_UI_SCROLL_WRAPAROUND:
|
||||
m_HideArrowLeft = !g_Config.ui.enable_wraparound;
|
||||
m_HideArrowRight = g_Config.ui.enable_wraparound;
|
||||
break;
|
||||
case OPTION_RENDER_MODE:
|
||||
local_right_arrow_offset = RIGHT_ARROW_OFFSET_MAX;
|
||||
m_HideArrowLeft = false;
|
||||
|
@ -483,6 +494,11 @@ static void M_ChangeTextOption(
|
|||
Text_ChangeText(value_text, buf);
|
||||
break;
|
||||
|
||||
case OPTION_UI_SCROLL_WRAPAROUND:
|
||||
bool is_enabled = g_Config.ui.enable_wraparound;
|
||||
Text_ChangeText(value_text, is_enabled ? GS(MISC_ON) : GS(MISC_OFF));
|
||||
break;
|
||||
|
||||
case OPTION_RENDER_MODE:
|
||||
sprintf(
|
||||
buf, GS(DETAIL_STRING_FMT),
|
||||
|
@ -636,6 +652,13 @@ void Option_Graphics_Control(INVENTORY_ITEM *inv_item, const bool is_busy)
|
|||
reset = OPTION_UI_BAR_SCALE;
|
||||
break;
|
||||
|
||||
case OPTION_UI_SCROLL_WRAPAROUND:
|
||||
if (!g_Config.ui.enable_wraparound) {
|
||||
g_Config.ui.enable_wraparound = true;
|
||||
reset = OPTION_UI_SCROLL_WRAPAROUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case OPTION_RENDER_MODE:
|
||||
if (g_Config.rendering.render_mode == GFX_RM_LEGACY) {
|
||||
g_Config.rendering.render_mode = GFX_RM_FRAMEBUFFER;
|
||||
|
@ -766,6 +789,13 @@ void Option_Graphics_Control(INVENTORY_ITEM *inv_item, const bool is_busy)
|
|||
reset = OPTION_UI_BAR_SCALE;
|
||||
break;
|
||||
|
||||
case OPTION_UI_SCROLL_WRAPAROUND:
|
||||
if (g_Config.ui.enable_wraparound) {
|
||||
g_Config.ui.enable_wraparound = false;
|
||||
reset = OPTION_UI_SCROLL_WRAPAROUND;
|
||||
}
|
||||
break;
|
||||
|
||||
case OPTION_RENDER_MODE:
|
||||
if (g_Config.rendering.render_mode == GFX_RM_LEGACY) {
|
||||
g_Config.rendering.render_mode = GFX_RM_FRAMEBUFFER;
|
||||
|
|
|
@ -219,6 +219,12 @@ static const M_OPTION m_Options[] = {
|
|||
.delta_fast = 10,
|
||||
},
|
||||
|
||||
{
|
||||
.option_type = COT_BOOL,
|
||||
.label_id = GS_ID(DETAIL_UI_SCROLL_WRAPAROUND),
|
||||
.target = &g_Config.ui.enable_wraparound,
|
||||
},
|
||||
|
||||
{
|
||||
.option_type = COT_INT32,
|
||||
.label_id = GS_ID(DETAIL_SCALER),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue