|
@@ -4206,6 +4206,7 @@ void ImGuiInputTextState::ClearSelection() { Stb->select_start
|
|
int ImGuiInputTextState::GetCursorPos() const { return Stb->cursor; }
|
|
int ImGuiInputTextState::GetCursorPos() const { return Stb->cursor; }
|
|
int ImGuiInputTextState::GetSelectionStart() const { return Stb->select_start; }
|
|
int ImGuiInputTextState::GetSelectionStart() const { return Stb->select_start; }
|
|
int ImGuiInputTextState::GetSelectionEnd() const { return Stb->select_end; }
|
|
int ImGuiInputTextState::GetSelectionEnd() const { return Stb->select_end; }
|
|
|
|
+float ImGuiInputTextState::GetPreferredOffsetX() const { return Stb->has_preferred_x ? Stb->preferred_x : -1; }
|
|
void ImGuiInputTextState::SelectAll() { Stb->select_start = 0; Stb->cursor = Stb->select_end = TextLen; Stb->has_preferred_x = 0; }
|
|
void ImGuiInputTextState::SelectAll() { Stb->select_start = 0; Stb->cursor = Stb->select_end = TextLen; Stb->has_preferred_x = 0; }
|
|
void ImGuiInputTextState::ReloadUserBufAndSelectAll() { WantReloadUserBuf = true; ReloadSelectionStart = 0; ReloadSelectionEnd = INT_MAX; }
|
|
void ImGuiInputTextState::ReloadUserBufAndSelectAll() { WantReloadUserBuf = true; ReloadSelectionStart = 0; ReloadSelectionEnd = INT_MAX; }
|
|
void ImGuiInputTextState::ReloadUserBufAndKeepSelection() { WantReloadUserBuf = true; ReloadSelectionStart = Stb->select_start; ReloadSelectionEnd = Stb->select_end; }
|
|
void ImGuiInputTextState::ReloadUserBufAndKeepSelection() { WantReloadUserBuf = true; ReloadSelectionStart = Stb->select_start; ReloadSelectionEnd = Stb->select_end; }
|
|
@@ -5269,6 +5270,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
// Store text height (note that we haven't calculated text width at all, see GitHub issues #383, #1224)
|
|
// Store text height (note that we haven't calculated text width at all, see GitHub issues #383, #1224)
|
|
if (is_multiline)
|
|
if (is_multiline)
|
|
text_size = ImVec2(inner_size.x, line_count * g.FontSize);
|
|
text_size = ImVec2(inner_size.x, line_count * g.FontSize);
|
|
|
|
+ state->LineCount = line_count;
|
|
}
|
|
}
|
|
|
|
|
|
// Scroll
|
|
// Scroll
|