TmpMenu/src/views/world/view_train.cpp
maybegreat48 97a8c5d60b Add more spoofing options and added clang-format (#1020)
* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
2023-03-01 21:27:15 +00:00

44 lines
858 B
C++

#include "util/train.hpp"
#include "views/view.hpp"
#include <imgui_internal.h>
namespace big
{
void view::train()
{
components::button("HIJACK_TRAIN"_T, [] {
train::hijack_train();
});
ImGui::SameLine();
components::button("DELETE_TRAIN"_T, [] {
train::delete_train();
});
if (ImGui::IsItemHovered())
ImGui::SetTooltip("DELETE_TRAIN_DESC"_T.data());
ImGui::SameLine();
components::button("EXIT_TRAIN"_T, [] {
train::exit_train();
});
static float train_speed = 0;
ImGui::SliderFloat("TRAIN_SPEED"_T.data(), &train_speed, -500.f, 500.f);
ImGui::SameLine();
components::button("SET"_T, [] {
train::set_train_speed(train_speed);
});
ImGui::Checkbox("DRIVE_TRAIN"_T.data(), &g.world.train.drive_train);
ImGui::SameLine();
ImGui::Checkbox("DERAIL_TRAIN"_T.data(), &g.world.train.derail_train);
}
}