feat(Tabs): Added TabVehicle
This commit is contained in:
parent
7b9ccba06f
commit
c157e88af0
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:
|
||||
static void tab_self();
|
||||
static void tab_spawn();
|
||||
static void tab_vehicle();
|
||||
static void tab_weapons();
|
||||
};
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user