mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
[WIP] Fixed jp lang and UIWidgets
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+138
-349
File diff suppressed because it is too large
Load Diff
@@ -135,15 +135,8 @@ void print_generic_string(s16 x, s16 y, const u8 *str);
|
||||
void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str);
|
||||
void print_menu_generic_string(s16 x, s16 y, const u8 *str);
|
||||
void handle_menu_scrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8 maxIndex);
|
||||
#if defined(VERSION_US) || defined(VERSION_EU)
|
||||
s16 get_str_x_pos_from_center(s16 centerPos, u8 *str, f32 scale);
|
||||
#endif
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
#define get_str_x_pos_from_center get_str_x_pos_from_center_scale
|
||||
#endif
|
||||
#if defined(VERSION_JP) || defined(VERSION_EU) || defined(VERSION_SH)
|
||||
s16 get_str_x_pos_from_center_scale(s16 centerPos, u8 *str, f32 scale);
|
||||
#endif
|
||||
void print_hud_my_score_coins(s32 useCourseCoinScore, s8 fileIndex, s8 courseIndex, s16 x, s16 y);
|
||||
void int_to_str(s32 num, u8 *dst);
|
||||
s16 get_dialog_id(void);
|
||||
|
||||
@@ -62,6 +62,10 @@ s32 run_level_id_or_demo(s32 level) {
|
||||
// start the Mario demo animation for the demo list.
|
||||
void* data = ResourceGetDataByName(gDemoInputs[gDemoInputListID]);
|
||||
|
||||
if(data == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// if the next demo sequence ID is the count limit, reset it back to
|
||||
// the first sequence.
|
||||
// TODO: Remove this to check for gDemoInput size instead
|
||||
|
||||
@@ -232,9 +232,9 @@ void DrawSettingsMenu(){
|
||||
#else
|
||||
bool matchingRefreshRate =
|
||||
CVarGetInteger("gMatchRefreshRate", 0) && LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() != LUS::WindowBackend::DX11;
|
||||
UIWidgets::PaddedEnhancementSliderInt(
|
||||
(currentFps == 20) ? "FPS: Original (20)" : "FPS: %d",
|
||||
"##FPSInterpolation", "gInterpolationFPS", minFps, maxFps, "", 20, true, true, false, matchingRefreshRate);
|
||||
UIWidgets::CVarSliderInt((currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", "gInterpolationFPS", minFps, maxFps, 1, {
|
||||
.disabled = matchingRefreshRate
|
||||
});
|
||||
#endif
|
||||
if (LUS::Context::GetInstance()->GetWindow()->GetWindowBackend() == LUS::WindowBackend::DX11) {
|
||||
UIWidgets::Tooltip(
|
||||
@@ -471,7 +471,7 @@ void GameMenuBar::DrawElement() {
|
||||
DrawCheatsMenu();
|
||||
|
||||
ImGui::SetCursorPosY(0.0f);
|
||||
|
||||
|
||||
DrawDebugMenu();
|
||||
|
||||
ImGui::EndMenuBar();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#include <ImGui/imgui_internal.h>
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
#include "Utils/StringHelper.h"
|
||||
#include <libultraship/libultra/types.h>
|
||||
|
||||
namespace UIWidgets {
|
||||
@@ -318,7 +318,7 @@ namespace UIWidgets {
|
||||
changed = true;
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
|
||||
if (PlusMinusButton) {
|
||||
std::string PlusBTNName = " + ##" + std::string(cvarName);
|
||||
ImGui::SameLine();
|
||||
@@ -390,7 +390,7 @@ namespace UIWidgets {
|
||||
changed = true;
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
|
||||
if (PlusMinusButton) {
|
||||
std::string PlusBTNName = " + ##" + std::string(cvarName);
|
||||
ImGui::SameLine();
|
||||
@@ -474,7 +474,7 @@ namespace UIWidgets {
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%s", text);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -709,7 +709,8 @@ namespace UIWidgets {
|
||||
ImGui::PushID(label);
|
||||
bool dirty = false;
|
||||
float startX = ImGui::GetCursorPosX();
|
||||
const char* invisibleLabel = ("##" + std::string(label)).c_str();
|
||||
auto format = StringHelper::Sprintf("##%s", label);
|
||||
const char* invisibleLabel = format.c_str();
|
||||
ImGui::BeginDisabled(options.disabled);
|
||||
PushStyleCheckbox(options.color);
|
||||
if (options.alignment == ComponentAlignment::Right) {
|
||||
|
||||
Reference in New Issue
Block a user