feat(GUI): Simplifying the gui (#118)

Co-authored-by: Maddy <59680197+xM4ddy@users.noreply.github.com>
Co-authored-by: Yimura <andreas.maerten@scarlet.be>
This commit is contained in:
LiamD-Flop
2022-05-04 19:16:40 +02:00
committed by GitHub
parent 93f38b20fc
commit 0bd7c97337
52 changed files with 1766 additions and 1368 deletions

View File

@ -0,0 +1,51 @@
#include "fiber_pool.hpp"
#include "util/session.hpp"
#include "views/view.hpp"
namespace big
{
void view::session() {
for (const SessionType& session_type : sessions)
{
components::button(session_type.name, [session_type] {
session::join_type(session_type);
});
}
if (ImGui::TreeNode("Local Time"))
{
ImGui::Checkbox("Override Time", &g->session.override_time);
if (g->session.override_time)
{
ImGui::SliderInt("Hour", &g->session.custom_time.hour, 0, 23);
ImGui::SliderInt("Minute", &g->session.custom_time.minute, 0, 59);
ImGui::SliderInt("Second", &g->session.custom_time.second, 0, 59);
}
ImGui::TreePop();
}
if (ImGui::TreeNode("Local Weather"))
{
if (ImGui::Button("Clear Override"))
{
g_fiber_pool->queue_job([]
{
MISC::CLEAR_OVERRIDE_WEATHER();
});
}
if(ImGui::ListBox("", &g->session.local_weather, session::weathers, 15))
{
g_fiber_pool->queue_job([]
{
session::local_weather();
});
ImGui::ListBoxFooter();
}
ImGui::TreePop();
}
}
}

View File

@ -0,0 +1,54 @@
#include "views/view.hpp"
#include "fiber_pool.hpp"
#include "util/teleport.hpp"
namespace big
{
void view::spoofing()
{
components::small_text("To spoof any of the below credentials you need to reconnect with the lobby.");
components::small_text("Username");
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
ImGui::Checkbox("Spoof Username", &g->spoofing.spoof_username);
static char name[20];
strcpy_s(name, sizeof(name), g->spoofing.username.c_str());
ImGui::Text("Username:");
ImGui::InputText("##username_input", name, sizeof(name));
if (name != g->spoofing.username)
g->spoofing.username = std::string(name);
ImGui::Separator();
components::small_text("IP Address");
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
ImGui::Checkbox("Spoof IP", &g->spoofing.spoof_ip);
ImGui::Text("IP Address:");
ImGui::DragInt4("##ip_fields", g->spoofing.ip_address, 0, 255);
ImGui::Separator();
components::small_text("Rockstar ID");
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
ImGui::Checkbox("Spoof Rockstar ID", &g->spoofing.spoof_rockstar_id);
ImGui::Text("Rockstar ID:");
ImGui::InputScalar("##rockstar_id_input", ImGuiDataType_U64, &g->spoofing.rockstar_id);
}
}