773d484009Internals: Made ContentsRegionRect absolute to reduce confusion. Renamed InnerRect to InnerMainRect, renamed WindowRectClipper to OuterRectClipped.
omar
2018-05-09 22:02:59 +02:00
f83f566530Internals: Nav: Extracted code into a NavClampToVisibleAreaForMoveDir() + fix debug code + inline some functions, removed obsolete EndChild() comment.
omar
2018-05-09 18:59:16 +02:00
39f4761ff7TODO list update + Changelog and comments for #1803.
omar
2018-05-09 15:47:41 +02:00
895647a240Fixed clipboard paste memory leak in SDL examples. (#1803)
Elias Daler
2018-05-09 15:06:53 +03:00
4cabf599c4Data types: Fix format srtings with leading blanks. Fix ColorEdit4() to not use obsolete formats (when using IMGUI_DISABLE_OBSOLETE_FUNCTIONS) (#643)
omar
2018-05-08 23:35:26 +02:00
ad2927888bApply fix from data_types branch, some widgets broken when format string doesn't contains a %. Broken by 92f0165f85. Data_types branch fix c5fb929555.
omar
2018-05-08 20:07:25 +02:00
5f464877edInternals: Declaring DragBehavior, SliderBehavior in there (no warantee given) as they may be useful to custom widgets.
omar
2018-05-07 10:35:18 +02:00
8da0d42ef2Moved DragScalar, InputScalar, SliderScalar to imgui.h as well as ImGuiDataType (#320, #643, #708, #1011)
omar
2018-05-04 21:35:23 +02:00
c5fb929555Data types: Fixed empty format string (or no % specifier) breaking the parsing back of values.
omar
2018-05-04 21:02:26 +02:00
280c05e4f8Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit.
omar
2018-05-08 11:02:38 +02:00
023cc25c7cInternals: Removed unnecessary allocation indirection for g.LogClipboard (this only made sense when there was a global context instance)
omar
2018-05-07 22:15:25 +02:00
35e74c72abimgui_freetype: skip missing glyphs as well to match our stb loader (#1671, #1703)
omar
2018-05-07 20:32:17 +02:00
6eda9ed3fbSkip missing font glyphs V2 revert changes to stb_truetype.h (
omar
2018-05-07 19:57:53 +02:00
787a475650Skip 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)
omar
2018-05-07 17:59:23 +02:00
807c4f0ea4Ran a spell checker for sanity.
omar
2018-05-03 21:11:53 +02:00
4310bad32aExamples: DirectX9: Comments, updated changelog, notes about usage of imconfig.h (#1790, #1687)
omar
2018-05-07 11:52:11 +02:00
d0051ce5cbadd renderstate D3DRS_SHADEMODE for Dx9 impl
SR_team
2018-05-03 12:01:41 +03:00
c7687fc1d6Viewports: Comments on ImGuiConfigFlags_DpiEnableScaleViewports and ImGuiConfigFlags_DpiEnableScaleFonts. (#1542)
omar
2018-05-07 10:44:08 +02:00
3e8087458dSliderScalar, VSliderScalar(): Support for any data types. Tested with various ranges/limits. Note that Drag/Slider/Input currently fail if the format string doesn't preview the actual value. Will fix next. (#320, #643, #708, #1011)
omar
2018-05-04 20:41:21 +02:00
944f414cc6Internals: A few selected math helpers are now using template to handle all supported types. Added ImPow() to wrap float/double in a standard manner without calling pow(double) when not needed in Drag code.
omar
2018-05-04 18:13:27 +02:00
f4c16fbb99Internals: Data types: Made format string optional. DragBehavior: Moved a bit of code outside of the template. Slider tidying up. Removed unnecessary call to fabsf().
omar
2018-05-04 15:31:17 +02:00
dcd26f1295DragFloat, DragInt: Default format string is none is passed to the function. Fixed demo using old style %.0f.
omar
2018-05-04 15:29:33 +02:00
dbe16b6a70Made IMGUI_DISABLE_OBSOLETE_FUNCTIONS exceptionally not affect the layout of ImGuiIO. (#1695)
omar
2018-05-04 14:55:38 +02:00
f47c756755Internals: Missing const, some renaming. Tweak legacy fast path.
omar
2018-05-03 21:53:26 +02:00
0699ae161fDragInt, DragScalar: Actually made the fast-past handle the now-most-common case..
omar
2018-05-03 21:49:38 +02:00
7640439747DragInt: Patch old format strings to replace %f by %d when using the DragInt() entry point. (#320, #643, #708, #1011)
omar
2018-05-03 21:28:59 +02:00
17d3c6305eRan a spell checker for sanity.
omar
2018-05-03 21:11:53 +02:00
069b284f17Internals: Tidying up internal helpers. Fixed a case ImParseFormatTrimDecorations() can return an off by one (out of bound) pointer if the format string is invalid. Extracted ImParseFormatFindEnd() out of TrimDecorations so we can use it to find the format type and replace the %f in old Int apis.
omar
2018-05-03 20:22:29 +02:00
086c3925c4Internals: 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)
omar
2018-05-03 19:36:47 +02:00
6c932479f2Internal: DragScalar(), InputScalar() now support signed/unsigned, 32/64 bits, float/double data types. (#320, #643, #708, #1011)
omar
2018-05-03 17:32:50 +02:00
93b8580a8dInternals: 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)
omar
2018-05-03 14:05:17 +02:00
3f04fd0644Internals: DragFloat: Removed DragSpeedScaleFast/DragSpeedScaleSlow since it's not yet usable and Nav version doesn't have an equivalent.
omar
2018-05-03 14:04:25 +02:00
4780ac1ca4Internals: 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)
omar
2018-05-02 14:07:20 +02:00
d9fa1f869eComments about using "power curves". Demo tweaks. (#648)
omar
2018-05-03 12:50:34 +02:00
8a370f6491SliderFloat: Fixed grab size and steps with %g format. (#642, #1301)
omar
2018-05-02 19:46:57 +02:00
10e3f17235DragFloat/SliderFloat internal InputScalar trim leading/trailing spaces emitted from the format string when presenting an edit box to the user. (#648) Follow up to 6881d065b8
omar
2018-05-03 11:59:20 +02:00
a62f195e83Internals: Renamed IsCharIsSpace() to IsCharIsBlank*() to match standard terminlogy and added ascii/u16 variations.
omar
2018-05-03 11:57:51 +02:00
ef05141a06Internals: InputScalarEx: Tweak internals so there is a fast path for the simple case. (in particular because it makes it clear what the extra code is for, so people tempted to create their own InputText data transform/handler understand how little is actually needed)
omar
2018-04-30 20:12:14 +02:00
ed756d474eInternals: Added ImGuiDataType_Uint32 data type which is usable with InputScalarEx().
omar
2018-04-30 20:02:33 +02:00
7df985bc5cNav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor. Fixed c8b9b2c6 which was incorrect (#787)
omar
2018-04-30 19:40:25 +02:00
a1da7f9860Internals: Tweaked ParseFormatPrecision(), clarified its more limited purpose, allowing 2-digits precisions since it makes (some) sense for doubles. (#648)
omar
2018-04-30 16:52:16 +02:00
92f0165f85DragFloat, SliderFloat: Rounding scalar using the provided format string instead of parsed precision. (#648)
omar
2018-04-30 16:44:57 +02:00
6881d065b8DragFloat/SliderFloat internal InputScalar trip trailing decoration off the format string when presenting an edit box to the user. (#648)
omar
2018-04-30 15:59:59 +02:00
d7e24416ddDragFloat/SliderFloat internal InputScalar relies on the user supplied format string to format and parse value. (#648) The trailing text after the format will be displayed in the InputText but not affect back parsing. Ideally we can try to strip it later.
omar
2018-04-30 11:08:45 +02:00
429f48bb4fClarified usage of ListBoxHeader() before we rename those functions + fixed demo code that didn't honor it correctly. (#1783)
omar
2018-04-29 12:19:44 +02:00
f2e9dddecaDragDrop: Removed const qualifier from ImGuiPayload 's void* data, easing casting on user side.
omar
2018-04-28 10:43:15 +02:00
d317951b37Demo: Fixed demo from using obsolete functions.
Branimir Karadžić
2018-04-27 16:17:25 -07:00
f80314754cInputFloat,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)
omar
2018-04-28 00:11:40 +02:00
73445ff248Renamed all "display_format" arguments to "format" to emphasis that they also affect rounding of values. (#648, #642)
omar
2018-04-27 23:44:27 +02:00
8a38271a7cSliderFloat, 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)
omar
2018-04-27 23:18:28 +02:00
066550de68DragFloat, 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).
omar
2018-04-27 19:15:25 +02:00
1d99b5f963Internals: Reordered parameters of DataTypeFormatString() internal helper functions and shallow tweaks.
omar
2018-04-27 17:32:31 +02:00
101f9b42b7InputText: Fixed returning true when edition is cancelled with Esc and the current buffer matches the initial value.
omar
2018-04-27 17:19:49 +02:00
28edece04fComments, minor tweaks
omar
2018-04-26 14:56:46 +02:00
c47d34cf70Viewport: Exposing SetNextWindowViewport(). Used in demo and old/obsolete SetNextWindowPosCenter() (which is an interesting case). Fixed back-end likely crash calling GetFocus() after viewport destruction. Fixed metrics crash.
omar
2018-04-26 16:36:39 +02:00
cd51f37fc0Viewport, Platform: Refresh monitor list (win32, glfw) + avoid calling GetWindowFocus before platform window creation to not require of backend to null-check things inconsistently. (#1542)
omar
2018-04-26 16:07:54 +02:00
da70c837daViewport: Removed unnecessary fields (now that the coordinate system is consistent accross viewports): MouseRefPrevViewport, MouseClickedPosViewportId. (#1542)
omar
2018-04-26 14:32:52 +02:00
f1ae07e532Viewport, Platform: Using Platform_GetWindowFocus to provide a much stronger heuristic of platform z-order, in replacement for when the back-end cannot provide io.MouseHoveredViewport. The pressure for it to work well increased with the use of viewports by popups/menus. (#1542)
omar
2018-04-26 11:52:38 +02:00
f8c9c33d33Fixed static analyzers warnings with bool literals (#1775)
Bruce Mitchener
2018-04-26 14:51:46 +07:00
d9cd494eafViewport: Moved ScaleWindow* code in a proper location. Various comments.
omar
2018-04-25 19:12:16 +02:00
eb1c36fdfbAdded IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769)
omar
2018-04-25 22:07:14 +02:00
5979233a3cMisc: tweaks + minor changes merged from master to reduce branch drift. Removed code that ended up unused.
omar
2018-04-25 18:23:39 +02:00
0b1d6a0d52Merge branch 'master' into viewport
omar
2018-04-25 18:13:23 +02:00
711a63befcMisc: Stop moving window if mouse position becomes invalid. Flagged menus are _NoMove for sanity.
omar
2018-04-25 17:55:26 +02:00
d317d90610Misc: NavCalcPreferredRefPos selects between mouse and nav reference position + added sanity assert (merged from viewport branch to minimize branch drift).
omar
2018-04-25 17:53:24 +02:00
9cbca8c127Begin: Shuffled some code, _should_ have no side-effect. Clear NextWindowData in one call and more consistently. (merged from viewport branch to minimize branch drift).
omar
2018-04-25 17:48:46 +02:00
e3453d0dc4Misc: Comments and shallow/small changes (merged from viewport branch to minimize branch drift).
omar
2018-04-25 16:38:13 +02:00
b28535d1daImGuiTextBuffer::appendfv needs to va_end the args_copy.
Bruce Mitchener
2018-04-25 22:32:24 +07:00
3b9b1956cdMerge branch 'master' into viewport
omar
2018-04-25 15:32:04 +02:00
01fa934222Internals: Removed unecessary Pos/PosFloat separation, only reason appears to be mostly pre-1.0. The only piece of code that I expected sub-pixel window position to matter actually already round its delta (wrongly so, will fix later/separately if we want).
omar
2018-04-25 15:24:26 +02:00
7a41e0b1eaPlatform: Added platform_io.Platform_SetWindowFocus, Platform_GetWindowFocus function wrappers (unused yet). Exact specs tbd because our simplified concept of focus doesn't necessary match the more complex OS native concepts. (#1542)
omar
2018-04-25 15:15:14 +02:00
cc882b0723Viewport: Tidying up AddUpdateViewport() calls. Moved flags argument. Removed extraneous mid-frame call to FindPlatformMonitorFromRect(). (#1542)
omar
2018-04-25 15:00:54 +02:00
6d6580f6beViewport: Fixed glitches with newly appearing menus creating viewport while the underlying imgui window should be hidden. (#1542)
omar
2018-04-25 11:23:34 +02:00
7684f53328Viewport: Fixed issues with popups drifting in particular when reference mouse position become invalid (e.g. changing app focus while viewported-menu is open). Storing monitor index in viewport at beginning of the frame. (#1542)
omar
2018-04-25 10:54:38 +02:00
7ebdadf92bFix various typos.
Bruce Mitchener
2018-04-25 14:34:26 +07:00
e3e4b7bdf5Viewport: Fixed mouse hover flicker on mouse button release frame after moving a window. (#1542) Platform: Clarifying some comments in back-ends.
omar
2018-04-24 17:09:50 +02:00
679f4882a5Removed presumably obsolete MovingWindow tests which prevent move/merge logic in viewport branch from working in all situations (e.g. docking away when ActiveId is the ID of a tab)
omar
2018-04-24 16:48:26 +02:00
46698c96c5Removed presumably obsolete MovingWindow tests which prevent move/merge logic in viewport branch from working in all situations (e.g. docking away when ActiveId is the ID of a tab)
omar
2018-04-24 16:48:26 +02:00
dc03c93164Internals: Removed misleading ImRect::FixInverted + fix minor formatting in Readme. Demo: Fixed Overlay: Added a context menu item to enable freely moving the window.
omar
2018-04-23 21:38:53 +02:00
cb78e62df9Viewport, Platform: Fixed IME positioning for multi-viewport. Moved API from ImGuiIO to ImGuiPlatformIO. Because it is extremely unlikely to people redefined this API manually the moving-forward-breakage is ok. (#1542) SDL2 ime support under Win32 never worked properly because of SDL interferences.
omar
2018-04-24 12:40:38 +02:00
376f2aec54Viewport: Clamp windows within monitors + fallback rescue window when it is out of sight (e.g. removed monitor, changed resolution) + Win32: declare primary monitor at the beginning of the list. (#1542)
omar
2018-04-23 23:01:37 +02:00
010757266eViewports: Todos, Tooltips/menus not automatically forced into their own viewport when the NoMerge flag is set (however the multiplication of viewports makes them more likely to protude and create their own). Win32: try to make primary monitor the first tin the list. (#1542)
omar
2018-04-23 23:00:14 +02:00
d268471285Viewport: Added ImGuiConfigFlags_ViewportsNoMerge flag (to enforce a platform window for all floating windows) + minor tidying up and addition of non-functional wip code.
omar
2018-04-23 18:27:38 +02:00
7b6b7038c5Window: 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)
omar
2018-04-23 11:26:23 +02:00
423577e14eViewport, Platforms: SDL: Fixed initial focus click being ignored as a mouse button. GLFW: Fixed mouse cursor support for multi-viewport with GLFW 3.3 (current master) - somehow doesn't appear to work with GLFW 3.2 but I'm not too fussed about it. (#1542)
omar
2018-04-23 15:54:38 +02:00
f1c31ebc67Viewport: Fixed initial popup positioning not using the monitor area properly. (#1542)
omar
2018-04-23 12:52:01 +02:00
4433ce4312Viewport, Platform: Added work area in ImGuiPlatformMonitor. Renamed fields. (#1542)
omar
2018-04-23 12:38:20 +02:00
22773e03a2InputText: 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)
omar
2018-04-23 11:15:13 +02:00
456bbffcc4Viewport: Switched to using unified platform-absolute mouse coordinates, which simplify lots of problems and simplify/reduce tricky conversions, makes ImVec2 less ambiguous. Fixed various viewport/windowing/popups/synchronization bugs. Settings on host-viewport are stored as relative (made settings decently compatible between viewport enable/disabled settings). Merged ImGuiViewport::Pos and ::PlatformPos. Tweaked thumbnails. Better, smaller code. (#1542)
omar
2018-04-20 21:29:16 +02:00
037d5a7e98Columns: 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)
omar
2018-04-20 16:03:21 +02:00
49a451d247Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
omar
2018-04-20 15:40:12 +02:00
17a7f352b5Viewporrt. Examples: DirectX10,11: Make the platform SetWindowSize handler not crash on failure to resize, which could happen (rarely) on invalid data or bug in the code.
omar
2018-04-19 17:23:43 +02:00
f93dce9513InputText: Tweak to make the if statement more readable + update Changelog (#1747)
omar
2018-04-19 16:21:32 +02:00