MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / STB_TEXTEDIT_GETCHAR

Function STB_TEXTEDIT_GETCHAR

KBotExt/imgui/imgui_widgets.cpp:3693–3693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3691{
3692 static int STB_TEXTEDIT_STRINGLEN(const ImGuiInputTextState* obj) { return obj->CurLenW; }
3693 static ImWchar STB_TEXTEDIT_GETCHAR(const ImGuiInputTextState* obj, int idx) { return obj->TextW[idx]; }
3694 static float STB_TEXTEDIT_GETWIDTH(ImGuiInputTextState* obj, int line_start_idx, int char_idx) { ImWchar c = obj->TextW[line_start_idx + char_idx]; if (c == '\n') return STB_TEXTEDIT_GETWIDTH_NEWLINE; ImGuiContext& g = *obj->Ctx; return g.Font->GetCharAdvance(c) * (g.FontSize / g.Font->FontSize); }
3695 static int STB_TEXTEDIT_KEYTOTEXT(int key) { return key >= 0x200000 ? 0 : key; }
3696 static ImWchar STB_TEXTEDIT_NEWLINE = '\n';

Callers 10

stb_text_locate_coordFunction · 0.85
is_word_boundaryFunction · 0.85
stb_textedit_keyFunction · 0.85
stb_text_undoFunction · 0.85
stb_text_redoFunction · 0.85
stb_text_makeundo_deleteFunction · 0.85
InputTextExMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected