mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-17 21:56:36 +00:00
InputText: Added ImGuiInputTextFlags_AlwaysInsertMode flag
This commit is contained in:
parent
d2701727b9
commit
827ff970cd
@ -7120,6 +7120,8 @@ static bool InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
edit_state.StbState.select_start = ImMin(edit_state.StbState.select_start, edit_state.CurLenW);
|
||||
edit_state.StbState.select_end = ImMin(edit_state.StbState.select_end, edit_state.CurLenW);
|
||||
}
|
||||
if (flags & ImGuiInputTextFlags_AlwaysInsertMode)
|
||||
edit_state.StbState.insert_mode = true;
|
||||
if (!is_multiline && (focus_requested_by_tab || (user_clicked && is_ctrl_down)))
|
||||
select_all = true;
|
||||
}
|
||||
|
1
imgui.h
1
imgui.h
@ -462,6 +462,7 @@ enum ImGuiInputTextFlags_
|
||||
ImGuiInputTextFlags_AllowTabInput = 1 << 10, // Pressing TAB input a '\t' character into the text field
|
||||
ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11, // In multi-line mode, allow exiting edition by pressing Enter. Ctrl+Enter to add new line (by default adds new lines with Enter).
|
||||
ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12, // Disable following the cursor horizontally
|
||||
ImGuiInputTextFlags_AlwaysInsertMode = 1 << 13, // Insert mode
|
||||
// [Internal]
|
||||
ImGuiInputTextFlags_Multiline = 1 << 20 // For internal use by InputTextMultiline()
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user