@@ -60,15 +60,15 @@ namespace hex::plugin::builtin {
60
60
void drawNode () override {
61
61
static const std::string Header = " Address 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F " ;
62
62
63
- if (ImGui::BeginChild (" ##hex_view" , scaled ( ImVec2 (ImGui::CalcTextSize (Header.c_str ()).x , 200 ) ), true )) {
63
+ if (ImGui::BeginChild (" ##hex_view" , ImVec2 (ImGui::CalcTextSize (Header.c_str ()).x , 200_scaled ), true )) {
64
64
ImGui::TextUnformatted (Header.c_str ());
65
65
66
66
auto size = m_buffer.size ();
67
67
ImGuiListClipper clipper;
68
68
69
69
clipper.Begin ((size + 0x0F ) / 0x10 );
70
70
71
- while (clipper.Step ())
71
+ while (clipper.Step ()) {
72
72
for (auto y = clipper.DisplayStart ; y < clipper.DisplayEnd ; y++) {
73
73
auto lineSize = ((size - y * 0x10 ) < 0x10 ) ? size % 0x10 : 0x10 ;
74
74
@@ -94,6 +94,7 @@ namespace hex::plugin::builtin {
94
94
95
95
ImGui::TextUnformatted (line.c_str ());
96
96
}
97
+ }
97
98
clipper.End ();
98
99
}
99
100
ImGui::EndChild ();
@@ -119,13 +120,14 @@ namespace hex::plugin::builtin {
119
120
ImGuiListClipper clipper;
120
121
clipper.Begin ((string.length () + (LineLength - 1 )) / LineLength);
121
122
122
- while (clipper.Step ())
123
+ while (clipper.Step ()) {
123
124
for (auto i = clipper.DisplayStart ; i < clipper.DisplayEnd ; i++) {
124
125
auto line = string.substr (i * LineLength, LineLength);
125
126
ImGui::TextUnformatted (" " );
126
127
ImGui::SameLine ();
127
128
ImGui::TextUnformatted (line.data (), line.data () + line.length ());
128
129
}
130
+ }
129
131
130
132
clipper.End ();
131
133
}
0 commit comments