Commit Graph

162 Commits

Author SHA1 Message Date
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
d68633398b Examples: Vulkan: nverted the parameters to ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings. 2018-06-22 10:02:02 +02:00
omar
1b74e3be02 Version 1.62 2018-06-22 09:41:25 +02:00
omar
f9a5ff7a19 Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301) 2018-06-21 12:13:04 +02:00
omar
cac4c3f9b8 Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888) + Comments in imgui.h 2018-06-21 12:04:00 +02:00
omar
c44a4bed84 Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887) 2018-06-20 11:06:29 +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
185b4dde87 Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support. Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end. 2018-06-13 19:22:47 +02:00
omar
335f6fde7e Comments + missing changelog bits in 1.52 for SetNextWindowPos, SetNextWindowPosCenter. (obsolete #771) 2018-06-13 14:06:58 +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
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
a48815b870 Comments, changelog 2018-06-12 12:12:56 +02:00
omar
a1b6766d43 Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801) 2018-06-11 19:27:57 +02:00
omar
bdb3d72d37 Examples: Win32: Fixed handling of mouse wheel messages to support finer position messages (typically sent by track-pads). (#1874) 2018-06-11 17:36:18 +02:00
omar
7acb46bec5 Examples: Comments to make ImGuiConfigFlags_NoMouseCursorChange more visible (#1027). + Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. 2018-06-11 12:33:51 +02:00
omar
fac0c801da Examples: Added imgui_impl_osx.mm bindings (#1870, #281) 2018-06-11 10:19:17 +02:00
omar
5a13e4dcde Examples: Renamed imgui_impl_sdl2.cpp to imgui_impl_sdl.cpp (#1870) + changelog bits 2018-06-10 15:58:21 +02:00
omar
689ec0bd06 Merge branch 'font_min_max_advance' 2018-06-10 15:07:18 +02:00
omar
85f9694bd4 Big example binding refactor (manually imported from Viewport branch, stripped out of Viewport code). (#1870)
Read examples/README.txt for some details.
ImDrawData: Added DisplayPos, DisplaySize fields honored by all backends (not strictly necessary to honor just now, but doing it to be ahead)
2018-06-08 19:37:33 +02:00
omar
f5bf9f509c ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869) 2018-06-08 12:52:46 +02:00
omar
929529a0db SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866) 2018-06-07 13:29:54 +02:00
omar
b3a5b8debd Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
Followup/fix the change made in deab2ab015
2018-06-06 19:25:49 +02:00
omar
d44faa165a Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
Changed the accumulative encoding to remove the implicit +1 which only saved a little space and made things more confusing.
2018-06-06 12:35:36 +02:00
omar
2a56105f85 TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader(). The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864) 2018-06-06 11:39:29 +02:00
omar
21f553fa55 stb_textedit, InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
See issue 620 in nothings/stb/
2018-06-05 23:29:06 +02:00
omar
67b139ccae Updated stb_textedit 1.09 + patches --> 1.12 + minor patches. (#715) 2018-06-05 23:27:42 +02:00
omar
916528080e InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787) 2018-06-05 16:16:54 +02:00
omar
6d98c0323b Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787) 2018-06-05 15:49:33 +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
92b7d6bc4f Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to disable drag source tooltip from the target site (#143) 2018-05-28 20:57:41 +02:00
omar
f843facba4 Internals: PushItemFlag() flags are inherited by BeginChild(). 2018-05-28 15:30:42 +02:00
omar
b88fbd69cc Drag and Drop: BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739) 2018-05-23 23:19:01 +02:00
omar
663e2c9237 Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). Changelog. Added to Vulkan example. (#1827) 2018-05-21 10:36:50 +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
e11610d6ff Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787) 2018-05-14 19:50:48 +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
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
2a2bb8970d Added ImAtof, ImCeil, ImFloorStd to IMGUI_DISABLE_MATH_FUNCTIONS for consistency. Configuration comments. 2018-05-13 22:31:29 +02:00
omar
ff033f431b Added IMGUI_DISABLE_MATH_FUNCTIONS in imconfig.h to make it slightly easier to redefine wrappers to std maths functions such as fabsf(), fmodf(), etc. Comments. 2018-05-13 21:04:07 +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
7475c1e7dd Data types: DragScalar: Fixed speed of integer values tweaking with keyboard/gamepad when speed < 1. Enforce min/max bounds when power curves are used. SliderScalar: Fixed integer/slow tweaking. (#643) 2018-05-12 17:39:34 +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
39f4761ff7 TODO list update + Changelog and comments for #1803. 2018-05-09 15:48:33 +02:00
omar
8da0d42ef2 Moved DragScalar, InputScalar, SliderScalar to imgui.h as well as ImGuiDataType (#320, #643, #708, #1011) 2018-05-08 19:52:55 +02:00
omar
280c05e4f8 Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit. 2018-05-08 11:02:38 +02:00
omar
f13f10e725 Settings: Comments (#923, #993) 2018-05-07 22:37:10 +02:00
omar
0bf43b3a1b Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory(), io.WantSaveIniSettings. (#923, #993) 2018-05-07 22:18:45 +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
807c4f0ea4 Ran a spell checker for sanity. 2018-05-07 14:44:35 +02:00
omar
4310bad32a Examples: DirectX9: Comments, updated changelog, notes about usage of imconfig.h (#1790, #1687) 2018-05-07 11:52:48 +02:00
omar
7640439747 DragInt: Patch old format strings to replace %f by %d when using the DragInt() entry point. (#320, #643, #708, #1011) 2018-05-03 21:35:04 +02:00
omar
17d3c6305e Ran a spell checker for sanity. 2018-05-03 21:11:53 +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
6c932479f2 Internal: DragScalar(), InputScalar() now support signed/unsigned, 32/64 bits, float/double data types. (#320, #643, #708, #1011) 2018-05-03 17:34:38 +02:00
omar
93b8580a8d Internals: DragFloat: Fixed power handling. Use an temporary accumulator and no absolute values so we will be able to manipulate double as well as 64-bit integers. (#1011, #708, #320) 2018-05-03 17:34:33 +02:00
omar
7df985bc5c Nav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor. Fixed c8b9b2c6 which was incorrect (#787) 2018-04-30 19:40:25 +02:00
omar
92f0165f85 DragFloat, SliderFloat: Rounding scalar using the provided format string instead of parsed precision. (#648) 2018-04-30 16:44:57 +02:00
omar
6881d065b8 DragFloat/SliderFloat internal InputScalar trip trailing decoration off the format string when presenting an edit box to the user. (#648) 2018-04-30 15:59:59 +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
8a38271a7c SliderFloat, DragFloat: Fix to allow input of scientific notation when Ctrl+Clicking a slider or drag, matching the change done in c19b2781 for InputFloat(). (#648, #1011) 2018-04-27 23:18:28 +02:00
omar
066550de68 DragFloat, DragInt: Cancel mouse tweak when current value is initially past the min/max boundaries and mouse is pushing in the same direction (keyboard/gamepad version already did this). 2018-04-27 19:15:25 +02:00
omar
101f9b42b7 InputText: Fixed returning true when edition is cancelled with Esc and the current buffer matches the initial value. 2018-04-27 17:32:03 +02:00
omar
eb1c36fdfb Added IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769) 2018-04-25 22:07:14 +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
Bruce Mitchener
7ebdadf92b Fix various typos. 2018-04-25 09:40:14 +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
7b6b7038c5 Window: Relaxed the internal stack size checker to allow Push/Begin/Pop/.../End patterns to be used with PushStyleColor, PushStyleVar, PushFont without causing a false positive assert. (#1767) 2018-04-23 17:58:49 +02:00
omar
22773e03a2 InputText: On Mac OS X, support Cmd+Shift+Z for Redo. Cmd+Y is also supported as major apps seems to default to support both. (#1765) 2018-04-23 11:15:13 +02:00
omar
037d5a7e98 Columns: Fixed a bug introduced in 1.51 where columns would affect the contents size of their container, often creating feedback loops when ImGuiWindowFlags_AlwaysAutoResize was used. (#1760) 2018-04-20 16:03:21 +02:00
omar
49a451d247 Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760) 2018-04-20 15:40:12 +02:00
omar
f93dce9513 InputText: Tweak to make the if statement more readable + update Changelog (#1747) 2018-04-19 16:21:32 +02:00
omar
bcac02809f Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp. 2018-04-18 21:55:12 +02:00
omar
3913297384 Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unecessary conversion (Allegro 5 doesn't support 16-bit indices). 2018-04-18 21:51:14 +02:00
omar
6d6f4a85f6 Fixed DisplaySafeAreaPadding not affecting popups/tooltips/menus at it should have (partly broken in 2e5577f44f). 2018-04-18 17:40:38 +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
7241dc61d4 Fixed default proportional item width lagging by one frame on resize + miscellaneous minor tweaks. 2018-04-17 23:36:59 +02:00
daniel-murray
83d97d4a9b Fix typos KeyDown => KeysDown 2018-04-14 10:28:10 +02:00
omar
84fe711bdf Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741) 2018-04-11 10:08:23 +02:00
omar
9117632bf0 Misc: IM_DELETE() helper function added in 1.60 doesn't clear the input _pointer_ reference, more consistent with expectation and allows passing r-value. 2018-04-09 20:42:49 +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
c2fc978983 Style: Default style is now StyleColorsDark()! Toward a 1.60 release :) (#707) 2018-04-06 23:25:25 +02:00
omar
2464e62a1a IO: Added ImGuiConfigFlags_NoMouse to force clear/disable mouse inputs in NewFrame(). 2018-04-06 19:36:13 +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
fc30462f18 Hide new windows for one frame until they calculate their size. Also fixes SetNextWindowPos() given a non-zero pivot. (#1694) 2018-04-04 19:35:08 +02:00
omar
4649967112 Added extra comments and assertions to avoid user combining ImGuiCond flags. (#1694) 2018-04-04 15:01:01 +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
c796960ff9 InputFloat: Scientific input. InputText: Added ImGuiInputTextFlags_CharsScientific to add 'e' 'E' to list of characters that can be input. (later useful for #1011) 2018-03-22 17:49:53 +01:00
omar
94116f1143 Examples: GLFW: Don't alter cursor mode if GLFW_CURSOR input mode is GLFW_CURSOR_DISABLED. (#1202) [@PhilCK] 2018-03-20 22:41:05 +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
dcf7c3d188 Added ImGuiBackendFlags for backend to expose its capabilities. Added ImGuiBackendFlags_HasGamepad. (#787, #1542) 2018-03-20 20:39:44 +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
fe5347ef94 imconfig: Added IMGUI_STB_TRUETYPE_FILENAME, IMGUI_STB_RECT_PACK_FILENAME + documenting IMGUI_DISABLE_STB_XXX flags and hiding IMGUI_STB_NAMESPACE which is misleading.
Fixed typos in todo list.
2018-03-20 18:25:37 +01:00
omar
1e296453ef ImDrawList: Added Clone() helper function. 2018-03-17 21:18:14 +01:00