omar
1c67d09c0b
ColorPicker: Fix assertion when running in a collapsed window and dragging its title bar ( #2389 )
2019-03-01 00:06:36 +01:00
omar
ff0c6c2bde
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
2019-02-27 19:00:09 +01:00
omar
f02705fbaa
InputInt, InputScalar: +/- buttons now respects the natural type limits instead of overflowing or underflowing the value.
2019-02-27 18:59:17 +01:00
omar
736d3e2654
DragScalar, InputScalar, SliderScalar: Added support for u8/s8/u16/s16 data types. We are reusing function instances for larger types to reduce code size. ( #643 , #320 , #708 , #1011 )
2019-02-27 18:16:03 +01:00
omar
ac47710db7
Internal: InputText: Tweaks to make PVS static analyzer relax a little with its false positive.
2019-02-27 16:49:55 +01:00
omar
6de09a5e48
Renamed ColorEdit/ColorPicker's ImGuiColorEditFlags_RGB/_HSV/_HEX flags to respectively ImGuiColorEditFlags_DisplayRGB/_DisplayHSV/_DisplayHex. This is anticipation of adding new flags to ColorEdit/ColorPicker functions which would make those ambiguous. ( #2384 ) [@haldean]
2019-02-27 16:45:58 +01:00
haldean
8a2f6866a6
add _Show prefix to color flags that control inputs, rename __InputsMask to __ShowMask
...
This is anticipation of changing __InputsMask to control the format of
input colors, and adding _InputRGB and _InputHSV to change how input
colors are interpreted.
2019-02-27 16:24:15 +01:00
omar
def723b6b6
Plot: Fixed error in 5e3a1de
( #2387 )
2019-02-27 14:34:11 +01:00
omar
5e3a1de4e6
Plot: Fixed divide-by-zero in PlotLines() when passing a count of 1. ( #2387 ) [@Lectem]
2019-02-27 14:25:37 +01:00
omar
6b43a314bf
Merge branch 'master' into docking
2019-02-26 12:53:38 +01:00
omar
cf3cb7cf7e
InputText: Fixed various display corruption related to swapping the underlying buffer while a input widget is active (both for writable and read-only paths). Often they would manifest when manipulating the scrollbar of a multi-line input text.
2019-02-26 12:50:44 +01:00
omar
b7b82520b4
Internal: InputText: Minor changes (intended to have side-effect but clarify next commit, however there is rarely such a thing as zero side effect in InputText land!)
2019-02-26 12:28:27 +01:00
omar
439f726945
InputText; Disabled rendering selection when inactive (it kinda work but I'm not sure this is desirable especially for single-line input, was not intended to be active).
2019-02-24 23:31:00 +01:00
omar
8915f7933a
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2019-02-24 23:24:07 +01:00
omar
6f80179a1d
InputText: Fixed deactivated but-last-active InputText instance holding on displaying the last active version of the text and not reflecting change in the source. Fix/amend 2e9a175
. [+test]
2019-02-23 17:04:54 +01:00
omar
cd67d4d3c1
Log/Capture: Fixed LogXXX functions 'auto_open_depth' parameter being treated as an absolute tree depth instead of a relative one. Fixed CollapsingHeader trailing ascii representation being "#" instead of "##". Minor tidying up the of code.
2019-02-23 16:07:01 +01:00
omar
87ded34f9f
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# examples/imgui_impl_opengl3.cpp
# imgui_widgets.cpp
2019-02-22 12:29:18 +01:00
omar
9da48c16c5
TabBar: Added extra mis-usage error recovery. Past the assert, common mis-usage don't lead to hard crashes any more, facilitating integration with scripting languages. ( #1651 )
2019-02-22 12:27:41 +01:00
omar
0f83145aa8
TabBar: Fixed a crash when using BeginTabBar() recursively (didn't affect docking). ( #2371 )
...
Added ImPool::Contains() helper.
2019-02-22 12:24:27 +01:00
omar
f988618ebe
Internal: InputText: Tweaks (including a large indentation change, compare ignoring space) to make next commit more digestible.
2019-02-21 23:06:26 +01:00
omar
be593f2c16
Internal: InputText: refactor the flow to easily decorrelate rendering of selection vs cursor, which would allow us to render selection on inactive items, and generally makes the code clearer. + Some renaming.
2019-02-21 22:56:09 +01:00
omar
332f8f2462
Internal: InputText: Made clipboard copy/cut use its own temporary buffer (like paste) so we can guarantee that TempBuffer if not altered and can be preserved. Renamed TempBufferA to TextA to celebrate this.
2019-02-21 19:55:37 +01:00
omar
81a8730022
Internal: InputText: Renamed is_editable to !is_readonly, Hopefully more explicit. Renamed internal member. Shuffled some code. Added comments, assert (_will_ trigger on !readonly > readonly edge, old bug).
2019-02-21 19:55:36 +01:00
omar
cc3be5d428
InputText: Fixed an edge case crash that would happen if another widget sharing the same ID is being swapped with an InputText that has yet to be activated.
2019-02-21 19:55:36 +01:00
omar
2e9a175057
Internal: InputText: Refactor to clarify access pattern to the InputTextState (we are now accessing via a pointer which can be NULL, shortened its name while we are at it) + added an assert to track an issue that existed already before.
2019-02-21 19:55:36 +01:00
omar
677e64e71e
Internal: InputText: Comments. Renamed internal member. Renamed ImGuiStb->ImStb.
2019-02-20 21:34:08 +01:00
omar
782b747a17
InputText: Renamed some local variables to clarify code. Should be a no-op functionality wise. TODO items.
2019-02-20 00:45:45 +01:00
omar
7c51cba74f
InputInt, InputFloat, InputScalar: Fix to keep the label of the +/- buttons centered when style.FramePadding.x is abnormally larger than style.FramePadding.y. Since the buttons are meant to be square (to align with e.g. color button) we always use FramePadding.y. ( #2367 )
2019-02-20 00:20:11 +01:00
omar
257f5d204e
Version 1.69 WIP
2019-02-20 00:11:36 +01:00
omar
93b06e6e7c
Internal: Changed Scrollbar() signature. Using GetScrollbarID() in InputTextMultiline().
...
Removed multiple semi-colons (#2368 )
2019-02-20 00:08:21 +01:00
omar
77833003ff
Fixed unused argument warning when compiling with IM_ASERT() evaluating to an empty macro.
2019-02-19 17:32:14 +01:00
omar
9dc02464a4
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2019-02-19 13:04:35 +01:00
omar
3c15dffc94
Version 1.68
2019-02-19 12:50:46 +01:00
omar
7573d10a4a
Docking: Fixed bad ever-growing/ leak (accumulating text into TabsNames forever, fix d38f4dc14
from February 5th, affected docking branch only). ( #2109 )
2019-02-18 16:50:39 +01:00
omar
09c9bf2edb
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
2019-02-14 20:35:11 +01:00
haldean
b277cfffc8
Selectable: add support for specifying text alignment on selectables ( #2347 )
...
Adds a style variable to Selectable that allows clients to specify the
text alignment within Selectables, adds a section in the demo to
demonstrate selectable text alignment, and a pair of sliders in the
style editor to change selectable alignment on the fly.
In terms of implementation, this one is extremely simple: Selectable was
already calling an API that supports text alignment, but had hard-coded
it to top-left. This changes that to just pass the style variable
straight through to RenderTextClipped. Backwards-compatibility is
preserved by defaulting the text_align parameter to (0, 0), i.e.,
top-left.
This also fixes a bug with selectable text rendering that caused
right-aligned text in a selectable to be clipped incorrectly, because
the wrong clipping rectangle was being used.
2019-02-14 19:38:57 +01:00
omar
0236bc246f
Scrollbar: Fade out and disable interaction when too small, in order to facilitate using the resize grab on very small window, as well as reducing visual noise/overlap. (+1 squashed commits)
...
Internals: Added GetScrollbarID(). (#1185 )
2019-02-14 14:07:59 +01:00
omar
0640b6e67c
Shallow tweaks
2019-02-12 22:15:19 +01:00
omar
2cada3c143
Merge branch 'master' into docking
...
# Conflicts:
# examples/imgui_impl_opengl2.cpp
# examples/imgui_impl_opengl3.cpp
# imgui.cpp
# imgui_widgets.cpp
2019-02-11 18:59:49 +01:00
omar
1b63ded8fa
Tabs: Fixed border (when enabled) so it is aligned correctly mid-pixel and appears as bright as other borders.
2019-02-07 12:07:53 +01:00
omar
4a3a895be9
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_demo.cpp
2019-02-06 14:47:53 +01:00
omar
29d38b59d0
ListBox/InputTextMultiline: Better optimized when clipped / non-visible.
2019-02-06 14:46:14 +01:00
omar
62084aac0f
DragScalarN, SliderScalarN, InputScalarN: Removed unnecessary string id after the integer PushID() calls.
2019-02-06 14:39:00 +01:00
omar
f366828dd2
Minor tweaks to reduce false positive of PVS Studio static analyzer.
2019-02-06 13:16:52 +01:00
omar
5bdc7d7a6f
Menus: Tweaked horizontal overlap between parent and child menu (to help convey relative depth) from using style.ItemSpacing.x to style.ItemInnerSpacing.x, the later being expected to be smaller. ( #1086 )
2019-02-06 12:32:10 +01:00
omar
97ed97b8ce
Plot: Register an ID to take the click the same way as other framed widgets. Set HoveredId in the FramePadding zone (between inner_bb and frame_bb).
2019-02-05 21:17:04 +01:00
omar
cef4e086ba
Internals: Selectable: Fixed rendering width miscalculation when starting pos is not line start pos, which would generally be unnoticeable. Could affect group lock X with a smaller SetCursorPos value but that's unlikely to be used.
2019-02-05 21:17:00 +01:00
omar
521470b3cd
Internals: Removed unnecessary code.
2019-02-05 21:16:32 +01:00
omar
be107ba8f8
Merge branch 'master' into docking
...
# Conflicts:
# imgui_internal.h
# imgui_widgets.cpp
2019-02-05 13:52:32 +01:00
omar
b980e0077a
Tabs: Moved Tab List Popup to left-side to match docking button. Highlight selected tab. ( #261 , #351 )
2019-02-05 13:39:48 +01:00
omar
d38f4dc143
Tabs: Non-docking tab bars are storing names to allow tab list button + whole style scaling. Added ImGuiTabBarFlags_TabListPopupButton flag to show a popup button on manual tab bars. Locking FramePadding for the scope of a tab-bar to avoid sheering/clipping of tab item. Made scaling of tab ellipsis less awkward. ( #261 , #351 )
2019-02-05 13:23:44 +01:00
omar
f7c879eb60
RadioButton: Fixed label horizontal alignment to precisely match Checkbox(). + Internals: Checkbox, RadioButton: Single call to ItemSize() for flow layout purpose.
2019-02-04 23:34:32 +01:00
omar
0b05ba18df
Internals: DragScalar, SliderScalar: Calling ItemSize before ItemAdd as with every other widgets so we can more easily rearrange the signature of ItemXXX functions (toward allowing non-rounded sizes for scaling and flow layout).
2019-02-04 23:34:27 +01:00
omar
d1c45c0d76
Merge branch 'master' into docking (enable range_select merge)
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2019-02-01 12:25:49 +01:00
omar
d5945aa25b
Internals: Minor changes to TreeNodeBehavior() and Selectable() for the benefit of fhe range_select branch. ( #1861 )
2019-02-01 12:14:38 +01:00
omar
0d4a2a2cd0
Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. ( #1861 )
2019-02-01 12:14:37 +01:00
omar
f906d53f7d
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2019-01-31 19:19:35 +01:00
omar
dc8ff68871
Docking: VisibleWindow of a node spread its _NoMove attribute to the node (fixed dragging or undocking of dock node host from collapse button). ( #2325 , #2109 )
2019-01-31 15:22:40 +01:00
omar
5536edede9
Docking: Fixed faulty undocking of windows with the _NoMove flag. ( #2325 , #2109 )
...
Whereas BeginAsDockableDragDropTarget could be reworked to filter, we simply set g.HoveredWindowUnderMovingWindow to be NULL when MovingWindow is not set, which was the initial intent.
Also fixed some comments and removed unused braces in TabItemEx().
2019-01-31 14:59:45 +01:00
omar
578e15f006
Docking: Removed unnecessary ImGuiTabItemFlags_DockedWindow internal flag.
2019-01-31 14:55:00 +01:00
omar
1fb57c97c6
Internals: InputScalarAsWidgetReplacement: Fixed seemingly unnecessary calling of SetActiveID/SetHoveredID every frame, which in turns allow us to remove the g.ActiveIdAllow/Block settings duplicated.
2019-01-30 15:41:20 +01:00
omar
fb4f1ff7f6
InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. ( #2321 , #787 )
2019-01-30 15:16:09 +01:00
omar
158995f271
InputText: Fixed a bug where ESCAPE would not restore the initial value in all situations. ( #2321 ) [@relick]
2019-01-30 13:15:14 +01:00
omar
0a233a505d
imgui-test: Added extra item info callbacks. Using nav_bb for interactions when possible. Comments, Demo tweaks.
2019-01-30 12:53:01 +01:00
omar
13a5f5ba8b
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2019-01-27 16:46:35 +01:00
omar
4e8e177cac
Persistently fixing some PVS-Studio static analyzer false positive warnings.
2019-01-27 16:35:48 +01:00
omar
ee3b4f2bf1
Using IM_UNUSED() macro.
2019-01-27 16:23:23 +01:00
omar
c3c2cd1e82
Fix various XCode and PVS-Studio static analyzer warnings ( #2309 )
2019-01-27 16:18:23 +01:00
omar
07ff47bf1b
Docking: Fixed various border / padding related inconsistency with dock node vs floating windows. ( #2109 )
2019-01-23 19:54:45 +01:00
omar
9f96fcff3c
Docking: Added ImGuiDockNodeFlags_Dockspace instead of node internal IsDockspace toward allowing the DockBuilder API to create non-dockspace nodes.
2019-01-23 19:24:34 +01:00
omar
0947fa3de0
Merge branch 'viewport' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2019-01-21 16:54:37 +01:00
omar
cb9a6b8a8b
Merge branch 'master' into viewport
...
# Conflicts:
# examples/README.txt
# imgui.cpp
2019-01-21 16:52:22 +01:00
omar
f14f93ef6e
Fixed range-version of PushID() and GetID() not honoring the ### operator to restart from the seed value.
2019-01-21 16:50:27 +01:00
omar
f94af2f5c5
Merge branch 'viewport' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
# imgui_draw.cpp
2019-01-20 22:13:35 +01:00
omar
8079344cee
Merge branch 'master' into viewport
...
# Conflicts:
# examples/example_sdl_vulkan/main.cpp
# examples/imgui_impl_dx11.cpp
# examples/imgui_impl_dx12.cpp
# examples/imgui_impl_glfw.cpp
# examples/imgui_impl_sdl.cpp
# examples/imgui_impl_vulkan.h
# imgui.cpp
2019-01-20 22:12:06 +01:00
omar
2c38b32db1
Removed trailing spaces ( #2038 , #2299 )
2019-01-20 17:56:17 +01:00
omar
f94ba546ba
Added checks for "zero-as-null-pointer-constant" warnings for older Clang ( #2299 , followup to #2277 )
2019-01-20 17:46:00 +01:00
omar
e9c625a1dc
Merge branch 'master' into viewport
...
# Conflicts:
# docs/CHANGELOG.txt
# examples/imgui_impl_win32.cpp
# imgui_demo.cpp
2019-01-17 14:05:40 +01:00
omar
d1851ed6b7
Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!) [docking branch]
2019-01-16 16:19:38 +01:00
omar
32c4e01267
Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!)
2019-01-16 16:13:23 +01:00
omar
06aaf23877
Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!)
2019-01-16 16:10:51 +01:00
omar
8a45c56c2c
Merge branch 'viewport' into docking
2019-01-15 21:22:29 +01:00
omar
9391a97fbf
Merge branch 'master' into viewport
...
# Conflicts:
# docs/CHANGELOG.txt
# examples/imgui_impl_win32.cpp
# examples/imgui_impl_win32.h
2019-01-15 21:22:21 +01:00
omar
95ee99e6aa
Version 1.68 WIP
2019-01-15 20:19:05 +01:00
omar
ff4bd758ca
Merge branch 'viewport' into docking
2019-01-14 21:30:07 +01:00
omar
e24674fc0e
Merge branch 'master' into viewport
2019-01-14 21:30:01 +01:00
omar
7a5058e3bf
Version 1.67
2019-01-14 17:41:44 +01:00
omar
1da40df279
DragFloat: Fixed broken mouse direction change with power!=1.0. ( #2174 , #2206 ) [@Joshhua5]
2019-01-14 17:38:19 +01:00
omar
6e41745f31
Added a bunch of diagnostic ignore to cope with Clang -Weverything being absurd. Also fixed two legit warnings. ( #2277 )
2019-01-13 18:57:46 +01:00
omar
8011197c50
Merge branch 'viewport' into docking
...
# Conflicts:
# imgui.cpp
2019-01-10 16:02:32 +01:00
omar
c96aaef132
Merge branch 'master' into viewport
...
# Conflicts:
# imgui.cpp
# imgui.h
2019-01-10 16:01:36 +01:00
omar
1f6e0b2f98
ImVector: Made a struct. Using T/T* in the code instead of value_type/iterator. Renamed index_from_pointer() to index_from_ptr() (was not documented, added in 1.63, users not supposed to use ImVector, hopefully not a big deal).
2019-01-10 15:51:08 +01:00
omar
61a99f994e
Minot internal tweaks, comments
2019-01-08 23:11:54 +01:00
omar
b33977bc15
Tests: Reworking hook prototypes for imgui-test to be faster and multi-context friendly.
2019-01-07 23:59:05 +01:00
omar
c2db7f63bd
Selectable() should have an ID even though they are disabled, to be consistent with other widgets. Not sure of the reasoning ~1.41 which made this turn to 0.
2019-01-07 23:48:50 +01:00
omar
6b32570644
Merge branch 'viewport' into docking
...
# Conflicts:
# imgui_internal.h
# imgui_widgets.cpp
2019-01-07 21:29:15 +01:00
omar
5af930f97a
Merge branch 'master' into viewport
...
# Conflicts:
# imgui.cpp
# imgui.h
# imgui_internal.h
2019-01-07 21:28:29 +01:00
omar
1ae7f88495
Tabs: Added ImGuiTabBarFlags_NoTooltip flag. ( #261 , #351 ) + added helpful assert
2019-01-07 18:07:09 +01:00
omar
acfa4050ec
Tweak changelog + tweak internal render helper functions.
2019-01-07 16:43:55 +01:00
omar
c3af134cc8
IO: Renamed InputCharacters[], marked internal as was always intended. AddInputCharacter() goes into a queue which can receive as many characters as needed during the frame. This is useful for automation to not have an upper limit on typing speed. Will later transition key/mouse to use the event queue later.
2019-01-06 16:37:42 +01:00