1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-22 01:54:21 +00:00

Moving InputTextHinted code to InputTextEx

This commit is contained in:
Lucas Lazare 2019-03-05 11:45:13 -05:00
parent b0d1723a2f
commit 8e04908631
4 changed files with 43 additions and 53 deletions

View file

@ -485,8 +485,7 @@ static void ShowDemoWindowWidgets()
ImGui::SameLine(); ShowHelpMarker("USER:\nHold SHIFT or use mouse to select text.\n" "CTRL+Left/Right to word jump.\n" "CTRL+A or double-click to select all.\n" "CTRL+X,CTRL+C,CTRL+V clipboard.\n" "CTRL+Z,CTRL+Y undo/redo.\n" "ESCAPE to revert.\n\nPROGRAMMER:\nYou can use the ImGuiInputTextFlags_CallbackResize facility if you need to wire InputText() to a dynamic string type. See misc/cpp/imgui_stdlib.h for an example (this is not demonstrated in imgui_demo.cpp).");
static char str1[128] = "";
static bool is_user_data = false;
ImGui::InputTextHinted("hinted input text", "type text here", str1, IM_ARRAYSIZE(str1), &is_user_data);
ImGui::InputTextHinted("hinted input text", "type text here", str1, IM_ARRAYSIZE(str1));
static int i0 = 123;
ImGui::InputInt("input int", &i0);