|
|
@@ -610,7 +610,6 @@
|
|
|
#include "imgui_internal.h"
|
|
|
|
|
|
#include <ctype.h> // toupper, isprint
|
|
|
-#include <math.h> // sqrtf, fabsf, fmodf, powf, cosf, sinf, floorf, ceilf
|
|
|
#include <stdlib.h> // NULL, malloc, free, qsort, atoi
|
|
|
#include <stdio.h> // vsnprintf, sscanf, printf
|
|
|
#include <limits.h> // INT_MIN, INT_MAX
|
|
|
@@ -4207,7 +4206,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
|
|
|
|
|
// Update ContentsRegionMax. All the variable it depends on are set above in this function.
|
|
|
window->ContentsRegionRect.Min.x = -window->Scroll.x + window->WindowPadding.x;
|
|
|
- window->ContentsRegionRect.Min.x = -window->Scroll.y + window->WindowPadding.y + window->TitleBarHeight() + window->MenuBarHeight();
|
|
|
+ window->ContentsRegionRect.Min.y = -window->Scroll.y + window->WindowPadding.y + window->TitleBarHeight() + window->MenuBarHeight();
|
|
|
window->ContentsRegionRect.Max.x = -window->Scroll.x - window->WindowPadding.x + (window->SizeContentsExplicit.x != 0.0f ? window->SizeContentsExplicit.x : (window->Size.x - window->ScrollbarSizes.x));
|
|
|
window->ContentsRegionRect.Max.y = -window->Scroll.y - window->WindowPadding.y + (window->SizeContentsExplicit.y != 0.0f ? window->SizeContentsExplicit.y : (window->Size.y - window->ScrollbarSizes.y));
|
|
|
|
|
|
@@ -7761,7 +7760,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
|
|
else if (IsKeyPressedMap(ImGuiKey_Home)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_TEXTSTART | k_mask : STB_TEXTEDIT_K_LINESTART | k_mask); }
|
|
|
else if (IsKeyPressedMap(ImGuiKey_End)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_TEXTEND | k_mask : STB_TEXTEDIT_K_LINEEND | k_mask); }
|
|
|
else if (IsKeyPressedMap(ImGuiKey_Delete) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_DELETE | k_mask); }
|
|
|
- else if (IsKeyPressedMap(ImGuiKey_Backspace) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); }
|
|
|
+ else if (IsKeyPressedMap(ImGuiKey_Backspace) && is_editable) { if (is_ctrl_down && !edit_state.HasSelection()) edit_state.OnKeyPressed(STB_TEXTEDIT_K_WORDLEFT|STB_TEXTEDIT_K_SHIFT); edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); }
|
|
|
else if (IsKeyPressedMap(ImGuiKey_Enter))
|
|
|
{
|
|
|
bool ctrl_enter_for_new_line = (flags & ImGuiInputTextFlags_CtrlEnterForNewLine) != 0;
|
|
|
@@ -9134,10 +9133,10 @@ void ImGui::EndGroup()
|
|
|
}
|
|
|
|
|
|
// Gets back to previous line and continue with horizontal layout
|
|
|
-// pos_x == 0 : follow on previous item
|
|
|
-// pos_x != 0 : align to specified column
|
|
|
-// spacing_w < 0 : use default spacing if column_x==0, no spacing if column_x!=0
|
|
|
-// spacing_w >= 0 : enforce spacing
|
|
|
+// pos_x == 0 : follow right after previous item
|
|
|
+// pos_x != 0 : align to specified x position
|
|
|
+// spacing_w < 0 : use default spacing if pos_x == 0, no spacing if pos_x != 0
|
|
|
+// spacing_w >= 0 : enforce spacing amount
|
|
|
void ImGui::SameLine(float pos_x, float spacing_w)
|
|
|
{
|
|
|
ImGuiWindow* window = GetCurrentWindow();
|