mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 21:03:42 -07:00
save-editor: add flag table bit index labels
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
be1e69b8a6
commit
8d4a23109a
1 changed files with 12 additions and 2 deletions
|
@ -572,7 +572,9 @@ void DrawFlagTableArray16(const FlagTable& flagTable, uint16_t row, uint16_t& fl
|
|||
PopStyleCheckbox();
|
||||
if (ImGui::IsItemHovered() && hasDescription) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("%s", UIWidgets::WrappedText(flagTable.flagDescriptions.at(row * 16 + flagIndex), 60).c_str());
|
||||
uint16_t index = row * 16 + flagIndex;
|
||||
const char* desc = flagTable.flagDescriptions.at(index);
|
||||
ImGui::Text("0x%02X: %s", index, UIWidgets::WrappedText(desc, 60).c_str());
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::PopID();
|
||||
|
@ -930,7 +932,15 @@ void DrawFlagsTab() {
|
|||
for (int j = 0; j < flagTable.size + 1; j++) {
|
||||
DrawGroupWithBorder(
|
||||
[&]() {
|
||||
ImGui::Text("%s", fmt::format("{:<2x}", j).c_str());
|
||||
if (j == 0) {
|
||||
for (int k = 0xF; k >= 0; k--) {
|
||||
ImGui::SameLine(37.5 + ((0xF - k) * 33.8));
|
||||
ImGui::Text("%X", k);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Text("%s", fmt::format("{:<2X}", j).c_str());
|
||||
|
||||
switch (flagTable.flagTableType) {
|
||||
case EVENT_CHECK_INF:
|
||||
DrawFlagTableArray16(flagTable, j, gSaveContext.eventChkInf[j]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue