MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / SetInt

Method SetInt

TheForceEngine/TFE_Ui/imGUI/imgui.cpp:2635–2642  ·  view source on GitHub ↗

FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad because it only happens on explicit interaction (maximum one a frame)

Source from the content-addressed store, hash-verified

2633
2634// FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad because it only happens on explicit interaction (maximum one a frame)
2635void ImGuiStorage::SetInt(ImGuiID key, int val)
2636{
2637 ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
2638 if (it == Data.end() || it->key != key)
2639 Data.insert(it, ImGuiStoragePair(key, val));
2640 else
2641 it->val_i = val;
2642}
2643
2644void ImGuiStorage::SetBool(ImGuiID key, bool val)
2645{

Callers 3

TreeNodeSetOpenMethod · 0.80
TreeNodeBehaviorMethod · 0.80
RemoveMethod · 0.80

Calls 3

ImLowerBoundFunction · 0.85
ImGuiStoragePairClass · 0.85
endMethod · 0.45

Tested by

no test coverage detected