feat: Translation Service (#844)
Co-authored-by: mrwoowoo <github@hiqaq.com> Co-authored-by: LiamD-Flop <40887493+LiamD-Flop@users.noreply.github.com>
This commit is contained in:
@ -5,32 +5,32 @@ namespace big
|
||||
{
|
||||
void view::context_menu_settings()
|
||||
{
|
||||
ImGui::Checkbox("Context Menu Enabled", &g.context_menu.enabled);
|
||||
ImGui::Checkbox("SETTINGS_CONTEXT_MENU"_T.data(), &g.context_menu.enabled);
|
||||
|
||||
if (g.context_menu.enabled)
|
||||
{
|
||||
ImGui::Text("Allowed Entity Types:");
|
||||
ImGui::CheckboxFlags("Object", reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::OBJECT));
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_ENTITY_TYPES"_T.data());
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_OBJECT"_T.data(), reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::OBJECT));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("Ped", reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::PED));
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_PED"_T.data(), reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::PED));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("Player", reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::PLAYER));
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_PLAYER"_T.data(), reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::PLAYER));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("Vehicle", reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::VEHICLE));
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_VEHICLE"_T.data(), reinterpret_cast<int*>(&g.context_menu.allowed_entity_types), static_cast<int>(ContextEntityType::VEHICLE));
|
||||
|
||||
static ImVec4 selected_option_color = ImGui::ColorConvertU32ToFloat4(g.context_menu.selected_option_color);
|
||||
ImGui::Text("Selected Option Color:");
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###BSelected Option Color##cm_picker", (float*)&selected_option_color, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.context_menu.selected_option_color = ImGui::ColorConvertFloat4ToU32(selected_option_color);
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Bounding Box Enabled", &g.context_menu.bounding_box_enabled);
|
||||
ImGui::Checkbox("SETTINGS_CONTEXT_MENU_BOUNDING_BOX"_T.data(), &g.context_menu.bounding_box_enabled);
|
||||
|
||||
if (g.context_menu.bounding_box_enabled)
|
||||
{
|
||||
static ImVec4 bounding_box_color = ImGui::ColorConvertU32ToFloat4(g.context_menu.bounding_box_color);
|
||||
ImGui::Text("Bounding Box Color:");
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_BOUNDING_BOX_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###Bounding Box Color##cm_picker", (float*)&bounding_box_color, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.context_menu.bounding_box_color = ImGui::ColorConvertFloat4ToU32(bounding_box_color);
|
||||
|
@ -4,73 +4,73 @@ namespace big
|
||||
{
|
||||
void view::esp_settings()
|
||||
{
|
||||
ImGui::Checkbox("ESP Enabled", &g.esp.enabled);
|
||||
ImGui::Checkbox("SETTINGS_ESP"_T.data(), &g.esp.enabled);
|
||||
|
||||
if (g.esp.enabled)
|
||||
{
|
||||
ImGui::Checkbox("Hide Self", &g.esp.hide_self);
|
||||
ImGui::Checkbox("SETTINGS_ESP_HIDE_SELF"_T.data(), &g.esp.hide_self);
|
||||
|
||||
ImGui::Text("Global Render Distance (min, max)");
|
||||
ImGui::Text("SETTINGS_ESP_GLOBAL_RENDER_DISTANCE"_T.data());
|
||||
ImGui::SliderFloat2("###Global Render Distance", g.esp.global_render_distance, 0.f, 1500.f);
|
||||
|
||||
ImGui::Checkbox("Tracer", &g.esp.tracer);
|
||||
ImGui::Checkbox("SETTINGS_ESP_TRACER"_T.data(), &g.esp.tracer);
|
||||
if (g.esp.tracer) {
|
||||
ImGui::Text("Tracer Draw Position (x, y)");
|
||||
ImGui::Text("SETTINGS_ESP_TRACER_POSITION"_T.data());
|
||||
ImGui::SliderFloat2("###Draw Position", g.esp.tracer_draw_position, 0.f, 1.f);
|
||||
ImGui::Text("Tracer Render Distance (min, max)");
|
||||
ImGui::Text("SETTINGS_ESP_TRACER_RENDER_DISTANCE"_T.data());
|
||||
ImGui::SliderFloat2("###Tracer Render Distance", g.esp.tracer_render_distance, g.esp.global_render_distance[0], g.esp.global_render_distance[1]);
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Box ESP", &g.esp.box);
|
||||
ImGui::Checkbox("SETTINGS_ESP_BOX"_T.data(), &g.esp.box);
|
||||
if (g.esp.box) {
|
||||
ImGui::Text("Box Render Distance (min, max)");
|
||||
ImGui::Text("SETTINGS_ESP_BOX_RENDER_DISTANCE"_T.data());
|
||||
ImGui::SliderFloat2("###Box Render Distance", g.esp.box_render_distance, g.esp.global_render_distance[0], g.esp.global_render_distance[1]);
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Show Player Name", &g.esp.name);
|
||||
ImGui::Checkbox("Show Player Distance", &g.esp.distance);
|
||||
ImGui::Checkbox("Show Player Godmode", &g.esp.god);
|
||||
ImGui::Checkbox("Show Player Health", &g.esp.health);
|
||||
ImGui::Checkbox("Show Player Armor", &g.esp.armor);
|
||||
ImGui::Checkbox("SETTINGS_ESP_PLAYER_NAME"_T.data(), &g.esp.name);
|
||||
ImGui::Checkbox("SETTINGS_ESP_PLAYER_DISTANCE"_T.data(), &g.esp.distance);
|
||||
ImGui::Checkbox("SETTINGS_ESP_PLAYER_GOD_MODE"_T.data(), &g.esp.god);
|
||||
ImGui::Checkbox("SETTINGS_ESP_PLAYER_HEALTH"_T.data(), &g.esp.health);
|
||||
ImGui::Checkbox("SETTINGS_ESP_PLAYER_ARMOR"_T.data(), &g.esp.armor);
|
||||
|
||||
ImGui::Checkbox("Should ESP Color Change with Distance", &g.esp.change_esp_color_from_dist);
|
||||
ImGui::Checkbox("SETTINGS_ESP_COLOR_W_DISTANCE"_T.data(), &g.esp.change_esp_color_from_dist);
|
||||
if (g.esp.health)
|
||||
ImGui::Checkbox("Should Healthbar Scale with Distance", &g.esp.scale_health_from_dist);
|
||||
ImGui::Checkbox("SETTINGS_ESP_SCALE_HEALTH"_T.data(), &g.esp.scale_health_from_dist);
|
||||
|
||||
if (g.esp.armor)
|
||||
ImGui::Checkbox("Should Armorbar Scale with Distance", &g.esp.scale_armor_from_dist);
|
||||
ImGui::Checkbox("SETTINGS_ESP_SCALE_ARMOR"_T.data(), &g.esp.scale_armor_from_dist);
|
||||
|
||||
static ImVec4 col_enemy = ImGui::ColorConvertU32ToFloat4(g.esp.enemy_color);
|
||||
static ImVec4 col_enemy_near = ImGui::ColorConvertU32ToFloat4(g.esp.enemy_near_color);
|
||||
static ImVec4 col_default = ImGui::ColorConvertU32ToFloat4(g.esp.default_color);
|
||||
static ImVec4 col_friend = ImGui::ColorConvertU32ToFloat4(g.esp.friend_color);
|
||||
|
||||
ImGui::Text("Distance threshold (min, max)");
|
||||
ImGui::Text("SETTINGS_ESP_DISTANCE_THRESHOLD"_T.data());
|
||||
ImGui::SliderFloat2("###Distance threshold", g.esp.distance_threshold, g.esp.global_render_distance[0], g.esp.global_render_distance[1]);
|
||||
|
||||
if (ImGui::TreeNode("ESP Colors (RGBA)"))
|
||||
if (ImGui::TreeNode("SETTINGS_ESP_COLORS"_T.data()))
|
||||
{
|
||||
if (g.esp.change_esp_color_from_dist) {
|
||||
ImGui::Text("Enemy Close Color:");
|
||||
ImGui::Text("SETTINGS_ESP_ENEMY_CLOSE_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###Enemy ESP Color##esp_picker", (float*)&col_enemy, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.esp.enemy_color = ImGui::ColorConvertFloat4ToU32(col_enemy);
|
||||
}
|
||||
|
||||
ImGui::Text("Enemy Near Color:");
|
||||
ImGui::Text("SETTINGS_ESP_ENEMY_NEAR_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###Enemy Near ESP Color##esp_picker", (float*)&col_enemy_near, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.esp.enemy_near_color = ImGui::ColorConvertFloat4ToU32(col_enemy_near);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Text("Default Color:");
|
||||
ImGui::Text("SETTINGS_ESP_ENEMY_DEFAULT_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###Default ESP Color##esp_picker", (float*)&col_default, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.esp.default_color = ImGui::ColorConvertFloat4ToU32(col_default);
|
||||
}
|
||||
|
||||
ImGui::Text("Friendly Color:");
|
||||
ImGui::Text("SETTINGS_ESP_FRIENDLY_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###Friend ESP Color##friend_picker", (float*)&col_friend, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.esp.friend_color = ImGui::ColorConvertFloat4ToU32(col_friend);
|
||||
|
@ -5,17 +5,17 @@ namespace big
|
||||
{
|
||||
void view::gui_settings()
|
||||
{
|
||||
components::sub_title("UI Scale");
|
||||
components::sub_title("SETTINGS_UI_SCALE"_T);
|
||||
ImGui::SliderFloat("##gui-scale", &g.window.gui_scale, 1.f, 1.5f, "%.2f");
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Apply##gui-scale"))
|
||||
if (ImGui::Button("APPLY"_T.data()))
|
||||
g_renderer->rescale(g.window.gui_scale);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Changing the UI scale may break rendering and require you to unload and inject YimMenu again.");
|
||||
ImGui::SetTooltip("SETTINGS_UI_SCALE_DESCRIPTION"_T.data());
|
||||
|
||||
components::sub_title("Colors");
|
||||
components::sub_title("SETTINGS_UI_COLOR"_T);
|
||||
static ImVec4 col_gui = ImGui::ColorConvertU32ToFloat4(g.window.color);
|
||||
if (ImGui::ColorEdit4("Gui Color##gui_picker", (float*)&col_gui, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
if (ImGui::ColorEdit4("SETTINGS_UI_COLOR_PICKER"_T.data(), (float*)&col_gui, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.window.color = ImGui::ColorConvertFloat4ToU32(col_gui);
|
||||
}
|
||||
|
@ -5,46 +5,46 @@ namespace big
|
||||
void view::protection_settings()
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Bounty", &g.protections.script_events.bounty);
|
||||
ImGui::Checkbox("CEO Money", &g.protections.script_events.ceo_money);
|
||||
ImGui::Checkbox("Fake Deposit", &g.protections.script_events.fake_deposit);
|
||||
ImGui::Checkbox("Force Mission", &g.protections.script_events.force_mission);
|
||||
ImGui::Checkbox("Force Teleport", &g.protections.script_events.force_teleport);
|
||||
ImGui::Checkbox("GTA Banner", &g.protections.script_events.gta_banner);
|
||||
ImGui::Checkbox("MC Teleport", &g.protections.script_events.mc_teleport);
|
||||
ImGui::Checkbox("BOUNTY"_T.data(), &g.protections.script_events.bounty);
|
||||
ImGui::Checkbox("CEO_MONEY"_T.data(), &g.protections.script_events.ceo_money);
|
||||
ImGui::Checkbox("FAKE_DEPOSIT"_T.data(), &g.protections.script_events.fake_deposit);
|
||||
ImGui::Checkbox("FORCE_MISSION"_T.data(), &g.protections.script_events.force_mission);
|
||||
ImGui::Checkbox("FORCE_TELEPORT"_T.data(), &g.protections.script_events.force_teleport);
|
||||
ImGui::Checkbox("GTA_BANNER"_T.data(), &g.protections.script_events.gta_banner);
|
||||
ImGui::Checkbox("MC_TELEPORT"_T.data(), &g.protections.script_events.mc_teleport);
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Send to Cutscene", &g.protections.script_events.send_to_cutscene);
|
||||
ImGui::Checkbox("Send to Location", &g.protections.script_events.send_to_location);
|
||||
ImGui::Checkbox("Sound Spam", &g.protections.script_events.sound_spam);
|
||||
ImGui::Checkbox("Personal Vehicle Destroyed", &g.protections.script_events.personal_vehicle_destroyed);
|
||||
ImGui::Checkbox("Remote Off Radar", &g.protections.script_events.remote_off_radar);
|
||||
ImGui::Checkbox("Rotate Cam", &g.protections.script_events.rotate_cam);
|
||||
ImGui::Checkbox("Teleport To Warehouse", &g.protections.script_events.teleport_to_warehouse);
|
||||
ImGui::Checkbox("SEND_TO_CUTSCENE"_T.data(), &g.protections.script_events.send_to_cutscene);
|
||||
ImGui::Checkbox("SEND_TO_LOCATION"_T.data(), &g.protections.script_events.send_to_location);
|
||||
ImGui::Checkbox("SOUND_SPAM"_T.data(), &g.protections.script_events.sound_spam);
|
||||
ImGui::Checkbox("PERSONAL_VEHICLE_DESTROYED"_T.data(), &g.protections.script_events.personal_vehicle_destroyed);
|
||||
ImGui::Checkbox("REMOTE_OFF_RADAR"_T.data(), &g.protections.script_events.remote_off_radar);
|
||||
ImGui::Checkbox("ROTATE_CAM"_T.data(), &g.protections.script_events.rotate_cam);
|
||||
ImGui::Checkbox("TELEPORT_TO_WAREHOUSE"_T.data(), &g.protections.script_events.teleport_to_warehouse);
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Start Activity", &g.protections.script_events.start_activity);
|
||||
ImGui::Checkbox("Send SMS", &g.protections.script_events.send_sms);
|
||||
ImGui::Checkbox("Spectate", &g.protections.script_events.spectate);
|
||||
ImGui::Checkbox("Vehicle Kick", &g.protections.script_events.vehicle_kick);
|
||||
ImGui::Checkbox("Wanted Level", &g.protections.script_events.clear_wanted_level);
|
||||
ImGui::Checkbox("Desync Kick", &g.protections.desync_kick);
|
||||
ImGui::Checkbox("START_ACTIVITY"_T.data(), &g.protections.script_events.start_activity);
|
||||
ImGui::Checkbox("SEND_SMS"_T.data(), &g.protections.script_events.send_sms);
|
||||
ImGui::Checkbox("SPECTATE"_T.data(), &g.protections.script_events.spectate);
|
||||
ImGui::Checkbox("VEHICLE_KICK"_T.data(), &g.protections.script_events.vehicle_kick);
|
||||
ImGui::Checkbox("WANTED_LEVEL"_T.data(), &g.protections.script_events.clear_wanted_level);
|
||||
ImGui::Checkbox("DESYNC_KICK"_T.data(), &g.protections.desync_kick);
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("RID Join", &g.protections.rid_join);
|
||||
ImGui::Checkbox("BLOCK_RID_JOINING"_T.data(), &g.protections.rid_join);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("This will block anyone trying to join, kick or crash you with your Rockstar ID, including your friends");
|
||||
ImGui::Checkbox("Lessen Breakup Kicks As Host", &g.protections.lessen_breakups);
|
||||
ImGui::SetTooltip("BLOCK_RID_JOINING_DESCRIPTION"_T.data());
|
||||
ImGui::Checkbox("LESSEN_BREAKUP_KICK"_T.data(), &g.protections.lessen_breakups);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Attacker must join after you have become host for this to work. There are anti-cheat concerns with this feature");
|
||||
ImGui::SetTooltip("LESSEN_BREAKUP_KICK_DESCRIPTION"_T.data());
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,11 @@ namespace big
|
||||
{
|
||||
void draw_pair_option(const std::string_view name, decltype(g.notifications.gta_thread_kill)& option)
|
||||
{
|
||||
ImGui::Text("%s", name.data());
|
||||
ImGui::Text(name.data());
|
||||
|
||||
ImGui::PushID(name.data());
|
||||
ImGui::Checkbox("Log", &option.log);
|
||||
ImGui::Checkbox("Notify", &option.notify);
|
||||
ImGui::Checkbox("LOG"_T.data(), &option.log);
|
||||
ImGui::Checkbox("NOTIFY"_T.data(), &option.notify);
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
@ -16,13 +16,13 @@ namespace big
|
||||
{
|
||||
if (ImGui::TreeNode(reaction.m_event_name))
|
||||
{
|
||||
ImGui::Checkbox("Announce In Chat", &reaction.announce_in_chat);
|
||||
ImGui::Checkbox("Notify", &reaction.notify);
|
||||
ImGui::Checkbox("Log", &reaction.log);
|
||||
ImGui::Checkbox("Add Player To Database", &reaction.add_to_player_db);
|
||||
ImGui::Checkbox("REACTION_CHAT"_T.data(), &reaction.announce_in_chat);
|
||||
ImGui::Checkbox("NOTIFY"_T.data(), &reaction.notify);
|
||||
ImGui::Checkbox("LOG"_T.data(), &reaction.log);
|
||||
ImGui::Checkbox("REACTION_ADD_TO_DATABASE"_T.data(), &reaction.add_to_player_db);
|
||||
if (reaction.add_to_player_db)
|
||||
ImGui::Checkbox("Block Joins", &reaction.block_joins);
|
||||
ImGui::Checkbox("Kick Player", &reaction.kick);
|
||||
ImGui::Checkbox("REACTION_BLOCK_JOINS"_T.data(), &reaction.block_joins);
|
||||
ImGui::Checkbox("REACTION_KICK_PLAYER"_T.data(), &reaction.kick);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
@ -32,22 +32,22 @@ namespace big
|
||||
{
|
||||
if (ImGui::TreeNode(reaction.m_event_name))
|
||||
{
|
||||
ImGui::Checkbox("Announce In Chat", &reaction.announce_in_chat);
|
||||
ImGui::Checkbox("Notify", &reaction.notify);
|
||||
ImGui::Checkbox("Log", &reaction.log);
|
||||
ImGui::Checkbox("Add Attacker To Database", &reaction.add_to_player_db);
|
||||
ImGui::Checkbox("REACTION_CHAT"_T.data(), &reaction.announce_in_chat);
|
||||
ImGui::Checkbox("NOTIFY"_T.data(), &reaction.notify);
|
||||
ImGui::Checkbox("LOG"_T.data(), &reaction.log);
|
||||
ImGui::Checkbox("REACTION_ADD_TO_DATABASE"_T.data(), &reaction.add_to_player_db);
|
||||
if (reaction.add_to_player_db)
|
||||
ImGui::Checkbox("Block Joins", &reaction.block_joins);
|
||||
ImGui::Checkbox("Kick Attacker", &reaction.kick);
|
||||
ImGui::Checkbox("REACTION_BLOCK_JOINS"_T.data(), &reaction.block_joins);
|
||||
ImGui::Checkbox("REACTION_KICK_ATTACKER"_T.data(), &reaction.kick);
|
||||
|
||||
if (reaction.m_blockable || reaction.m_karmaable)
|
||||
ImGui::Separator();
|
||||
|
||||
if (reaction.m_blockable)
|
||||
ImGui::Checkbox("Block", &reaction.block);
|
||||
ImGui::Checkbox("BLOCK"_T.data(), &reaction.block);
|
||||
|
||||
if (reaction.m_karmaable)
|
||||
ImGui::Checkbox("Karma", &reaction.karma);
|
||||
ImGui::Checkbox("KARMA"_T.data(), &reaction.karma);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
@ -55,7 +55,7 @@ namespace big
|
||||
|
||||
void view::reaction_settings()
|
||||
{
|
||||
components::title("Reactions");
|
||||
components::title("SETTINGS_REACTIONS"_T);
|
||||
draw_reaction(g.reactions.bounty);
|
||||
draw_reaction(g.reactions.ceo_kick);
|
||||
draw_reaction(g.reactions.ceo_money);
|
||||
@ -104,31 +104,31 @@ namespace big
|
||||
draw_interloper_reaction(g.reactions.lost_connection_kick_others);
|
||||
draw_interloper_reaction(g.reactions.breakup_others);
|
||||
|
||||
components::title("Notifications");
|
||||
components::sub_title("GTA Threads");
|
||||
components::title("SETTINGS_NOTIFICATIONS"_T);
|
||||
components::sub_title("SETTINGS_NOTIFY_GTA_THREADS"_T);
|
||||
|
||||
draw_pair_option("Terminate", g.notifications.gta_thread_kill);
|
||||
draw_pair_option("Start", g.notifications.gta_thread_start);
|
||||
draw_pair_option("SETTINGS_NOTIFY_GTA_THREADS_TERMINATE"_T, g.notifications.gta_thread_kill);
|
||||
draw_pair_option("SETTINGS_NOTIFY_GTA_THREADS_START"_T, g.notifications.gta_thread_start);
|
||||
|
||||
components::sub_title("Network Player Manager");
|
||||
components::sub_title("SETTINGS_NOTIFY_PLAYER_MGR"_T);
|
||||
|
||||
ImGui::Text("Player Join");
|
||||
ImGui::Text("SETTINGS_NOTIFY_PLAYER_JOIN"_T.data());
|
||||
|
||||
ImGui::Checkbox("Above Map", &g.notifications.player_join.above_map);
|
||||
ImGui::Checkbox("Log", &g.notifications.player_join.log);
|
||||
ImGui::Checkbox("Notify", &g.notifications.player_join.notify);
|
||||
ImGui::Checkbox("SETTINGS_NOTIFY_PLAYER_JOIN_ABOVE_MAP"_T.data(), &g.notifications.player_join.above_map);
|
||||
ImGui::Checkbox("LOG"_T.data(), &g.notifications.player_join.log);
|
||||
ImGui::Checkbox("NOTIFY"_T.data(), &g.notifications.player_join.notify);
|
||||
|
||||
draw_pair_option("Player Leave", g.notifications.player_leave);
|
||||
draw_pair_option("SETTINGS_NOTIFY_PLAYER_LEAVE"_T, g.notifications.player_leave);
|
||||
|
||||
draw_pair_option("Init", g.notifications.network_player_mgr_init);
|
||||
draw_pair_option("Shutdown", g.notifications.network_player_mgr_shutdown);
|
||||
draw_pair_option("SETTINGS_NOTIFY_PLAYER_MGR_INIT"_T, g.notifications.network_player_mgr_init);
|
||||
draw_pair_option("SETTINGS_NOTIFY_PLAYER_MGR_SHUTDOWN"_T, g.notifications.network_player_mgr_shutdown);
|
||||
|
||||
components::sub_title("Other");
|
||||
components::sub_title("SETTINGS_NOTIFY_OTHER"_T);
|
||||
|
||||
draw_pair_option("Transaction Error / Rate Limit", g.notifications.transaction_rate_limit);
|
||||
draw_pair_option("Mismatch sync type", g.notifications.mismatch_sync_type);
|
||||
draw_pair_option("Out of allowed range sync type", g.notifications.out_of_allowed_range_sync_type);
|
||||
draw_pair_option("Invalid sync", g.notifications.invalid_sync);
|
||||
draw_pair_option("SETTINGS_NOTIFY_TRANSACTION_RATE_LIMIT"_T, g.notifications.transaction_rate_limit);
|
||||
draw_pair_option("SETTINGS_NOTIFY_MISMATCH_SYNC_TYPE"_T, g.notifications.mismatch_sync_type);
|
||||
draw_pair_option("SETTINGS_NOTIFY_OUT_OF_ALLOWED_RANGE_SYNC_TYPE"_T, g.notifications.out_of_allowed_range_sync_type);
|
||||
draw_pair_option("SETTINGS_NOTIFY_INVALID_SYNC"_T, g.notifications.invalid_sync);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,44 +1,10 @@
|
||||
#include "views/view.hpp"
|
||||
#include "script_mgr.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void scripts_popupmodal()
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
components::sub_title("Scripts");
|
||||
ImGui::SameLine(ImGui::GetWindowWidth() - 100);
|
||||
if (ImGui::Button("Close")) ImGui::CloseCurrentPopup();
|
||||
ImGui::Spacing();
|
||||
components::sub_title("These scripts are responsible for all looped features.\nOnly disable if you know what you are doing.");
|
||||
|
||||
for (const auto& script : g_script_mgr.scripts())
|
||||
{
|
||||
if (script->is_toggleable())
|
||||
if (ImGui::Checkbox(script->name(), script->toggle_ptr()))
|
||||
g_notification_service->push(std::string(script->name()).append(" script"), script->is_enabled() ? "Resumed" : "Halted");
|
||||
}
|
||||
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
||||
void view::settings()
|
||||
{
|
||||
components::sub_title("Misc");
|
||||
ImGui::Checkbox("Enable Dev DLC", &g.settings.dev_dlc);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Manage scripts"))
|
||||
ImGui::OpenPopup("Scripts");
|
||||
|
||||
ImGui::SetNextWindowPos({ 780,228 }, ImGuiCond_FirstUseEver);
|
||||
if (ImGui::BeginPopupModal("Scripts", nullptr, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
scripts_popupmodal();
|
||||
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
components::sub_title("SETTINGS_MISC"_T);
|
||||
ImGui::Checkbox("SETTINGS_MISC_DEV_DLC"_T.data(), &g.settings.dev_dlc);
|
||||
}
|
||||
}
|
26
src/views/settings/view_translation_settings.cpp
Normal file
26
src/views/settings/view_translation_settings.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::translation_settings()
|
||||
{
|
||||
const auto& language_entries = g_translation_service.available_translations();
|
||||
const auto current_pack = g_translation_service.current_language_pack();
|
||||
|
||||
ImGui::Text("SETTINGS_LANGUAGES"_T.data());
|
||||
if (ImGui::BeginCombo("##combo-languages", language_entries.at(current_pack).name.c_str()))
|
||||
{
|
||||
for (auto& i : language_entries)
|
||||
{
|
||||
if (ImGui::Selectable(i.second.name.c_str(), i.first == current_pack))
|
||||
g_translation_service.select_language_pack(i.first);
|
||||
|
||||
if (i.first == current_pack)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user