Added current coordinates in Teleport tab (#1474)

This commit is contained in:
DayibBaba 2023-06-21 10:00:38 +02:00 committed by GitHub
parent 174e1e5412
commit 5d3620a67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,11 +23,20 @@ namespace big
components::sub_title("Movement");
ImGui::Spacing();
components::small_text("Current coordinates");
float coords[3] = {self::pos.x, self::pos.y, self::pos.z};
static float new_location[3];
static float increment = 1;
ImGui::SetNextItemWidth(400);
ImGui::InputFloat3("##currentcoordinates", coords, "%f", ImGuiInputTextFlags_ReadOnly);
ImGui::SameLine();
components::button("Copy to custom", [coords] {
std::copy(std::begin(coords), std::end(coords), std::begin(new_location));
});
components::small_text("Custom teleport");
ImGui::SetNextItemWidth(200);
ImGui::SetNextItemWidth(400);
ImGui::InputFloat3("##Customlocation", new_location);
ImGui::SameLine();
components::button("Teleport", [] {
@ -36,6 +45,8 @@ namespace big
ImGui::Spacing();
components::small_text("Specific movement");
ImGui::Spacing();
ImGui::SetNextItemWidth(200);
ImGui::InputFloat("Distance", &increment);