mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 21:03:42 -07:00
Add collision viewer
This commit is contained in:
parent
e4dd7027a9
commit
d0c5e7aa0e
12 changed files with 794 additions and 78 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "debugSaveEditor.h"
|
||||
#include "../../util.h"
|
||||
#include "../libultraship/SohImGuiImpl.h"
|
||||
#include "ImGuiHelpers.h"
|
||||
|
||||
#include <array>
|
||||
#include <bit>
|
||||
|
@ -224,26 +225,6 @@ std::array<SongMapEntry, 12> songMapping = { {
|
|||
SONG_MAP_ENTRY(QUEST_SONG_PRELUDE, 255, 240, 100),
|
||||
} };
|
||||
|
||||
// Adds a text tooltip for the previous ImGui item
|
||||
void SetLastItemHoverText(const std::string& text) {
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text(text.c_str());
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
// Adds a "?" next to the previous ImGui item with a custom tooltip
|
||||
void InsertHelpHoverText(const std::string& text) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.7f, 0.7f, 0.7f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text(text.c_str());
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
// Encapsulates what is drawn by the passed-in function within a border
|
||||
template<typename T>
|
||||
void DrawGroupWithBorder(T&& drawFunc) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue