mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Merge remote-tracking branch 'origin' into 2016-07-navigation
This commit is contained in:
commit
f72e2fd1b1
@ -168,13 +168,14 @@ Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Bin
|
||||
Ongoing ImGui development is financially supported on [**Patreon**](http://www.patreon.com/imgui).
|
||||
|
||||
Double-chocolate sponsors:
|
||||
- Media Molecule, Mobigame
|
||||
- Media Molecule
|
||||
- Mobigame
|
||||
|
||||
Salty caramel supporters:
|
||||
- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Stefano Cristiano, Chris Genova, ikrima
|
||||
- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Stefano Cristiano, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko.
|
||||
|
||||
Caramel supporters:
|
||||
- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley.
|
||||
- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society.
|
||||
|
||||
And other supporters; thanks!
|
||||
|
||||
|
12
imgui.cpp
12
imgui.cpp
@ -153,6 +153,7 @@
|
||||
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
|
||||
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2016/07/30 (1.50) - SameLine(x) with x>0.0f is now relative to left of column/group if any, and not always to left of window. This was sort of always the intent and hopefully breakage should be minimal.
|
||||
- 2016/07/18 (1.50) - renamed IsMouseHoveringAnyWindow() to IsAnyWindowHovered() for consistency. Kept inline redirection function (will obsolete).
|
||||
- renamed IsPosHoveringAnyWindow() to IsAnyWindowHoveredAtPos() for consistency. Kept inline redirection function (will obsolete).
|
||||
- renamed IsMouseHoveringWindow() to IsWindowHoveredRect() for consistency. Kept inline redirection function (will obsolete).
|
||||
@ -4878,6 +4879,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
|
||||
|
||||
// Setup drawing context
|
||||
window->DC.IndentX = 0.0f + window->WindowPadding.x - window->Scroll.x;
|
||||
window->DC.GroupOffsetX = 0.0f;
|
||||
window->DC.ColumnsOffsetX = 0.0f;
|
||||
window->DC.CursorStartPos = window->Pos + ImVec2(window->DC.IndentX + window->DC.ColumnsOffsetX, window->TitleBarHeight() + window->MenuBarHeight() + window->WindowPadding.y - window->Scroll.y);
|
||||
window->DC.CursorPos = window->DC.CursorStartPos;
|
||||
@ -9986,7 +9988,8 @@ void ImGui::BeginGroup()
|
||||
group_data.BackupLogLinePosY = window->DC.LogLinePosY;
|
||||
group_data.AdvanceCursor = true;
|
||||
|
||||
window->DC.IndentX = window->DC.CursorPos.x - window->Pos.x - window->DC.ColumnsOffsetX;
|
||||
window->DC.GroupOffsetX = window->DC.CursorPos.x - window->Pos.x - window->DC.ColumnsOffsetX;
|
||||
window->DC.IndentX = window->DC.GroupOffsetX;
|
||||
window->DC.CursorMaxPos = window->DC.CursorPos;
|
||||
window->DC.CurrentLineHeight = 0.0f;
|
||||
window->DC.LogLinePosY = window->DC.CursorPos.y - 9999.0f;
|
||||
@ -10010,6 +10013,7 @@ void ImGui::EndGroup()
|
||||
window->DC.CurrentLineHeight = group_data.BackupCurrentLineHeight;
|
||||
window->DC.CurrentLineTextBaseOffset = group_data.BackupCurrentLineTextBaseOffset;
|
||||
window->DC.IndentX = group_data.BackupIndentX;
|
||||
window->DC.GroupOffsetX = window->DC.IndentX;
|
||||
window->DC.LogLinePosY = window->DC.CursorPos.y - 9999.0f;
|
||||
|
||||
if (group_data.AdvanceCursor)
|
||||
@ -10026,7 +10030,7 @@ void ImGui::EndGroup()
|
||||
|
||||
// Gets back to previous line and continue with horizontal layout
|
||||
// pos_x == 0 : follow right after previous item
|
||||
// pos_x != 0 : align to specified x position
|
||||
// pos_x != 0 : align to specified x position (relative to window/group left)
|
||||
// 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)
|
||||
@ -10039,7 +10043,7 @@ void ImGui::SameLine(float pos_x, float spacing_w)
|
||||
if (pos_x != 0.0f)
|
||||
{
|
||||
if (spacing_w < 0.0f) spacing_w = 0.0f;
|
||||
window->DC.CursorPos.x = window->Pos.x - window->Scroll.x + pos_x + spacing_w;
|
||||
window->DC.CursorPos.x = window->Pos.x - window->Scroll.x + pos_x + spacing_w + window->DC.GroupOffsetX + window->DC.ColumnsOffsetX;
|
||||
window->DC.CursorPos.y = window->DC.CursorPosPrevLine.y;
|
||||
}
|
||||
else
|
||||
@ -10222,7 +10226,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
|
||||
if (held)
|
||||
{
|
||||
if (g.ActiveIdIsJustActivated)
|
||||
g.ActiveIdClickOffset.x -= 4; // Store from center of column line
|
||||
g.ActiveIdClickOffset.x -= 4; // Store from center of column line (we used a 8 wide rect for columns clicking)
|
||||
x = GetDraggedColumnOffset(i);
|
||||
SetColumnOffset(i, x);
|
||||
}
|
||||
|
@ -618,6 +618,7 @@ struct IMGUI_API ImGuiDrawContext
|
||||
int StackSizesBackup[6]; // Store size of various stacks for asserting
|
||||
|
||||
float IndentX; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
|
||||
float GroupOffsetX;
|
||||
float ColumnsOffsetX; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
|
||||
int ColumnsCurrent;
|
||||
int ColumnsCount;
|
||||
|
Loading…
Reference in New Issue
Block a user