mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-22 16:52:30 +08:00
feat(Tabs): Added TabVehicle
This commit is contained in:
39
BigBaseV2/src/gui/window/main/tab_vehicle.cpp
Normal file
39
BigBaseV2/src/gui/window/main/tab_vehicle.cpp
Normal file
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,7 @@ namespace big
|
|||||||
public:
|
public:
|
||||||
static void tab_self();
|
static void tab_self();
|
||||||
static void tab_spawn();
|
static void tab_spawn();
|
||||||
|
static void tab_vehicle();
|
||||||
static void tab_weapons();
|
static void tab_weapons();
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -12,6 +12,7 @@ namespace big
|
|||||||
ImGui::BeginTabBar("tabbar");
|
ImGui::BeginTabBar("tabbar");
|
||||||
tab_main::tab_self();
|
tab_main::tab_self();
|
||||||
tab_main::tab_spawn();
|
tab_main::tab_spawn();
|
||||||
|
tab_main::tab_vehicle();
|
||||||
tab_main::tab_weapons();
|
tab_main::tab_weapons();
|
||||||
ImGui::EndTabBar();
|
ImGui::EndTabBar();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user