MCPcopy Create free account
hub / github.com/aardappel/treesheets / VarsToGUI

Function VarsToGUI

lobster/src/imbind.cpp:191–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191void VarsToGUI(VM &vm) {
192 auto DumpVars = [&](bool constants) {
193 for (uint i = 0; i < vm.bcf->specidents()->size(); i++) {
194 auto &val = vm.vars[i];
195 auto sid = vm.bcf->specidents()->Get(i);
196 auto id = vm.bcf->idents()->Get(sid->ididx());
197 if (!id->global() || id->readonly() != constants) continue;
198 auto name = id->name()->string_view();
199 auto &ti = vm.GetVarTypeInfo(i);
200 #if RTT_ENABLED
201 if (ti.t != val.type) continue; // Likely uninitialized.
202 #endif
203 ValToGUI(vm, &val, ti, name, false);
204 if (IsStruct(ti.t)) i += ti.len - 1;
205 }
206 };
207 DumpVars(false);
208 if (ImGui::TreeNodeEx("Constants", 0)) {
209 DumpVars(true);
210 ImGui::TreePop();
211 }
212}
213
214void EngineStatsGUI() {
215 auto &ft = SDLGetFrameTimeLog();

Callers 1

AddIMGUIFunction · 0.85

Calls 5

ValToGUIFunction · 0.85
string_viewMethod · 0.80
IsStructFunction · 0.50
sizeMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected