1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-12 02:00:58 +01:00
Commit Graph

689 Commits

Author SHA1 Message Date
omar
e28b1078f5 Added IsItemEdited() to query if the last item modified its value (or was pressed). This is equivalent to the bool returned by most widgets. It is useful in some situation e.g. using InputText() with ImGuiInputTextFlags_EnterReturnsTrue. (#2034) 2018-08-23 13:21:01 +02:00
omar
ea9f5d7600 Added optional misc/stl/imgui_stl.h wrapper to use with STL types (e.g. InputText with std::string). (#2035, #2006, #1443, #1008) 2018-08-22 13:25:08 +02:00
omar
8d639ec60d InputText: callback InsertChars() support resize callbacks correctly (followup to 24ff259) + fixed demo to use those functions. (#2006, #1443, #1008). 2018-08-22 13:09:44 +02:00
omar
9f393c38e9 InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData for consistency. Kept redirection types (will obsolete). 2018-08-22 12:46:45 +02:00
omar
4de6e1f7e4 InputText: Internal renaming of some fields + final copy uses edit_state.CurLenA+1 instead of buf_size. 2018-08-21 15:14:10 +02:00
omar
9d8a0374d3 Use literals in place of LLONG_MIN, LLONG_MAX ULLONG_MAX if they are not available. Amend 498c0dcb4c. We prefer using the defines if available in limits.h because they somehow tend to work without warnings when enabling strict C++03 compilation. The 3 literals are fallbacks.. (#1926). 2018-08-06 13:07:19 +02:00
omar
87e2fea09d Renamed io.OptResizeWindowsFromEdges to ConfigResizeWindowsFromEdges, io.OptCursorBlink to io.ConfigCursorBlink, io.OptMacOSXBehaviors to ConfigMacOSXBehaviors for consistency. (#1427, #1495, #822, #473, #650)
Demo: Exposed flags in Demo.
2018-08-01 11:50:57 +02:00
omar
671e516377 Demo: Fix using ambiguous InputFloat() call which redirect to obsolete version. (#1990) 2018-07-31 18:38:15 +02:00
omar
d5400d9517 Fixes for pre-C++11 compilers.
That said, I think we can consider upgrading requirement to an early VS-friendly subset of C++11. The thing I would like the most from C++11 are forward-declared enum (from VS 2012 onward).
2018-07-30 17:42:27 +02:00
omar
2a67aeaa3d Visual Studio: calling into _vsnprintf. (#1085) 2018-07-30 16:01:06 +02:00
omar
6d78045ff8 Demo: Added extra demo in the Basic Horizontal Layout section. (#1977) + PR guidelines 2018-07-30 14:33:27 +02:00
omar
e07f5d4c78 Changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecisions over time. 2018-07-22 18:46:41 +02:00
omar
0c207b7bc9 Demo: Clarified the use of IsItemHovered()/IsItemActive() right after being in the "Active, Focused, Hovered & Focused Tests" section. This will be of more importance with the introduction of tabs. 2018-07-17 11:49:41 +02:00
omar
d3be9185b3 Demo: Fixed spacing from b629f90 change. 2018-07-16 22:24:39 +02:00
omar
73e13a0762 Examples: Tweaked the main.cpp example structure for all examples. (There are a few hidden agendas here: 1) I would like to avoid encouraging people from using the implicit "Debug" window, and promote using Begin/End. In spite of my best attempt, there are a few feature of the upcoming docking system that cannot work 100% properly for the implicit Debug window, so future proof let's not put that feature in the spotlight too much for new users. 2) Moved dumb hardcoded positions into a single spot that can be replaced with a viewport relative position and not affect other demo windows. 3) Calling ShowDemoWindow before anything else, also for the benefit of a specific docking demo which will have an ordering constraint which is not really problematic in a real app but shouldn't be put forward in the demo. 2018-07-16 22:17:34 +02:00
omar
badde9a970 Demo: Spacing. 2018-07-12 11:58:50 +02:00
omar
b629f90393 Demo: Re-ordered example app code to match their menu order and forward declaration order + added header to delimitate them. 2018-07-12 11:42:33 +02:00
omar
c7016c25e8 Nav: Added a CTRL+TAB window list and changed the highlight system accordingly. (#787) 2018-07-09 19:16:48 +02:00
omar
6201cad2b4 Examples: Comments, Demo: Log early out, TODO. (#1553) 2018-07-09 11:43:53 +02:00
omar
17efd7b3b0 Demo: Added basic Drag and Drop demo. (#143, #1931) 2018-07-08 20:06:49 +02:00
omar
62b3d7c51e Fixed software Hand cursor from not actually working. Fixed demo from crashing. Fixed typo and extraneous trailing space. Added Changelogs. (#1913, #1914) 2018-06-29 16:36:40 +02:00
omar
14ceaaf460 ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat). Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly. 2018-06-26 12:37:20 +02:00
omar
c1d8dee6c5 Version 1.63 WIP 2018-06-25 09:40:09 +02:00
omar
fb0106fad2 Demo: Fixed incorrect response to Begin() returning false in overlay demo (which cannot happen since we don't have a title bar, but that doesn't make it a good behaving demo!). 2018-06-25 09:32:55 +02:00
omar
00418d13e3 Demo: Fixed mismatched TreePush/TreePop in Property Editor, due to incorrect revert in 826d77185e (#1895) 2018-06-22 17:45:03 +02:00
omar
1b74e3be02 Version 1.62 2018-06-22 09:41:25 +02:00
omar
826d77185e Revert 640c0566: TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless -> more flexible to keep allowing it by default so it setup an ID scope. 2018-06-14 15:10:46 +02:00
omar
d57fc7fb97 Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value. Note that you may still get false positive. (#820, #956, #1875) 2018-06-13 00:10:33 +02:00
omar
be4b8b5615 Internals: Added GetItemID(), GetFocusID() for consistency. Made GetActiveID() inline. Comments, fixed typos, demo tweaks. 2018-06-13 00:02:19 +02:00
omar
3569d74f98 Demo: Moved test of the Hovered/Active/Focused functions to the Widgets section. 2018-06-12 18:51:23 +02:00
omar
cd455a4600 Added IsItemDeactivated() to query if the last item was active previously but isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875) 2018-06-12 18:44:33 +02:00
omar
c725710c6d Comments 2018-06-12 18:25:04 +02:00
omar
2bdf0b54a2 Changelog formatting update, Todo, comments. Tweak Child demo. Shuffle some code in NavUpdate(). 2018-06-05 15:34:22 +02:00
omar
bf56b6b9a5 ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826) 2018-05-21 10:13:21 +02:00
omar
d5c8f404b2 Remove trailing white spaces. 2018-05-17 14:12:37 +02:00
omar
640c056602 TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless. Tweak demo. 2018-05-14 23:36:37 +02:00
omar
036dce634e Version 1.62 WIP 2018-05-14 19:19:19 +02:00
omar
78b28d545f Version 1.61 + todo additions 2018-05-14 12:34:47 +02:00
omar
d7cc4bc317 Demo: Tweaked custom rendering custom, added a Thickness drag. Clarified use of vertical/horizontal line. Add a single pixel demo (wowow) 2018-05-13 23:42:19 +02:00
omar
3f29ed6fd5 ColorEdit: Fixed not being able to pass the ImGuiColorEditFlags_NoAlpha or ImGuiColorEditFlags_HDR flags to SetColorEditOptions(). Demo tweak. 2018-05-13 23:41:43 +02:00
omar
d53bae4c14 Demo: Fixing build due to using INT_MAX, UINT_MAX, LLONG_MAX, ULLONG_MAX. 2018-05-12 18:58:59 +02:00
omar
8adbf081af Demo: Renamed "fixed overlay" to "simple overlay" because it's not fixed any more! 2018-05-12 18:07:22 +02:00
omar
a7a1b3b0a7 Demo: Added demo for DragScalar(), InputScalar(), SliderScalar(). (#643) 2018-05-12 17:53:34 +02:00
omar
fc7fc83f9e Data types: DragScalar, InputScalar: default parameters. Added IM_STATIC_ASSERT(). Comments. 2018-05-11 19:27:27 +02:00
omar
0dc18a6ca6 Documentation tweaks, comments 2018-05-11 16:54:50 +02:00
omar
8149408408 Merge branch 'data_types'
# Conflicts:
#	CHANGELOG.txt
#	imgui.cpp
2018-05-11 16:48:50 +02:00
omar
14f575ff76 Scrolling: Fixed a case where using SetScrollHere(1.0f) at the bottom of a window on the same frame the window height has been growing would have the scroll clamped using the previous height. (#1804) 2018-05-10 14:31:04 +02:00
omar
787a475650 Skip missing font glyphs to 1) avoid using space for missing glyphs and 2) allow merging fonts with overlapping ranges. Demo: Fixed displaying ? instead of greyed out empty box. (#1671, #1703) 2018-05-07 18:03:00 +02:00
omar
f4c16fbb99 Internals: Data types: Made format string optional. DragBehavior: Moved a bit of code outside of the template. Slider tidying up. Removed unnecessary call to fabsf(). 2018-05-04 17:57:47 +02:00
omar
dcd26f1295 DragFloat, DragInt: Default format string is none is passed to the function. Fixed demo using old style %.0f. 2018-05-04 16:41:48 +02:00
omar
086c3925c4 Internals: Fixed DragInt* default format string. InputScalar(), InputScalarN(), removed InputFloatN(), InputInt(). Note that DragInt2/3/4 will %f format strings will currently be broken. (#320, #643, #708, #1011) 2018-05-03 19:42:35 +02:00
omar
4780ac1ca4 Internals: Data types: Added s64, u64 data types. Added support in InputScalar(). Removed internal.h InputScalarEx() to InputScalar(). Removed cheap-relative-operators support in recently added U32 data path, since this is heading toward being legacy code. + Fixed InputDouble parsing code. (#1011, #320, #708) 2018-05-03 17:34:22 +02:00
omar
d9fa1f869e Comments about using "power curves". Demo tweaks. (#648) 2018-05-03 17:34:15 +02:00
omar
429f48bb4f Clarified usage of ListBoxHeader() before we rename those functions + fixed demo code that didn't honor it correctly. (#1783) 2018-04-29 12:20:22 +02:00
Branimir Karadžić
d317951b37 Demo: Fixed demo from using obsolete functions. 2018-04-28 10:33:48 +02:00
omar
f80314754c InputFloat,InputFloat2,InputFloat3,InputFloat4: Added variations taking a more flexible and consistent optional "const char* format" parameter instead of "int decimal_precision". This allow using custom formats to display values in scientific notation, and is generally more consistent with other API. Obsoleted functions using the optional "int decimal_precision" parameter. (#648) 2018-04-28 00:11:40 +02:00
omar
e3453d0dc4 Misc: Comments and shallow/small changes (merged from viewport branch to minimize branch drift). 2018-04-25 17:58:53 +02:00
omar
dc03c93164 Internals: Removed misleading ImRect::FixInverted + fix minor formatting in Readme.
Demo: Fixed Overlay: Added a context menu item to enable freely moving the window.
2018-04-24 14:19:10 +02:00
omar
6a0b2627ad BeginMainMenuBar: Followup to 1e41bad9. Removed public window flag. DisplaySafeAreaPadding defaults to (3,3) instead of (4.4). Comments, tab to spaces, Changelog. (#1439) 2018-04-18 17:37:35 +02:00
omar
6f1f5cbc20 Version 1.61 WIP 2018-04-09 14:02:32 +02:00
omar
3a29ddbcfa Version 1.60 2018-04-08 00:45:02 +02:00
omar
72b7f48870 Renamed ImGuiConfigFlags_NoSetMouseCursor to ImGuiConfigFlags_NoMouseCursorChange. Followup to 75c3793db5 two weeks ago. (#787, #1495, #1202) + comments 2018-04-06 18:12:21 +02:00
omar
c19b27813d Added InputDouble() function. We use a format string instead of a decimal_precision parameter to also for "%e" and variants. (#1011) May transition the other InputXXX function to use format strings as well. 2018-03-22 18:58:40 +01:00
omar
75c3793db5 IO: Added ImGuiConfigFlags_NoSetMouseCursors. Added ImGuiBackendFlags_HasMouseCursors, ImGuiBackendFlags_HasSetMousePos. (#787, #1495, #1202) 2018-03-20 21:19:23 +01:00
omar
170f44e6f0 IO: Renamed io.WantMoveMouse to io.WantSetMousePos (was added in 1.52, _not_ used by core and only honored by some binding ahead of merging the Nav branch) + internal renaming (#787) 2018-03-20 20:12:34 +01:00
omar
166411287f Demo: Added more complete Combo demo. (#1658) 2018-03-19 14:44:37 +01:00
omar
33ad8b2f0c Nav: Track nav input source more generally (gamepad vs keyboard) (#787) + update todos and demo tweaks 2018-03-19 13:20:18 +01:00
omar
111ea7af77 Misc comments, todos + reintroduced removed ImGuiCol defines under !IMGUI_DISABLE_OBSOLETE_FUNCTIONS wrap. 2018-03-12 17:24:15 +01:00
omar
1f6ad7a894 ImFont: Added FindGlyphNoFallback. Fixed MergeMode broken by 1ef1acbd8d 2018-03-10 10:33:12 +01:00
omar
945f4d1ecd Removed redundant semi colons. (#1653) 2018-03-05 16:16:27 +01:00
omar
69e700f869 Renamed ImGuiStyleVar_Count_ to ImGuiStyleVar_COUNT for consistency with other enums. Added 2018-03-03 20:15:10 +01:00
omar
8a4093f38b Added ArrowButton(). Exposed ImGuiDir. 2018-03-03 20:08:03 +01:00
omar
b3594a6407 Added ImGuiConfigFlags_IsSRGB, ImGuiConfigFlags_IsTouchScreen (strictly for user storage) 2018-02-28 21:16:47 +01:00
omar
2c9f45bbe7 Renamed ImGuiNavFlags io.NavFlags to ImGuiConfigFlags io.ConfigFlags. (#787) 2018-02-28 18:51:40 +01:00
omar
4ec931853e Demo: Fonts; Added Font Offset. 2018-02-13 21:03:30 +01:00
omar
7c16d52f72 Updated version to 1.60 WIP to emphasis on the addition of required calls CreateContext/DestroyContext + merged the massive Navigation branch (#1565, #787) 2018-02-06 20:20:34 +01:00
omar
5c83b55d04 Nav: Added ImGuiWindowFlags_NoNav shortcut, comments. (#787) 2018-02-05 15:49:35 +01:00
omar
8ad88f725c Nav: Minor tidying up. (#787) 2018-02-05 14:53:22 +01:00
omar
efbd8cebe7 Nav: Comments (#787) 2018-02-01 22:53:08 +01:00
omar
eaa6f490a2 Merge branch 'master' into navigation
# Conflicts:
#	imgui_demo.cpp
2018-01-31 23:38:05 +01:00
omar
dbdbf01b9f Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions. 2018-01-31 23:35:54 +01:00
omar
38d45ee73f Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions. 2018-01-31 19:13:20 +01:00
omar
47e81a6194 Merge branch 'master' into navigation 2018-01-31 16:00:25 +01:00
omar
cd3dd886de Moved extra_fonts/ to misc/fonts/. Moved .natvis file to misc/natvis/ (#1569) 2018-01-31 16:00:07 +01:00
omar
23c11e9764 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
2018-01-31 15:43:19 +01:00
omar
cca9c3e3da Examples: Using Dark theme by default. (#707). Tweaked demo code. 2018-01-31 00:15:47 +01:00
omar
bebe03db05 Metrics: Minor formatting tweaks 2018-01-30 21:17:27 +01:00
omar
bd579e5429 Nav: Removed io.NavUsable --> io.NavActive, io.NavActive --> io.NavVisible. (#787). NavActive takes account of NavFlags enable flags. 2018-01-30 20:07:12 +01:00
omar
c851b33352 Nav: Added proper version of ImGuiWindowFlags_NavFlattened that handles scrolling nicely. Marked as private as I'm not happy with the name. (#787) 2018-01-29 23:59:46 +01:00
omar
6f366fff6b Demo: Tweaked example menu with colors + menu items, was currently particularly inconvenient for Nav. Will rework later. (#787) 2018-01-24 17:41:47 +01:00
omar
455989b8b1 Nav: Added io.NavFlags to hold various options. Added ImGuiNavFlags_EnableGamepad and ImGuiNavFlags_EnableKeyboard for bindings to use (#787) 2018-01-24 17:41:47 +01:00
omar
d500113f1d Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
2018-01-23 19:16:43 +01:00
omar
9a76fd30fd Added SetNextWindowBgAlpha() helper. (#1567) particularly helpul with the marking of the old 5-parameters version of Begin() as obsolete. 2018-01-23 19:13:49 +01:00
omar
1493de4f81 Internals: Merge of harmless stuff from Navigation stuff. Added GetHoveredID() internal helper. 2018-01-12 19:53:27 +01:00
omar
c85d7d6e49 Nav: Remove GetItemID(), hide ActivateItem() before this feature is unfinished and has issue (full feature is on hold). Undo part of 59c6f35bf6 (#787) 2018-01-12 19:28:37 +01:00
omar
cd7e178eac Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
2018-01-11 16:49:59 +01:00
omar
a8bbb0b7dd Demo: Using IM_COL32() instead of ImColor() in ImDrawList centric contexts. 2018-01-11 15:47:07 +01:00
omar
12aa3cb09e Demo: Tweaks format. 2018-01-11 15:22:33 +01:00
omar
a63fbbca8b Added ImGuiHoveredFlags_AnyWindow, ImGuiFocusedFlags_AnyWindow. Obsoleted IsAnyWindowHovered()/IsAnyWindowFocused() in favor of IsWindowHovered(ImGuiHoveredFlags_AnyWindow)/IsWindowFocused(ImGuiFocusedFlags_AnyWindow). Added to demo. (#1382) 2018-01-11 13:51:18 +01:00
omar
2b8224692e Merge branch 'master' into navigation 2018-01-03 20:26:24 +01:00
omar
a7deb3a394 Demo: Minor tweaks. 2018-01-03 15:36:51 +01:00
omar
9fbecac87e Demo: Improved Selectable() examples. (#1528) 2018-01-03 15:11:14 +01:00
omar
05ec0b0736 Casing tweaks + clarify license copyright (simpler/safer?) (#1346) 2018-01-03 14:32:16 +01:00
omar
96ccc484f9 Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
2018-01-03 12:33:27 +01:00
omar
3c6fbe0849 Renamed ImGuiSizeConstraintCallback to ImGuiSizeCallback, ImGuiSizeConstraintCallbackData to ImGuiSizeCallbackData. 2018-01-03 12:31:56 +01:00
omar
7a15fc8de5 Merge branch 'master' into navigation 2017-12-29 18:28:23 +01:00
omar
2dd2ca0096 Removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it it's easy to replicate on your side.
Removed internal corresponding ImRect::GetClosestPoint() for now.
Essentially revert dcaafffe0e.
2017-12-29 17:59:13 +01:00
omar
c4e6d622c1 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
2017-12-29 13:39:07 +01:00
omar
4ba2e85744 Demo: Tweak. Comments. Metrics: Added some Drag and Drop info. 2017-12-28 23:53:27 +01:00
omar
49eed6e2d1 Version 1.54 WIP 2017-12-28 15:17:35 +01:00
omar
436cad4bca Merge branch 'master' into navigation
# Conflicts:
#	imgui.h
2017-12-26 15:37:31 +01:00
omar
9511f22e8b Demo: Console: More friendly to text color changes. 2017-12-25 18:47:44 +01:00
omar
e916310b2e Version 1.53 2017-12-25 17:41:41 +01:00
omar
3d48f5b8c2 Demo: BeginCombo() demo code 2017-12-25 17:41:02 +01:00
omar
de5c304b49 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
2017-12-24 18:59:40 +01:00
omar
8d54b1b7af Misc comments, removed duplicated IM_ARRAYSIZE macro in imgui_demo.cpp (it is now declared in imgui.h) 2017-12-24 18:59:14 +01:00
omar
1b86e7343f Renamed the emblematic ShowTestWindow() function to ShowDemoWindow(). Kept redirection function (will obsolete). 2017-12-24 18:16:22 +01:00
omar
cead207535 Comments 2017-12-24 17:58:41 +01:00
omar
ffb4f6ca8c Merge branch 'master' into navigation 2017-12-23 16:27:48 +01:00
omar
983d8f5f8e Various zealous warning fixes (Clang). 2017-12-23 15:28:49 +01:00
omar
1c1e490316 Merge branch 'master' into navigation 2017-12-22 20:21:54 +01:00
omar
e1a103b251 Drag and Drop: Disable tracking mouse button ownership when an external drag source is active, to make it easier to achieve drag and drop over multiple OS windows. (#143) 2017-12-22 20:20:52 +01:00
omar
287380261c Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
2017-12-21 19:55:21 +01:00
omar
996dfb21cf ImDrawList: Added ImDrawListFlags for AA settings. ImDrawList doesn't directly depends on GImGui anymore. 2017-12-21 19:49:54 +01:00
omar
6497f5dc1b Merge branch 'master' into navigation
# Conflicts:
#	imgui.h
2017-12-15 11:59:50 +01:00
omar
eefea0588a Using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set. (#1380, #1502) 2017-12-14 18:42:41 +01:00
omar
fa68cb5364 Demo: Console: Tweak. 2017-12-13 23:07:07 +01:00
omar
cc3192f347 Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
2017-12-13 22:09:08 +01:00
omar
3905816082 Added ShowFontSelector(), ShowStyleSelector(). (#707) 2017-12-13 21:59:16 +01:00
omar
fa9327ccf8 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_draw.cpp
#	imgui_internal.h
2017-12-12 20:44:12 +01:00
omar
d0a1be0de0 Merge branch 'drag_and_drop' 2017-12-12 20:39:52 +01:00
Branimir Karadžić
ef1a683ebe Removed use of obsolete ImGui API. 2017-12-12 17:59:09 +01:00
omar
052b6021dd Merge branch 'master' into drag_and_drop
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
2017-12-12 15:02:05 +01:00
omar
0a3db267c3 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_internal.h
2017-12-12 14:58:53 +01:00
omar
6190ab0084 Renamed GetItemsLineHeightWithSpacing() to GetFrameHeightWithSpacing() 2017-12-12 14:14:58 +01:00
omar
08b72eb5c0 IsWindowFocused() refactor will flags. (#1382)
Marked IsRootWindowFocused() as obsolete in favor of using IsWindowFocused(ImGuiFocusedFlags_RootWindow).
Marked IsRootWindowOrAnyChildFocused() as obsolete in favor of using IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows).
2017-12-12 14:07:12 +01:00
omar
8d8f4934fb Demo: mouse dragging demo tweaks 2017-12-12 13:11:40 +01:00
omar
4a555d35f0 IsWindowHovered(): split ImGuiHoveredFlags_FlattenChild into separate ChildWindows and RootWindow flags. Allowing more combination and a better symetry with IsWindowFocused() flags. (#1382) 2017-12-12 12:50:42 +01:00
omar
2b9d8ab91d Merge branch 'master' into drag_and_drop
# Conflicts:
#	imgui.cpp
#	imgui.h
2017-12-11 16:39:27 +01:00
omar
38bfdb357e Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
2017-12-11 16:28:47 +01:00
Branimir Karadžić
e67f3809ed Replaced obsolete function with new one. 2017-12-11 09:57:05 +01:00
omar
d1db229907 Merge branch 'master' into navigation
# Conflicts:
#	imgui_demo.cpp
2017-12-10 19:01:59 +01:00
omar
71296910a0 Demo: Tweaks and spacing. Stopped using rand() function in demo code. 2017-12-10 18:49:47 +01:00
omar
4b8857d536 Demo: About box tweaks. 2017-12-10 18:45:05 +01:00
omar
20ba79aa56 Demo: Added "No close" option. 2017-12-10 17:02:41 +01:00
omar
871a5cecc1 Merge branch 'master' into navigation 2017-12-08 18:32:46 +01:00
omar
c9f0275e22 Combo: Removed ImGuiWindowFlags_ComboBox flag. Moved internal window flags. 2017-12-08 18:32:12 +01:00
omar
a4863e8084 Demo: Picker with palette demo supports drag and drop. (#143, #346) 2017-12-08 12:49:35 +01:00
omar
e6215b6ca0 Merge branch 'master' into navigation + merge fix
# Conflicts:
#	imgui.cpp
2017-12-07 16:42:52 +01:00
omar
abe5ad3c7a Demo: Added display for IsMouseDragging() function. 2017-12-07 13:27:55 +01:00
omar
94bf12f14b Demo: Display better mouse cursor info for debugging backends. 2017-12-07 13:27:49 +01:00
omar
81cbaef806 Merge branch 'master' into navigation 2017-11-29 23:49:17 +01:00
omar
0d53c8d480 Demo: Console: Fixed incorrect positioning which was hidden by a minor scroll issue (this would affect people who copied the console code as is) 2017-11-29 23:48:32 +01:00
omar
a20fe279c5 Demo: Layout: Removed unnecessary BeginChild/EndChild calls 2017-11-29 23:48:32 +01:00
omar
9191b17218 Merge branch 'master' into navigation 2017-11-28 17:28:08 +01:00
omar
532f564fd3 ImGuiTextBuffer: Renamed append() helper to appendf(), appendv() to appendfv(). Added reserve(). 2017-11-27 19:02:00 +01:00
omar
2543807e56 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2017-11-20 13:54:06 +01:00
omar
3f5b2a3fe3 Exposed ImDrawCornerFlags, replaced occurences of ~0 with an explicit ImDrawCornerFlags_All. Inversed BotLeft (prev 1<<3, now 1<<2) and BotRight (prev 1<<2, now 1<<3). 2017-11-20 13:53:16 +01:00
omar
3c5e64db78 Demo: Tweaked Image() code. 2017-11-20 13:30:25 +01:00
omar
9848a7023b Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
2017-11-19 16:21:21 +01:00
omar
28a31997b7 Style Editor: Simplified settings also show PopupBorderSize as a checkbox. (#707, #1019) 2017-11-19 16:03:42 +01:00
omar
abbf836fd0 Style, Begin: removed ImGuiWindowFlags_ShowBorders window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. style.FrameBorderSize, style.WindowBorderSize). Use ImGui::ShowStyleEditor() to look them up. (#707, fix #819, #1031, ref #1019, ref #447) 2017-11-19 15:56:51 +01:00
omar
4cdd998be8 Demo: Fix warning "format not a string literal and no format arguments" for over-zealous compilers settings. (#1450, #1451) 2017-11-19 00:49:23 +01:00
omar
d211a0e338 Merge branch 'master' into navigation (with style breakable)
# Conflicts:
#	imgui.cpp
#	imgui_draw.cpp
2017-11-19 00:39:37 +01:00
omar
d7af1a218e Style: Added PopupRounding setting. (#1112) 2017-11-19 00:29:29 +01:00
omar
0a61b7195c Style: Added a default StyleColorsLight(). (#707) 2017-11-19 00:29:29 +01:00
omar
e7e81b265d Demo: Tweaks. 2017-11-18 23:44:16 +01:00
omar
1c41603b31 Style Editor: Using local storage so Save/Revert button made some more sense without code passing its storage. Tweaked layout, added horizontal scroll bar, Fixed Save/Revert button to be always accessible. (fix #1211) 2017-11-18 23:44:16 +01:00
omar
c1b5eab868 Style Editor: Sneakily adding a combo box to change colors (#707) 2017-11-18 23:18:18 +01:00
omar
bd4bc929ce Style: renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding. 2017-11-18 18:28:21 +01:00
omar
6817f3a3d9 Merge branch 'master' into navigation 2017-11-15 23:44:50 +01:00
omar
27fd1b913b Made it guaranteed by API that after calling Begin() the last Item represent the title bar. (#823) 2017-11-15 14:35:45 +01:00
omar
64031852de Merge branch 'master' into navigation 2017-11-14 23:17:58 +01:00
omar
6001d9c7a4 Columns: Clipping columns borders on Y axis on CPU because some GPU drivers appears to be unhappy with triangle spanning large regions (not sure why tbh). (#125)
Demo: Columns: Adding a billion of extra lines and using clipper.
2017-11-14 22:41:54 +01:00
omar
0858c3d7cb Demo: Custom Rendering: Fixed clipping rectangle extruding out of parent window. 2017-11-14 22:21:38 +01:00
omar
a297cbafdb Merge branch 'master' into navigation 2017-11-08 23:17:14 +01:00
omar
8e6adc78af Examples: Constrained Resize: Added more test cases (for #1417) 2017-11-07 11:38:39 +01:00
omar
0d4c320f88 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_draw.cpp
2017-11-06 23:58:28 +01:00
omar
ff4d4ca651 IsWindowHovered(): Added ImGuiHoveredFlags_FlattenChilds flag. Made IsRootWindowOrAnyChildHovered() obsolete in favor of IsWindowHovered( ImGuiHoveredFlags_FlattenChilds) (#1382, #1404) 2017-11-02 16:44:24 +01:00
omar
63f6f2dd13 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
2017-11-01 15:09:23 +01:00
omar
59323b54da Demo: Comments (#1408) 2017-11-01 12:57:12 +01:00
omar
6ab20ff9bf Minor tweaks to the user guide. 2017-11-01 12:33:58 +01:00
omar
edafbcd630 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
2017-10-27 20:04:51 +02:00
omar
77df1ba9e0 Version 1.53 WIP 2017-10-27 19:54:56 +02:00
omar
c0b366b316 Merge branch 'master' into navigation
# Conflicts:
#	imgui.h
2017-10-27 17:27:53 +02:00
omar
9f200d10d5 Version 1.52 2017-10-27 17:10:41 +02:00
omar
fc25881207 Merge branch 'master' into navigation 2017-10-24 21:13:24 +02:00
omar
1f3372b7f1 ImFormatString, ImFormatStringV(): clarifying specs so that passing a NULL buffer should return the desired length. (#1038) 2017-10-24 20:48:29 +02:00
omar
d769e2515a Merge branch 'master' into navigation 2017-10-23 10:05:36 +02:00
omar
fce41d0b55 Demo: Fixed Fonts "set as default button" not having collading id on collapsed nodes. 2017-10-22 10:21:49 +02:00
omar
e4bb9102f9 Merge branch 'master' into navigation 2017-10-20 20:32:17 +02:00
omar
6ab737a4bb Popups: Fixed right-click to close popups not handling modal windows properly. (~#439) 2017-10-20 20:31:01 +02:00
omar
1172ff62e1 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_internal.h
2017-10-20 18:10:07 +02:00
omar
695ea45fca IsWindowHovered(): Changed default behavior to now return false is a widget from another window is active + Added support for ImGuiHoveredFlags_AllowWhenBlockedByActiveItem. (relate to drag'n drop idoms: #143) 2017-10-20 17:59:48 +02:00
omar
564ff2dfd3 IsItemHovered(), IsWindowHovered(): added flags to enable various and more specific behavior. Will enable improvements for popups/context menus and drag'n drop. (relate ~#439, #1013, #143, #925)
The legacy confusing IsItemRectHovered(), IsWindowRectHovered() can be completely removed now.
Changed IsWindowHovered() behavior with default parameter: it now return false is the window is blocked by a popup.
Demo: Added tests for those two functions.
2017-10-20 17:52:22 +02:00
omar
2a32a2e662 Demos: Tweaks of popups/context/menus section. 2017-10-20 12:38:48 +02:00
omar
a03093b2d4 CollapsingHeader(bool*) variant: fixed for IsItemHovered() to work properly in the nav branch.Basically the close button now has to use ItemAdd() to be navable into, which overwrite the IsItemHovered data. (#600, #787) 2017-10-18 19:55:08 +02:00
omar
29a652adee CollapsingHeader(bool*) variant: fixed for IsItemHovered() to work properly in the nav branch.Basically the close button now has to use ItemAdd() to be navable into, which overwrite the IsItemHovered data. (#600, #787) 2017-10-18 19:51:32 +02:00
omar
d96b6ecf88 Merge branch 'master' into navigation
# Conflicts:
#	imgui_demo.cpp
2017-10-17 16:20:35 +02:00
omar
2739b6ebcd Begin: Work toward obsoleting the 5-arguments Begin() overload. Removed bg_alpha from internal BeginEx(). (3) 2017-10-17 16:14:20 +02:00
omar
1a35766356 BeginPopupContextItem() now supports a NULL string identifier and uses the last item ID if available. For interactive items (that have an ID) this works! For non interactive items we assert. 2017-10-16 23:37:12 +02:00
omar
3833f1f7a2 Merge branch 'master' into navigation 2017-10-11 15:38:33 +02:00
omar
43b4a81b3e Rnamed AlignFirstTextHeightToWidgets() to AlignTextToFramePadding(). Kept inline redirection function (will obsolete). 2017-10-11 15:36:57 +02:00
omar
c6e370a77a TreeNode: Added ImGuiTreeNodeFlags_FramePadding flag 2017-10-11 15:16:11 +02:00
omar
59c6f35bf6 Added ActivateItem(), GetItemID() functions. 2017-10-05 21:34:01 -07:00
omar
518f02f4de Demo: better demo for SetKeyboardFocusHere() 2017-10-05 18:10:59 -07:00
omar
0046c618b0 Nav: Allow to collapse tree nodes with NavLeft and open them with NavRight (#787, #1079) 2017-09-30 00:47:07 +02:00
omar
cf308f4039 Nav: Fixed SetItemDefaultFocus from stealing default focus when we are initializing default focus for a menu bar layer (#787) 2017-09-29 00:20:51 +02:00
omar
3b85a8b6a0 Demo: Added an extra test related to baseline and fixed an id collision. 2017-09-28 22:01:08 +02:00
omar
7c2926de17 Demo: Added an extra test related to baseline and fixed an id collision. 2017-09-28 20:15:32 +02:00
omar
d394c7ad0b Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2017-09-28 15:45:35 +02:00
omar
0106dcbd02 Fixed IsItemHovered() - part of the processing has to be done in ItemAdd() because the widget may alter clipping rectangle temporarily. 2017-09-28 15:43:26 +02:00
omar
cc26db8ec7 Merge branch 'master' into navigation 2017-09-27 17:25:50 +02:00
omar
99c7622a1b ItemAdd(), not performing computation for IsItemRectHovered() which does them itself, allowing us in the next commit to optimize ItemAdd() and make its logic more consistent with IsHovered(). 2017-09-27 16:20:53 +02:00
omar
8fd4beddb8 Merge branch 'master' into navigation 2017-09-26 20:28:40 +02:00
omar
9e1ad7295f ImFont: Renamed (supposedly internal) fields (e.g. XAdvance to AdvanceX). Custom text renderers might be affected if they didn't use the GetCharAdvance() helper function. 2017-09-26 20:05:16 +02:00
omar
10bb9524eb ImFont: Renamed ImFont::Glyph to ImFontGlyph (for consistency and so ImFontAtlas types can use it without ordering half of the file). Left a redirection type. 2017-09-26 19:54:30 +02:00
omar
7e8069dd23 Merge branch 'master' into navigation 2017-09-25 22:08:38 +02:00
omar
a34edb810e Demo: Fixed overlay demo keeps resizing (in case, e.g.: font changes) 2017-09-25 21:12:07 +02:00
omar
4b82759598 SetNextWindowPos: added a ImVec2 pivot parameter for positioning a given a center, bottom-right position, etc. As a generalization of SetNextWindowPosCenter() which is now obsolete. This will be useful for combo-like popups as well.
Demo: Simple-overlay window uses the SetWindowPos pivot to select a corner to position itself at.
2017-09-25 18:25:43 +02:00
omar
1ff27d7db8 Added io.WantMoveMouse flags from Nav branch so Examples/Binding can already implement it. (#787) 2017-09-18 16:04:28 +02:00
omar
44e8d94aba Merge branch 'master' into navigation 2017-09-18 15:32:31 +02:00
omar
709653c330 Merge branch 'master' into styles 2017-09-18 15:03:25 +02:00
omar
38ed66f55e Merge branch 'master' into navigation
# Conflicts:
#	imgui_demo.cpp
2017-09-06 19:25:07 +02:00
omar
9e2f202f05 Demo: Not using the undesirable Begin() overload. 2017-09-06 19:24:08 +02:00
omar
5c4fda0fbc Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2017-09-06 19:17:51 +02:00
omar
6a1ba317c7 Demo: Minor coding style tweaks so bgfx copy needs less patching. 2017-08-29 19:05:56 +08:00
omar
807322c9a5 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
2017-08-26 18:43:10 +08:00
omar
37f3a718c6 Marked all fmt + va_list functions with format attribute so GCC/Clang can warn about them. Not ignoring -Wsuggest-attribute=format anymore for GCC/Clang. 2017-08-25 16:10:14 +08:00
omar
40f608ce9b Version 1.52 WIP 2017-08-25 15:12:12 +08:00
omar
55a6209931 Version 1.51 2017-08-25 00:29:59 +08:00
omar
82c3116b4f Demo: Displaying version number in test window. 2017-08-24 17:32:03 +08:00
omar
444792f75f Merge fixes from ,master branch 2017-08-22 18:27:23 +08:00
omar
53e73182ff Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
2017-08-21 00:04:45 +08:00
omar
54bdd00df7 Columns: Fix for explicit content width and scrollbar. (#519, #125) 2017-08-20 21:32:18 +08:00
omar
1ebd7ec049 Demo: Columns: Added Horizontal Scrolling demo. Tweaked another Columns demo. (#519, #125, #913) 2017-08-20 20:58:24 +08:00
omar
19a42cb2fd Columns: Moved BeginColumns/EndColumns/flags from #913 to imgui_internals.h + minor shallow tweaks. Removed demo code temporarily. (#125) 2017-08-20 18:44:48 +08:00
omar
bc78535bbf Merge branch 'master' of https://github.com/ggtucker/imgui into ggtucker-master
# Conflicts:
#	imgui.cpp
#	imgui.h
2017-08-20 18:22:34 +08:00
omar
b4eeb4aa8d Renamed GetStyleColName() to GetStyleColorName() for consistency. Extra comments in Api Breaking Changes section. 2017-08-20 17:53:09 +08:00
omar
91d841dd5f Added PushStyleColor(ImGuiCol idx, ImU32 col) overload. (Which _might_ cause an "ambiguous call" compilation error if you are using ImColor() with implicit cast. Cast to ImU32 or ImVec4 explicily to fix.) 2017-08-20 15:28:12 +08:00
omar
bf0d9c123e Merge branch 'master' into navigation 2017-08-18 00:25:12 +08:00
omar
24a78767d2 Merge branch 'master' into styles
# Conflicts:
#	TODO.txt
2017-08-17 17:24:33 +08:00
omar
52f1a4124c Demo: Tweaked Fonts section. 2017-08-17 13:56:16 +08:00
omar
68bf5ecbc1 Marked the weird IMGUI_ONCE_UPON_A_FRAME helper macro as obsolete. prefer using the more explicit ImGuiOnceUponAFrame. Removed the broken __LINE__ from IMGUI_ONCE_UPON_A_FRAME 2017-08-16 17:51:44 +08:00
omar
668a4bf1bc Demo: style editor output tweak so it is easier to modify the output code.. + TODO list update 2017-08-15 17:48:41 +08:00
omar
18b50f8eba Comments 2017-08-15 11:41:36 +08:00
omar
9bf5028fd3 Merge branch 'master' into navigation 2017-08-15 00:50:59 +08:00
omar
97fccbdb73 Demo: Fixed conflicting id introduced in be9628494a . Added tooltip. 2017-08-14 13:05:03 +08:00
omar
5eef7dd82f Demo: Consoles: Added "Copy" button to demonstrate LogToClipboard 2017-08-12 00:43:55 +08:00
omar
73f9c9d80c Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
2017-08-11 13:44:25 +08:00