This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/views/world/view_train.cpp
Maddy f6a6682c86
feat(Self): Part Water (Moses Mode) (#838)
Co-authored-by: TheGreenBandit <106003542+TheGreenBandit@users.noreply.github.com>
2023-01-15 21:39:57 +00:00

46 lines
859 B
C++

#include "views/view.hpp"
#include "util/train.hpp"
#include <imgui_internal.h>
namespace big
{
void view::train()
{
components::button("Hijack Train", []
{
train::hijack_train();
});
ImGui::SameLine();
components::button("Delete Train", []
{
train::delete_train();
});
if (ImGui::IsItemHovered())
ImGui::SetTooltip("You cant delete the train while in it.");
ImGui::SameLine();
components::button("Exit Train", []
{
train::exit_train();
});
static float train_speed = 0;
ImGui::SliderFloat("Train Speed", &train_speed, -500.f, 500.f);
ImGui::SameLine();
components::button("Set", [] { train::set_train_speed(train_speed); });
ImGui::Checkbox("Drive Train", &g.world.train.drive_train);
ImGui::SameLine();
ImGui::Checkbox("Derail Train", &g.world.train.derail_train);
}
}