Rename UI Scale Mode to UI Alignment Mode

This commit is contained in:
Hyper 2025-02-08 12:09:15 +00:00
parent e3ac47a797
commit d696524dbf
10 changed files with 22 additions and 22 deletions

View File

@ -530,7 +530,7 @@ BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/op
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/time_of_day_transition_playstation.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/time_of_day_transition_playstation.dds" ARRAY_NAME "g_time_of_day_transition_playstation" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/transparency_antialiasing_false.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/transparency_antialiasing_false.dds" ARRAY_NAME "g_transparency_antialiasing_false" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/transparency_antialiasing_true.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/transparency_antialiasing_true.dds" ARRAY_NAME "g_transparency_antialiasing_true" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/ui_scale_mode.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/ui_scale_mode.dds" ARRAY_NAME "g_ui_scale_mode" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/ui_alignment_mode.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/ui_alignment_mode.dds" ARRAY_NAME "g_ui_alignment_mode" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vertical_camera.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vertical_camera.dds" ARRAY_NAME "g_vertical_camera" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/voice_language.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/voice_language.dds" ARRAY_NAME "g_voice_language" COMPRESSION_TYPE "zstd")
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/options_menu/thumbnails/vibration.dds" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/options_menu/thumbnails/vibration.dds" ARRAY_NAME "g_vibration" COMPRESSION_TYPE "zstd")

View File

@ -367,18 +367,18 @@ CONFIG_DEFINE_ENUM_LOCALE(ECutsceneAspectRatio)
}
};
CONFIG_DEFINE_LOCALE(UIScaleMode)
CONFIG_DEFINE_LOCALE(UIAlignmentMode)
{
{ ELanguage::English, { "UI Scale Mode", "Change how the UI scales to the display." } }
{ ELanguage::English, { "UI Alignment Mode", "Change how the UI aligns with the display." } }
};
CONFIG_DEFINE_ENUM_LOCALE(EUIScaleMode)
CONFIG_DEFINE_ENUM_LOCALE(EUIAlignmentMode)
{
{
ELanguage::English,
{
{ EUIScaleMode::Edge, { "EDGE", "Edge: the UI will anchor to the edges of the display." } },
{ EUIScaleMode::Centre, { "CENTER", "Center: the UI will anchor to the center of the display." } },
{ EUIAlignmentMode::Edge, { "EDGE", "Edge: the UI will align with the edges of the display." } },
{ EUIAlignmentMode::Centre, { "CENTER", "Center: the UI will align with the center of the display." } },
}
}
};

View File

@ -273,7 +273,7 @@ PPC_FUNC(sub_8258B558)
ctx.f1.f64 = offsetX + g_aspectRatioNarrowScale * 140.0f;
ctx.f2.f64 = offsetY;
if (Config::UIScaleMode == EUIScaleMode::Edge && g_aspectRatioNarrowScale >= 1.0f)
if (Config::UIAlignmentMode == EUIAlignmentMode::Edge && g_aspectRatioNarrowScale >= 1.0f)
ctx.f1.f64 += g_aspectRatioOffsetX / g_aspectRatioScale;
sub_830BB3D0(ctx, base);
@ -295,7 +295,7 @@ PPC_FUNC(sub_8258B558)
if (textBox != NULL)
{
float value = 708.0f + g_aspectRatioNarrowScale * 140.0f;
if (Config::UIScaleMode == EUIScaleMode::Edge && g_aspectRatioNarrowScale >= 1.0f)
if (Config::UIAlignmentMode == EUIAlignmentMode::Edge && g_aspectRatioNarrowScale >= 1.0f)
value += g_aspectRatioOffsetX / g_aspectRatioScale;
PPC_STORE_U32(textBox + 0x38, reinterpret_cast<uint32_t&>(value));
@ -917,7 +917,7 @@ static void Draw(PPCContext& ctx, uint8_t* base, PPCFunc* original, uint32_t str
return;
}
if (Config::UIScaleMode == EUIScaleMode::Centre)
if (Config::UIAlignmentMode == EUIAlignmentMode::Centre)
{
if (g_aspectRatio >= WIDE_ASPECT_RATIO)
modifier.flags &= ~(ALIGN_LEFT | ALIGN_RIGHT);
@ -1274,12 +1274,12 @@ static double ComputeObjGetItemX(uint32_t type)
double scaleOffset = (1280.0 * (1.0 - g_aspectRatioGameplayScale)) * g_aspectRatioScale;
if (Config::UIScaleMode == EUIScaleMode::Edge)
if (Config::UIAlignmentMode == EUIAlignmentMode::Edge)
{
if (type != 47) // Medal
x += g_aspectRatioOffsetX * 2.0 + scaleOffset;
}
else if (Config::UIScaleMode == EUIScaleMode::Centre)
else if (Config::UIAlignmentMode == EUIAlignmentMode::Centre)
{
x += g_aspectRatioOffsetX + scaleOffset;
}

View File

@ -1,4 +1,4 @@
VERSION_MILESTONE="Beta 1"
VERSION_MILESTONE="Beta 2"
VERSION_MAJOR=1
VERSION_MINOR=0
VERSION_REVISION=0

View File

@ -1226,7 +1226,7 @@ static void DrawConfigOptions()
DrawConfigOption(rowCount++, yOffset, &Config::MotionBlur, true);
DrawConfigOption(rowCount++, yOffset, &Config::XboxColorCorrection, true);
DrawConfigOption(rowCount++, yOffset, &Config::CutsceneAspectRatio, true);
DrawConfigOption(rowCount++, yOffset, &Config::UIScaleMode, true);
DrawConfigOption(rowCount++, yOffset, &Config::UIAlignmentMode, true);
break;
}

View File

@ -39,7 +39,7 @@
#include <res/images/options_menu/thumbnails/time_of_day_transition_playstation.dds.h>
#include <res/images/options_menu/thumbnails/transparency_antialiasing_false.dds.h>
#include <res/images/options_menu/thumbnails/transparency_antialiasing_true.dds.h>
#include <res/images/options_menu/thumbnails/ui_scale_mode.dds.h>
#include <res/images/options_menu/thumbnails/ui_alignment_mode.dds.h>
#include <res/images/options_menu/thumbnails/vertical_camera.dds.h>
#include <res/images/options_menu/thumbnails/voice_language.dds.h>
#include <res/images/options_menu/thumbnails/vibration.dds.h>
@ -112,7 +112,7 @@ void LoadThumbnails()
g_motionBlurThumbnails[EMotionBlur::Enhanced] = LOAD_ZSTD_TEXTURE(g_motion_blur_enhanced);
g_configThumbnails[&Config::XboxColorCorrection] = LOAD_ZSTD_TEXTURE(g_xbox_color_correction);
g_configThumbnails[&Config::UIScaleMode] = LOAD_ZSTD_TEXTURE(g_ui_scale_mode);
g_configThumbnails[&Config::UIAlignmentMode] = LOAD_ZSTD_TEXTURE(g_ui_alignment_mode);
}
template<typename T>

View File

@ -376,11 +376,11 @@ CONFIG_DEFINE_ENUM_TEMPLATE(ECutsceneAspectRatio)
{ "Unlocked", ECutsceneAspectRatio::Unlocked }
};
CONFIG_DEFINE_ENUM_TEMPLATE(EUIScaleMode)
CONFIG_DEFINE_ENUM_TEMPLATE(EUIAlignmentMode)
{
{ "Edge", EUIScaleMode::Edge },
{ "Centre", EUIScaleMode::Centre },
{ "Center", EUIScaleMode::Centre }
{ "Edge", EUIAlignmentMode::Edge },
{ "Centre", EUIAlignmentMode::Centre },
{ "Center", EUIAlignmentMode::Centre }
};
#undef CONFIG_DEFINE

View File

@ -138,7 +138,7 @@ enum class ECutsceneAspectRatio : uint32_t
Unlocked
};
enum class EUIScaleMode : uint32_t
enum class EUIAlignmentMode : uint32_t
{
Edge,
Centre

View File

@ -96,7 +96,7 @@ CONFIG_DEFINE_ENUM("Video", EDepthOfFieldQuality, DepthOfFieldQuality, EDepthOfF
CONFIG_DEFINE_ENUM_LOCALISED("Video", EMotionBlur, MotionBlur, EMotionBlur::Original);
CONFIG_DEFINE_LOCALISED("Video", bool, XboxColorCorrection, false);
CONFIG_DEFINE_ENUM_LOCALISED("Video", ECutsceneAspectRatio, CutsceneAspectRatio, ECutsceneAspectRatio::Original);
CONFIG_DEFINE_ENUM_LOCALISED("Video", EUIScaleMode, UIScaleMode, EUIScaleMode::Edge);
CONFIG_DEFINE_ENUM_LOCALISED("Video", EUIAlignmentMode, UIAlignmentMode, EUIAlignmentMode::Edge);
CONFIG_DEFINE_HIDDEN("Exports", bool, AllowCancellingUnleash, false);
CONFIG_DEFINE_HIDDEN("Exports", bool, DisableAutoSaveWarning, false);

@ -1 +1 @@
Subproject commit 1ec18c1385ccf7d00eb7f9ffe697936e78b21fe4
Subproject commit 3a852c76e537f0cb9103aefae928a564d61378e6