only show Alt hint if header is uncompressed
This commit is contained in:
parent
599e2b75c3
commit
0b16048271
3 changed files with 5 additions and 1 deletions
|
@ -390,7 +390,8 @@ void update_and_render(Arena *arena, App_State &app, f32 delta_time_ms)
|
||||||
b8 hover_display_grouped = !(app.user_input.key_state[KEY_ALT] & KEY_STATE_IS_DOWN);
|
b8 hover_display_grouped = !(app.user_input.key_state[KEY_ALT] & KEY_STATE_IS_DOWN);
|
||||||
Sec_Hover_Info hover_info = get_section_hover_info(scratch.arena, hovered_section, hovered_off - 1,
|
Sec_Hover_Info hover_info = get_section_hover_info(scratch.arena, hovered_section, hovered_off - 1,
|
||||||
app.inspected_file.mem, hover_display_grouped);
|
app.inspected_file.mem, hover_display_grouped);
|
||||||
ImGui::TextColored(ImColor(0.5f, 0.5f, 0.5f), "(Hint: press Alt for single-field hover information)");
|
if (!app.rndata.header_is_compressed)
|
||||||
|
ImGui::TextColored(ImColor(0.5f, 0.5f, 0.5f), "(Hint: press Alt for single-field hover information)");
|
||||||
imgui_render_string_tree(scratch.arena, hover_info.desc->head);
|
imgui_render_string_tree(scratch.arena, hover_info.desc->head);
|
||||||
app.viewer.hovered_range = hover_info.rng;
|
app.viewer.hovered_range = hover_info.rng;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -434,6 +434,7 @@ RNTuple_Data get_rntuple_data(Arena *arena, const Inspected_File &file, String8
|
||||||
rndata.version.patch = file_info.anchor.fVersionPatch;
|
rndata.version.patch = file_info.anchor.fVersionPatch;
|
||||||
rndata.rng_header.start = file_info.anchor.fSeekHeader;
|
rndata.rng_header.start = file_info.anchor.fSeekHeader;
|
||||||
rndata.rng_header.len = file_info.anchor.fNBytesHeader;
|
rndata.rng_header.len = file_info.anchor.fNBytesHeader;
|
||||||
|
rndata.header_is_compressed = file_info.anchor.fNBytesHeader != file_info.anchor.fLenHeader;
|
||||||
rndata.rng_footer.start = file_info.anchor.fSeekFooter;
|
rndata.rng_footer.start = file_info.anchor.fSeekFooter;
|
||||||
rndata.rng_footer.len = file_info.anchor.fNBytesFooter;
|
rndata.rng_footer.len = file_info.anchor.fNBytesFooter;
|
||||||
rndata.rng_anchor.start = file_info.anchor_seek;
|
rndata.rng_anchor.start = file_info.anchor_seek;
|
||||||
|
|
|
@ -74,6 +74,8 @@ struct RNTuple_Data {
|
||||||
Byte_Range rng_footer;
|
Byte_Range rng_footer;
|
||||||
Byte_Range rng_tkeys_list;
|
Byte_Range rng_tkeys_list;
|
||||||
|
|
||||||
|
b8 header_is_compressed;
|
||||||
|
|
||||||
Page_Info_Node *pages;
|
Page_Info_Node *pages;
|
||||||
u64 n_pages;
|
u64 n_pages;
|
||||||
// total number of elements of all pages
|
// total number of elements of all pages
|
||||||
|
|
Loading…
Reference in a new issue