Editor+ (#745)
* feat(Toxic): add send to island * feat(mobile): add helicopter backup * refractor(mobile): update seperator * feat(Troll): add set bounty * tps tp all to island tp all to eclipse tp to eclipse * working hijack &, delete. + placeholders * speed, derail * drive train, working derail * improved drive train * exit train, rework delete * using CReplayInterface
This commit is contained in:
46
src/views/world/view_train.cpp
Normal file
46
src/views/world/view_train.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#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.train.drive_train);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("Derail Train", &g.train.derail_train);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user