mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-23 04:27:25 +08:00
feat(Outfit Editor): Add [+] & [-] buttons (#1441)
* And other general UI improvements
This commit is contained in:
parent
ef86872235
commit
e0bd043588
@ -1,8 +1,8 @@
|
|||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
imgui
|
imgui
|
||||||
GIT_REPOSITORY https://github.com/YimMenu/imgui.git
|
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||||
GIT_TAG a241dc7990b631fde6575771173c2442d43d2812
|
GIT_TAG 94c46d74869ec991c101c187088da0f25d6c8e40
|
||||||
GIT_PROGRESS TRUE
|
GIT_PROGRESS TRUE
|
||||||
)
|
)
|
||||||
message("ImGui")
|
message("ImGui")
|
||||||
|
@ -7,11 +7,14 @@
|
|||||||
#include "file_manager.hpp"
|
#include "file_manager.hpp"
|
||||||
|
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <imgui.h>
|
|
||||||
#include <rage/rlSessionInfo.hpp>
|
#include <rage/rlSessionInfo.hpp>
|
||||||
#include <weapon/CAmmoInfo.hpp>
|
#include <weapon/CAmmoInfo.hpp>
|
||||||
#include <weapon/CWeaponInfo.hpp>
|
#include <weapon/CWeaponInfo.hpp>
|
||||||
|
|
||||||
|
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||||
|
#include <imgui.h>
|
||||||
|
|
||||||
|
|
||||||
class CNetGamePlayer;
|
class CNetGamePlayer;
|
||||||
|
|
||||||
namespace rage
|
namespace rage
|
||||||
@ -735,6 +738,7 @@ namespace big
|
|||||||
ImFont* font_small = nullptr;
|
ImFont* font_small = nullptr;
|
||||||
ImFont* font_icon = nullptr;
|
ImFont* font_icon = nullptr;
|
||||||
|
|
||||||
|
bool demo = false;
|
||||||
bool switched_view = true;
|
bool switched_view = true;
|
||||||
|
|
||||||
struct ingame_overlay
|
struct ingame_overlay
|
||||||
@ -762,7 +766,7 @@ namespace big
|
|||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(vehicle_control, operation_animation, max_summon_range, render_distance_on_veh)
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(vehicle_control, operation_animation, max_summon_range, render_distance_on_veh)
|
||||||
} vehicle_control{};
|
} vehicle_control{};
|
||||||
|
|
||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(window, background_color, text_color, button_color, frame_color, gui_scale, switched_view, ingame_overlay, vehicle_control)
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(window, background_color, demo, text_color, button_color, frame_color, gui_scale, switched_view, ingame_overlay, vehicle_control)
|
||||||
} window{};
|
} window{};
|
||||||
|
|
||||||
struct context_menu
|
struct context_menu
|
||||||
|
@ -17,7 +17,7 @@ namespace big
|
|||||||
g_handling_service->load_files();
|
g_handling_service->load_files();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##handling_profiles"))
|
if (ImGui::BeginListBox("##handling_profiles"))
|
||||||
{
|
{
|
||||||
for (auto& [name, profile] : g_handling_service->profiles())
|
for (auto& [name, profile] : g_handling_service->profiles())
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,22 @@ namespace big::outfit
|
|||||||
{8, "OUTFIT_UNK4"_T.data()}};
|
{8, "OUTFIT_UNK4"_T.data()}};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline void check_bounds_drawable(outfit_t* item)
|
||||||
|
{
|
||||||
|
if(item->drawable_id > item->drawable_id_max)
|
||||||
|
item->drawable_id = item->drawable_id_max;
|
||||||
|
if(item->drawable_id < -1)
|
||||||
|
item->drawable_id = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void check_bounds_texture(outfit_t* item)
|
||||||
|
{
|
||||||
|
if(item->texture_id > item->texture_id_max)
|
||||||
|
item->texture_id = item->texture_id_max;
|
||||||
|
if(item->texture_id < -1)
|
||||||
|
item->texture_id = -1;
|
||||||
|
}
|
||||||
|
|
||||||
inline char* get_slot_name_address(int slot)
|
inline char* get_slot_name_address(int slot)
|
||||||
{
|
{
|
||||||
return script_global(2359296).at(0, 5568).at(681).at(2460).at(slot, 8).as<char*>();
|
return script_global(2359296).at(0, 5568).at(681).at(2460).at(slot, 8).as<char*>();
|
||||||
|
@ -40,6 +40,7 @@ namespace big
|
|||||||
// can't easily get used item count using pools, so keeping replay interface for now
|
// can't easily get used item count using pools, so keeping replay interface for now
|
||||||
if (auto replay_interface = *g_pointers->m_gta.m_replay_interface; g.window.ingame_overlay.show_replay_interface)
|
if (auto replay_interface = *g_pointers->m_gta.m_replay_interface; g.window.ingame_overlay.show_replay_interface)
|
||||||
{
|
{
|
||||||
|
if (replay_interface->m_ped_interface || replay_interface->m_vehicle_interface || replay_interface->m_object_interface)
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
if (replay_interface->m_ped_interface)
|
if (replay_interface->m_ped_interface)
|
||||||
|
@ -10,5 +10,8 @@ namespace big
|
|||||||
view::active_view();
|
view::active_view();
|
||||||
|
|
||||||
debug::main();
|
debug::main();
|
||||||
|
|
||||||
|
if (g.window.demo) // It is not the YimMenu way.
|
||||||
|
ImGui::ShowDemoWindow(&g.window.demo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace big
|
|||||||
ImGui::SetNextItemWidth(400);
|
ImGui::SetNextItemWidth(400);
|
||||||
components::input_text_with_hint("", "Dictionary", ¤t_dict);
|
components::input_text_with_hint("", "Dictionary", ¤t_dict);
|
||||||
|
|
||||||
if (animations::has_anim_list_been_populated() && ImGui::ListBoxHeader("##dictionaries", ImVec2(400, 200)))
|
if (animations::has_anim_list_been_populated() && ImGui::BeginListBox("##dictionaries", ImVec2(400, 200)))
|
||||||
{
|
{
|
||||||
for (auto& entry : animations::all_dicts)
|
for (auto& entry : animations::all_dicts)
|
||||||
{
|
{
|
||||||
@ -45,10 +45,10 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected_dict_anim_list.size() > 0 && ImGui::ListBoxHeader("##animations", ImVec2(400, 200)))
|
if (selected_dict_anim_list.size() > 0 && ImGui::BeginListBox("##animations", ImVec2(400, 200)))
|
||||||
{
|
{
|
||||||
for (auto& entry : selected_dict_anim_list)
|
for (auto& entry : selected_dict_anim_list)
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
components::button("Stop", [] {
|
components::button("Stop", [] {
|
||||||
|
@ -82,6 +82,8 @@ namespace big
|
|||||||
g_notification_service->push_error("Find safe pos", "Failed to find a safe position");
|
g_notification_service->push_error("Find safe pos", "Failed to find a safe position");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ImGui::Checkbox("ImGui Demo", &g.window.demo);
|
||||||
|
|
||||||
components::command_button<"fastquit">();
|
components::command_button<"fastquit">();
|
||||||
|
|
||||||
if (ImGui::TreeNode("ADDRESSES"_T.data()))
|
if (ImGui::TreeNode("ADDRESSES"_T.data()))
|
||||||
|
@ -21,7 +21,7 @@ namespace big
|
|||||||
|
|
||||||
if (g.debug.logs.script_event.filter_player)
|
if (g.debug.logs.script_event.filter_player)
|
||||||
{
|
{
|
||||||
ImGui::ListBoxHeader("##filter_player");
|
ImGui::BeginListBox("##filter_player");
|
||||||
for (const auto& [_, player] : g_player_service->players())
|
for (const auto& [_, player] : g_player_service->players())
|
||||||
{
|
{
|
||||||
if (components::selectable(player->get_name(), g.debug.logs.script_event.player_id == player->id()))
|
if (components::selectable(player->get_name(), g.debug.logs.script_event.player_id == player->id()))
|
||||||
|
@ -55,7 +55,7 @@ namespace big
|
|||||||
if (!num_landmarks)
|
if (!num_landmarks)
|
||||||
num_landmarks = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("HUNT_THE_BEAST_NUMBER_OF_ACTIVE_LANDMARKS"));
|
num_landmarks = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("HUNT_THE_BEAST_NUMBER_OF_ACTIVE_LANDMARKS"));
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##beastlandmarks", ImVec2(400, 300)))
|
if (ImGui::BeginListBox("##beastlandmarks", ImVec2(400, 300)))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < (num_landmarks ? *num_landmarks : 10); i++)
|
for (int i = 0; i < (num_landmarks ? *num_landmarks : 10); i++)
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ namespace big
|
|||||||
teleport::teleport_player_to_coords(g.player.spectating ? beast : g_player_service->get_self(), script_local_land_mark);
|
teleport::teleport_player_to_coords(g.player.spectating ? beast : g_player_service->get_self(), script_local_land_mark);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -22,7 +22,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
components::sub_title("Rid joiner");
|
components::sub_title("Rid joiner");
|
||||||
if (ImGui::ListBoxHeader("##ridjoiner", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##ridjoiner", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
static uint64_t rid = 0;
|
static uint64_t rid = 0;
|
||||||
static char username[20];
|
static char username[20];
|
||||||
@ -58,7 +58,7 @@ namespace big
|
|||||||
});
|
});
|
||||||
|
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
components::sub_title("SESSION_SWITCHER"_T);
|
components::sub_title("SESSION_SWITCHER"_T);
|
||||||
if (ImGui::ListBoxHeader("###session_switch", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("###session_switch", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
if (ImGui::BeginCombo("##regionswitcher", "Regions"))
|
if (ImGui::BeginCombo("##regionswitcher", "Regions"))
|
||||||
{
|
{
|
||||||
@ -99,7 +99,7 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
components::sub_title("Misc");
|
components::sub_title("Misc");
|
||||||
if (ImGui::ListBoxHeader("##miscsession", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##miscsession", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
ImGui::Checkbox("Join Sctv", &g.session.join_in_sctv_slots); //CHANGE TRANSLATION JOIN_IN_SCTV
|
ImGui::Checkbox("Join Sctv", &g.session.join_in_sctv_slots); //CHANGE TRANSLATION JOIN_IN_SCTV
|
||||||
if (ImGui::IsItemHovered())
|
if (ImGui::IsItemHovered())
|
||||||
@ -122,7 +122,7 @@ namespace big
|
|||||||
|
|
||||||
components::script_patch_checkbox("REVEAL_OTR_PLAYERS"_T, &g.session.decloak_players);
|
components::script_patch_checkbox("REVEAL_OTR_PLAYERS"_T, &g.session.decloak_players);
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
@ -133,7 +133,7 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
components::sub_title("Chat");
|
components::sub_title("Chat");
|
||||||
if (ImGui::ListBoxHeader("##chat", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##chat", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
static char msg[256];
|
static char msg[256];
|
||||||
ImGui::Checkbox("AUTO_KICK_CHAT_SPAMMERS"_T.data(), &g.session.kick_chat_spammers);
|
ImGui::Checkbox("AUTO_KICK_CHAT_SPAMMERS"_T.data(), &g.session.kick_chat_spammers);
|
||||||
@ -182,7 +182,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
@ -193,7 +193,7 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
components::sub_title("Globals");
|
components::sub_title("Globals");
|
||||||
if (ImGui::ListBoxHeader("##globals", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##globals", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
static int global_wanted_level = 0;
|
static int global_wanted_level = 0;
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ namespace big
|
|||||||
scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[self::id].RemoteWantedLevelAmount = global_wanted_level;
|
scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[self::id].RemoteWantedLevelAmount = global_wanted_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
@ -66,7 +66,7 @@ namespace big
|
|||||||
ImGui::SetNextItemWidth(300.f);
|
ImGui::SetNextItemWidth(300.f);
|
||||||
components::input_text_with_hint("PLAYER"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
components::input_text_with_hint("PLAYER"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("###players", {180, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 400 - 38 * 4)}))
|
if (ImGui::BeginListBox("###players", {180, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 400 - 38 * 4)}))
|
||||||
{
|
{
|
||||||
auto& item_arr = g_player_database_service->get_sorted_players();
|
auto& item_arr = g_player_database_service->get_sorted_players();
|
||||||
if (item_arr.size() > 0)
|
if (item_arr.size() > 0)
|
||||||
@ -91,7 +91,7 @@ namespace big
|
|||||||
ImGui::Text("NO_STORED_PLAYERS"_T.data());
|
ImGui::Text("NO_STORED_PLAYERS"_T.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto selected = g_player_database_service->get_selected())
|
if (auto selected = g_player_database_service->get_selected())
|
||||||
|
@ -23,7 +23,7 @@ namespace big
|
|||||||
|
|
||||||
ImGui::SetNextItemWidth(300.f);
|
ImGui::SetNextItemWidth(300.f);
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("###sessions", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 400 - 38 * 4)}))
|
if (ImGui::BeginListBox("###sessions", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 400 - 38 * 4)}))
|
||||||
{
|
{
|
||||||
if (g_matchmaking_service->get_num_found_sessions())
|
if (g_matchmaking_service->get_num_found_sessions())
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ namespace big
|
|||||||
ImGui::Text("NO_SESSIONS"_T.data());
|
ImGui::Text("NO_SESSIONS"_T.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected_session_idx != -1)
|
if (selected_session_idx != -1)
|
||||||
|
@ -16,7 +16,7 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
components::sub_title("Info");
|
components::sub_title("Info");
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##infobox", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##infobox", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
uint32_t ped_damage_bits = 0;
|
uint32_t ped_damage_bits = 0;
|
||||||
uint32_t ped_task_flag = 0;
|
uint32_t ped_task_flag = 0;
|
||||||
@ -203,7 +203,7 @@ namespace big
|
|||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
components::sub_title("Kick");
|
components::sub_title("Kick");
|
||||||
if (ImGui::ListBoxHeader("##kick", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##kick", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
auto const is_session_host = [] {
|
auto const is_session_host = [] {
|
||||||
return gta_util::get_network()->m_game_session_ptr->is_host();
|
return gta_util::get_network()->m_game_session_ptr->is_host();
|
||||||
@ -39,7 +39,7 @@ namespace big
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
components::player_command_button<"desync">(g_player_service->get_selected());
|
components::player_command_button<"desync">(g_player_service->get_selected());
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
@ -10,7 +10,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
components::sub_title("Misc");
|
components::sub_title("Misc");
|
||||||
if (ImGui::ListBoxHeader("##misc", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##misc", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
components::player_command_button<"joinceo">(g_player_service->get_selected());
|
components::player_command_button<"joinceo">(g_player_service->get_selected());
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -31,7 +31,7 @@ namespace big
|
|||||||
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g_player_service->get_selected()->never_wanted);
|
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g_player_service->get_selected()->never_wanted);
|
||||||
ImGui::Checkbox("SEMI_GODMODE"_T.data(), &g_player_service->get_selected()->semi_godmode);
|
ImGui::Checkbox("SEMI_GODMODE"_T.data(), &g_player_service->get_selected()->semi_godmode);
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
@ -13,7 +13,7 @@ namespace big
|
|||||||
|
|
||||||
components::sub_title("Teleport");
|
components::sub_title("Teleport");
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##teleport", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##teleport", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
components::player_command_button<"playertp">(g_player_service->get_selected());
|
components::player_command_button<"playertp">(g_player_service->get_selected());
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -133,7 +133,7 @@ namespace big
|
|||||||
std::copy(std::begin(current_location), std::end(current_location), std::begin(new_location));
|
std::copy(std::begin(current_location), std::end(current_location), std::begin(new_location));
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
components::sub_title("Toxic");
|
components::sub_title("Toxic");
|
||||||
if (ImGui::ListBoxHeader("##toxic", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##toxic", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
components::player_command_button<"kill">(g_player_service->get_selected(), {});
|
components::player_command_button<"kill">(g_player_service->get_selected(), {});
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -121,7 +121,7 @@ namespace big
|
|||||||
troll::set_bounty_on_player(g_player_service->get_selected(), bounty_value, g.session.anonymous_bounty);
|
troll::set_bounty_on_player(g_player_service->get_selected(), bounty_value, g.session.anonymous_bounty);
|
||||||
});
|
});
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
components::sub_title("Vehicle");
|
components::sub_title("Vehicle");
|
||||||
if (ImGui::ListBoxHeader("##veh", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##veh", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
components::player_command_button<"vehkick">(g_player_service->get_selected(), {});
|
components::player_command_button<"vehkick">(g_player_service->get_selected(), {});
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -42,7 +42,7 @@ namespace big
|
|||||||
|
|
||||||
components::player_command_button<"rcplayer">(g_player_service->get_selected());
|
components::player_command_button<"rcplayer">(g_player_service->get_selected());
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
|
@ -92,9 +92,11 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : components.items)
|
for (auto& item : components.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0))
|
if (ImGui::InputInt(std::format("{} [0,{}]##1", item.label, item.drawable_id_max).c_str(), &item.drawable_id))
|
||||||
{
|
{
|
||||||
|
outfit::check_bounds_drawable(&item); // The game does this on it's own but seems to crash if we call OOB values to fast.
|
||||||
|
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, 0, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, 0, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
||||||
});
|
});
|
||||||
@ -107,9 +109,11 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : components.items)
|
for (auto& item : components.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0))
|
if (ImGui::InputInt(std::format("{} {} [0,{}]##2", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id))
|
||||||
{
|
{
|
||||||
|
outfit::check_bounds_texture(&item); // The game does this on it's own but seems to crash if we call OOB values to fast.
|
||||||
|
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, item.texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
PED::SET_PED_COMPONENT_VARIATION(self::ped, item.id, item.drawable_id, item.texture_id, PED::GET_PED_PALETTE_VARIATION(self::ped, item.id));
|
||||||
});
|
});
|
||||||
@ -122,9 +126,11 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : props.items)
|
for (auto& item : props.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
if (ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0))
|
if (ImGui::InputInt(std::format("{} [0,{}]##3", item.label, item.drawable_id_max).c_str(), &item.drawable_id))
|
||||||
{
|
{
|
||||||
|
outfit::check_bounds_drawable(&item); // The game does this on it's own but seems to crash if we call OOB values to fast.
|
||||||
|
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
if (item.drawable_id == -1)
|
if (item.drawable_id == -1)
|
||||||
PED::CLEAR_PED_PROP(self::ped, item.id, 1);
|
PED::CLEAR_PED_PROP(self::ped, item.id, 1);
|
||||||
@ -140,9 +146,11 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : props.items)
|
for (auto& item : props.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
if (ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0))
|
if (ImGui::InputInt(std::format("{} {} [0,{}]##4", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id))
|
||||||
{
|
{
|
||||||
|
outfit::check_bounds_texture(&item); // The game does this on it's own but seems to crash if we call OOB values to fast.
|
||||||
|
|
||||||
g_fiber_pool->queue_job([item] {
|
g_fiber_pool->queue_job([item] {
|
||||||
PED::SET_PED_PROP_INDEX(self::ped, item.id, item.drawable_id, item.texture_id, TRUE, 1);
|
PED::SET_PED_PROP_INDEX(self::ped, item.id, item.drawable_id, item.texture_id, TRUE, 1);
|
||||||
});
|
});
|
||||||
|
@ -85,8 +85,8 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : components.items)
|
for (auto& item : components.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id), 0);
|
ImGui::InputInt(std::format("{} [0,{}]##1", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id));
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
@ -95,8 +95,8 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : components.items)
|
for (auto& item : components.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id), 0);
|
ImGui::InputInt(std::format("{} {} [0,{}]##2", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id));
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
@ -105,8 +105,8 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : props.items)
|
for (auto& item : props.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
ImGui::InputInt(std::format("{} [0,{}]", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id), 0);
|
ImGui::InputInt(std::format("{} [0,{}]##3", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id));
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
|
|
||||||
@ -115,8 +115,8 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
for (auto& item : props.items)
|
for (auto& item : props.items)
|
||||||
{
|
{
|
||||||
ImGui::SetNextItemWidth(60);
|
ImGui::SetNextItemWidth(120);
|
||||||
ImGui::InputInt(std::format("{} {} [0,{}]", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id), 0);
|
ImGui::InputInt(std::format("{} {} [0,{}]##4", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id));
|
||||||
}
|
}
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace big
|
|||||||
ImGui::PushItemWidth(250);
|
ImGui::PushItemWidth(250);
|
||||||
components::sub_title("Loaded Lua Scipts");
|
components::sub_title("Loaded Lua Scipts");
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##empty", ImVec2(200, 200)))
|
if (ImGui::BeginListBox("##empty", ImVec2(200, 200)))
|
||||||
{
|
{
|
||||||
auto& modules = g_lua_manager->get_modules();
|
auto& modules = g_lua_manager->get_modules();
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ namespace big
|
|||||||
ImGui::Text("No scripts loaded");
|
ImGui::Text("No scripts loaded");
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -268,7 +268,7 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
components::sub_title("SLOT"_T);
|
components::sub_title("SLOT"_T);
|
||||||
if (ImGui::ListBoxHeader("##slot", ImVec2(200, 200)))
|
if (ImGui::BeginListBox("##slot", ImVec2(200, 200)))
|
||||||
{
|
{
|
||||||
for (const auto& [slot, name] : slot_display_names)
|
for (const auto& [slot, name] : slot_display_names)
|
||||||
{
|
{
|
||||||
@ -277,7 +277,7 @@ namespace big
|
|||||||
selected_slot = slot;
|
selected_slot = slot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
@ -307,7 +307,7 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
components::sub_title("MOD"_T);
|
components::sub_title("MOD"_T);
|
||||||
if (ImGui::ListBoxHeader("##mod", ImVec2(240, 200)))
|
if (ImGui::BeginListBox("##mod", ImVec2(240, 200)))
|
||||||
{
|
{
|
||||||
for (const auto& it : mod_display_names[selected_slot])
|
for (const auto& it : mod_display_names[selected_slot])
|
||||||
{
|
{
|
||||||
@ -357,7 +357,7 @@ namespace big
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
@ -375,7 +375,7 @@ namespace big
|
|||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
components::sub_title("STYLE"_T);
|
components::sub_title("STYLE"_T);
|
||||||
if (ImGui::ListBoxHeader("##style", ImVec2(200, 200)))
|
if (ImGui::BeginListBox("##style", ImVec2(200, 200)))
|
||||||
{
|
{
|
||||||
std::string mod_name = mod_display_names[selected_slot][*wheel_stock_mod];
|
std::string mod_name = mod_display_names[selected_slot][*wheel_stock_mod];
|
||||||
auto wheel_mods = wheel_map[mod_name];
|
auto wheel_mods = wheel_map[mod_name];
|
||||||
@ -412,7 +412,7 @@ namespace big
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndGroup();
|
ImGui::EndGroup();
|
||||||
@ -504,7 +504,7 @@ namespace big
|
|||||||
color_type = 8;
|
color_type = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##color_options", ImVec2(120, 254)))
|
if (ImGui::BeginListBox("##color_options", ImVec2(120, 254)))
|
||||||
{
|
{
|
||||||
if (ImGui::Selectable("PRIMARY"_T.data(), color_to_change == 0, ImGuiSelectableFlags_SelectOnClick))
|
if (ImGui::Selectable("PRIMARY"_T.data(), color_to_change == 0, ImGuiSelectableFlags_SelectOnClick))
|
||||||
{
|
{
|
||||||
@ -576,7 +576,7 @@ namespace big
|
|||||||
color_type = 8;
|
color_type = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -590,7 +590,7 @@ namespace big
|
|||||||
// primary and secondary color
|
// primary and secondary color
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::ListBoxHeader("##colors", ImVec2(140, 254)))
|
if (ImGui::BeginListBox("##colors", ImVec2(140, 254)))
|
||||||
{
|
{
|
||||||
if (ImGui::Selectable("CUSTOM"_T.data(), color_type == 8, ImGuiSelectableFlags_SelectOnClick))
|
if (ImGui::Selectable("CUSTOM"_T.data(), color_type == 8, ImGuiSelectableFlags_SelectOnClick))
|
||||||
{
|
{
|
||||||
@ -627,7 +627,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
color_type = 3;
|
color_type = 3;
|
||||||
}
|
}
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (color_to_change == 7)
|
else if (color_to_change == 7)
|
||||||
@ -671,7 +671,7 @@ namespace big
|
|||||||
if (color_to_change == 5)
|
if (color_to_change == 5)
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::ListBoxHeader("##tire_smoke_rgb", ImVec2(140, 254)))
|
if (ImGui::BeginListBox("##tire_smoke_rgb", ImVec2(140, 254)))
|
||||||
{
|
{
|
||||||
for (const auto& it : lsc_tire_smoke_rgb)
|
for (const auto& it : lsc_tire_smoke_rgb)
|
||||||
{
|
{
|
||||||
@ -689,13 +689,13 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (color_to_change == 8)
|
else if (color_to_change == 8)
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::ListBoxHeader("##neon_rgb", ImVec2(140, 254)))
|
if (ImGui::BeginListBox("##neon_rgb", ImVec2(140, 254)))
|
||||||
{
|
{
|
||||||
for (const auto& it : lsc_neon_rgb)
|
for (const auto& it : lsc_neon_rgb)
|
||||||
{
|
{
|
||||||
@ -713,7 +713,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -761,7 +761,7 @@ namespace big
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##color", ImVec2(180, 254)))
|
if (ImGui::BeginListBox("##color", ImVec2(180, 254)))
|
||||||
{
|
{
|
||||||
switch (color_type)
|
switch (color_type)
|
||||||
{
|
{
|
||||||
@ -938,7 +938,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ namespace big
|
|||||||
ImGui::PushItemWidth(250);
|
ImGui::PushItemWidth(250);
|
||||||
ImGui::Text("SAVED_VEHICLES"_T.data());
|
ImGui::Text("SAVED_VEHICLES"_T.data());
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##empty", ImVec2(200, 200)))
|
if (ImGui::BeginListBox("##empty", ImVec2(200, 200)))
|
||||||
{
|
{
|
||||||
for (const auto& pair : vehicle_files)
|
for (const auto& pair : vehicle_files)
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ namespace big
|
|||||||
selected_vehicle_file = pair;
|
selected_vehicle_file = pair;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -86,7 +86,7 @@ namespace big
|
|||||||
components::input_text_with_hint("MODEL_NAME"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
components::input_text_with_hint("MODEL_NAME"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
||||||
|
|
||||||
g_mobile_service->refresh_personal_vehicles();
|
g_mobile_service->refresh_personal_vehicles();
|
||||||
if (ImGui::ListBoxHeader("###personal_veh_list", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 188 - 38 * num_of_rows)}))
|
if (ImGui::BeginListBox("###personal_veh_list", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 188 - 38 * num_of_rows)}))
|
||||||
{
|
{
|
||||||
if (g_mobile_service->personal_vehicles().empty())
|
if (g_mobile_service->personal_vehicles().empty())
|
||||||
{
|
{
|
||||||
@ -176,7 +176,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ namespace big
|
|||||||
components::input_text_with_hint("MODEL_NAME"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
components::input_text_with_hint("MODEL_NAME"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
|
||||||
|
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("###vehicles", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 188 - 38 * 4)}))
|
if (ImGui::BeginListBox("###vehicles", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 188 - 38 * 4)}))
|
||||||
{
|
{
|
||||||
if (self::veh)
|
if (self::veh)
|
||||||
{
|
{
|
||||||
@ -193,7 +193,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
ImGui::Text("NO_VEHICLE_IN_REGISTRY"_T.data());
|
ImGui::Text("NO_VEHICLE_IN_REGISTRY"_T.data());
|
||||||
}
|
}
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ namespace big
|
|||||||
ImGui::PushItemWidth(250);
|
ImGui::PushItemWidth(250);
|
||||||
components::sub_title("CREATOR_SAVED_JOBS"_T);
|
components::sub_title("CREATOR_SAVED_JOBS"_T);
|
||||||
|
|
||||||
if (ImGui::ListBoxHeader("##empty", ImVec2(200, 200)))
|
if (ImGui::BeginListBox("##empty", ImVec2(200, 200)))
|
||||||
{
|
{
|
||||||
for (const auto& pair : creator_files)
|
for (const auto& pair : creator_files)
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@ namespace big
|
|||||||
selected_creator_file = pair;
|
selected_creator_file = pair;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -121,7 +121,7 @@ namespace big
|
|||||||
|
|
||||||
if (!new_template.m_ped_model.empty() && ped_found == g_gta_data_service->peds().end())
|
if (!new_template.m_ped_model.empty() && ped_found == g_gta_data_service->peds().end())
|
||||||
{
|
{
|
||||||
if (ImGui::ListBoxHeader("##pedlist", ImVec2(250, 200)))
|
if (ImGui::BeginListBox("##pedlist", ImVec2(250, 200)))
|
||||||
{
|
{
|
||||||
for (auto& p : g_gta_data_service->peds() | std::ranges::views::values)
|
for (auto& p : g_gta_data_service->peds() | std::ranges::views::values)
|
||||||
{
|
{
|
||||||
@ -135,7 +135,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ namespace big
|
|||||||
|
|
||||||
if (!new_template.m_vehicle_model.empty() && veh_found == g_gta_data_service->vehicles().end())
|
if (!new_template.m_vehicle_model.empty() && veh_found == g_gta_data_service->vehicles().end())
|
||||||
{
|
{
|
||||||
if (ImGui::ListBoxHeader("##vehlist", ImVec2(250, 200)))
|
if (ImGui::BeginListBox("##vehlist", ImVec2(250, 200)))
|
||||||
{
|
{
|
||||||
for (auto& p : g_gta_data_service->vehicles() | std::ranges::views::values)
|
for (auto& p : g_gta_data_service->vehicles() | std::ranges::views::values)
|
||||||
{
|
{
|
||||||
@ -163,7 +163,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ namespace big
|
|||||||
|
|
||||||
if (!new_template.m_weapon_model.empty() && weap_found == g_gta_data_service->weapons().end())
|
if (!new_template.m_weapon_model.empty() && weap_found == g_gta_data_service->weapons().end())
|
||||||
{
|
{
|
||||||
if (ImGui::ListBoxHeader("##weaplist", ImVec2(250, 200)))
|
if (ImGui::BeginListBox("##weaplist", ImVec2(250, 200)))
|
||||||
{
|
{
|
||||||
for (auto& p : g_gta_data_service->weapons() | std::ranges::views::values)
|
for (auto& p : g_gta_data_service->weapons() | std::ranges::views::values)
|
||||||
{
|
{
|
||||||
@ -191,7 +191,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user