diff --git a/BigBaseV2/src/gui/window/main/tab_vehicle.cpp b/BigBaseV2/src/gui/window/main/tab_vehicle.cpp new file mode 100644 index 00000000..f8669a1f --- /dev/null +++ b/BigBaseV2/src/gui/window/main/tab_vehicle.cpp @@ -0,0 +1,39 @@ +#include "core/data/speedo_meters.hpp" +#include "core/globals.hpp" +#include "gui/window/main/tabs.hpp" + +namespace big +{ + static char model[12]; + + void tab_main::tab_vehicle() + { + if (ImGui::BeginTabItem("Vehicle")) + { + if (ImGui::TreeNode("Speedo Meter")) + { + SpeedoMeter selected = g.vehicle.speedo_meter; + + if (ImGui::BeginCombo("Weapon", speedo_meters[(int)selected].name)) + { + for (speedo_meter speedo : speedo_meters) + { + if (ImGui::Selectable(speedo.name, speedo.id == selected)) + { + g.vehicle.speedo_meter = speedo.id; + } + + if (speedo.id == selected) + ImGui::SetItemDefaultFocus(); + } + + ImGui::EndCombo(); + } + + ImGui::TreePop(); + } + + ImGui::EndTabItem(); + } + } +} \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/main/tabs.hpp b/BigBaseV2/src/gui/window/main/tabs.hpp index c25ee651..9b66959e 100644 --- a/BigBaseV2/src/gui/window/main/tabs.hpp +++ b/BigBaseV2/src/gui/window/main/tabs.hpp @@ -8,6 +8,7 @@ namespace big public: static void tab_self(); static void tab_spawn(); + static void tab_vehicle(); static void tab_weapons(); }; } \ No newline at end of file diff --git a/BigBaseV2/src/gui/window/window_main.cpp b/BigBaseV2/src/gui/window/window_main.cpp index e4b909d3..96636562 100644 --- a/BigBaseV2/src/gui/window/window_main.cpp +++ b/BigBaseV2/src/gui/window/window_main.cpp @@ -12,6 +12,7 @@ namespace big ImGui::BeginTabBar("tabbar"); tab_main::tab_self(); tab_main::tab_spawn(); + tab_main::tab_vehicle(); tab_main::tab_weapons(); ImGui::EndTabBar(); }