Removes size requirement on view_world check boxes affecting translations. (#3322)
Some checks failed
Nightly Build / Check Recent Commit (push) Failing after 7s
Nightly Build / Build Nightly (push) Has been skipped
Nightly Build / Recreate Release (push) Has been skipped

This commit is contained in:
gir489 2024-07-11 13:11:24 -04:00 committed by GitHub
parent 3bffd92839
commit 67203b8fca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 7 deletions

View File

@ -36,7 +36,7 @@ namespace big
static bool script_patch_checkbox(const std::string_view text, bool* option, const std::string_view tooltip = ""); static bool script_patch_checkbox(const std::string_view text, bool* option, const std::string_view tooltip = "");
static void options_modal(const std::string_view element_name, std::function<void()> render_elements, bool sameline = true, std::string custom_button_name = "Options"); static void options_modal(const std::string_view element_name, std::function<void()> render_elements, bool sameline = true, std::string custom_button_name = "VIEW_PROTECTION_SETTINGS_OPTIONS"_T.data());
template<template_str cmd_str, ImVec2 size = ImVec2(0, 0), ImVec4 color = ImVec4(0.24f, 0.23f, 0.29f, 1.00f)> template<template_str cmd_str, ImVec2 size = ImVec2(0, 0), ImVec4 color = ImVec4(0.24f, 0.23f, 0.29f, 1.00f)>
static void command_button(const std::vector<uint64_t> args = {}, std::optional<const std::string_view> label_override = std::nullopt) static void command_button(const std::vector<uint64_t> args = {}, std::optional<const std::string_view> label_override = std::nullopt)

View File

@ -151,6 +151,7 @@ namespace big
g_player_database_service->save(); g_player_database_service->save();
} }
ImGui::SetNextItemWidth(250);
if (ImGui::BeginCombo("BLOCK_JOIN_ALERT"_T.data(), block_join_reasons[current_player->block_join_reason])) if (ImGui::BeginCombo("BLOCK_JOIN_ALERT"_T.data(), block_join_reasons[current_player->block_join_reason]))
{ {
block_join_reason_t i = block_join_reason_t::UNK_0; block_join_reason_t i = block_join_reason_t::UNK_0;
@ -182,6 +183,7 @@ namespace big
ImGui::SetTooltip("ONLY_AS_HOST"_T.data()); ImGui::SetTooltip("ONLY_AS_HOST"_T.data());
ImGui::SetNextItemWidth(250);
if (ImGui::BeginCombo("CHAT_COMMAND_PERMISSIONS"_T.data(), if (ImGui::BeginCombo("CHAT_COMMAND_PERMISSIONS"_T.data(),
COMMAND_ACCESS_LEVELS[current_player->command_access_level.value_or(g.session.chat_command_default_access_level)])) COMMAND_ACCESS_LEVELS[current_player->command_access_level.value_or(g.session.chat_command_default_access_level)]))
{ {

View File

@ -89,7 +89,7 @@ namespace big
components::button("COPY_SESSION_INFO"_T, [] { components::button("COPY_SESSION_INFO"_T, [] {
ImGui::SetClipboardText(session_info); ImGui::SetClipboardText(session_info);
}); });
ImGui::SameLine(); //ImGui::SameLine();
components::button("JOIN"_T, [session] { components::button("JOIN"_T, [session] {
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH("maintransition"_J) != 0 || STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS()) if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH("maintransition"_J) != 0 || STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS())
{ {

View File

@ -31,7 +31,7 @@ namespace big
ImGui::SeparatorText("PED"_T.data()); ImGui::SeparatorText("PED"_T.data());
components::button<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("VIEW_DEBUG_THREADS_KILL"_T, [] { components::button<ImVec2(150, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>("VIEW_DEBUG_THREADS_KILL"_T, [] {
for (auto peds : entity::get_entities(false, true)) for (auto peds : entity::get_entities(false, true))
{ {
if (!PED::IS_PED_A_PLAYER(peds)) if (!PED::IS_PED_A_PLAYER(peds))
@ -40,7 +40,7 @@ namespace big
}); });
ImGui::SameLine(); ImGui::SameLine();
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("VIEW_WORLD_KILL_ENEMIES"_T, [] { components::button<ImVec2(150, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>("VIEW_WORLD_KILL_ENEMIES"_T, [] {
for (auto ped : entity::get_entities(false, true)) for (auto ped : entity::get_entities(false, true))
{ {
if (!PED::IS_PED_A_PLAYER(ped)) if (!PED::IS_PED_A_PLAYER(ped))
@ -54,12 +54,12 @@ namespace big
// Nearby Ped Loops / Toggles // Nearby Ped Loops / Toggles
components::command_checkbox<"pedsignore">(); components::command_checkbox<"pedsignore">();
ImGui::SameLine(140.f); ImGui::SameLine();
components::command_checkbox<"pedrain">(); components::command_checkbox<"pedrain">();
ImGui::SameLine(265.f); ImGui::SameLine();
components::command_checkbox<"riotmode">(); components::command_checkbox<"riotmode">();
components::command_checkbox<"highalert">(); components::command_checkbox<"highalert">();
ImGui::SameLine(140.f); ImGui::SameLine();
components::command_checkbox<"pedrush">(); components::command_checkbox<"pedrush">();
ImGui::SameLine(); ImGui::SameLine();
components::command_checkbox<"autodisarm">(); components::command_checkbox<"autodisarm">();