Commit Graph

  • 773d484009 Internals: Made ContentsRegionRect absolute to reduce confusion. Renamed InnerRect to InnerMainRect, renamed WindowRectClipper to OuterRectClipped. omar 2018-05-09 22:02:59 +0200
  • f83f566530 Internals: Nav: Extracted code into a NavClampToVisibleAreaForMoveDir() + fix debug code + inline some functions, removed obsolete EndChild() comment. omar 2018-05-09 18:59:16 +0200
  • 39f4761ff7 TODO list update + Changelog and comments for #1803. omar 2018-05-09 15:47:41 +0200
  • 895647a240 Fixed clipboard paste memory leak in SDL examples. (#1803) Elias Daler 2018-05-09 15:06:53 +0300
  • 4cabf599c4 Data 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 +0200
  • ad2927888b Apply 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 +0200
  • 5f464877ed Internals: Declaring DragBehavior, SliderBehavior in there (no warantee given) as they may be useful to custom widgets. omar 2018-05-07 10:35:18 +0200
  • 8da0d42ef2 Moved DragScalar, InputScalar, SliderScalar to imgui.h as well as ImGuiDataType (#320, #643, #708, #1011) omar 2018-05-04 21:35:23 +0200
  • c5fb929555 Data types: Fixed empty format string (or no % specifier) breaking the parsing back of values. omar 2018-05-04 21:02:26 +0200
  • 280c05e4f8 Fix 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 +0200
  • f13f10e725 Settings: Comments (#923, #993) omar 2018-05-07 22:35:23 +0200
  • 4ff23d3306 Merge branch 'master' into viewport omar 2018-05-07 22:23:58 +0200
  • 0bf43b3a1b Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory(), io.WantSaveIniSettings. (#923, #993) omar 2018-05-07 22:18:45 +0200
  • 023cc25c7c Internals: 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 +0200
  • 35e74c72ab imgui_freetype: skip missing glyphs as well to match our stb loader (#1671, #1703) omar 2018-05-07 20:32:17 +0200
  • 6eda9ed3fb Skip missing font glyphs V2 revert changes to stb_truetype.h ( omar 2018-05-07 19:57:53 +0200
  • 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) omar 2018-05-07 17:59:23 +0200
  • 807c4f0ea4 Ran a spell checker for sanity. omar 2018-05-03 21:11:53 +0200
  • 4310bad32a Examples: DirectX9: Comments, updated changelog, notes about usage of imconfig.h (#1790, #1687) omar 2018-05-07 11:52:11 +0200
  • d0051ce5cb add renderstate D3DRS_SHADEMODE for Dx9 impl SR_team 2018-05-03 12:01:41 +0300
  • c7687fc1d6 Viewports: Comments on ImGuiConfigFlags_DpiEnableScaleViewports and ImGuiConfigFlags_DpiEnableScaleFonts. (#1542) omar 2018-05-07 10:44:08 +0200
  • 3e8087458d SliderScalar, 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 +0200
  • 944f414cc6 Internals: 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 +0200
  • 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(). omar 2018-05-04 15:31:17 +0200
  • dcd26f1295 DragFloat, DragInt: Default format string is none is passed to the function. Fixed demo using old style %.0f. omar 2018-05-04 15:29:33 +0200
  • dbe16b6a70 Made IMGUI_DISABLE_OBSOLETE_FUNCTIONS exceptionally not affect the layout of ImGuiIO. (#1695) omar 2018-05-04 14:55:38 +0200
  • f47c756755 Internals: Missing const, some renaming. Tweak legacy fast path. omar 2018-05-03 21:53:26 +0200
  • 0699ae161f DragInt, DragScalar: Actually made the fast-past handle the now-most-common case.. omar 2018-05-03 21:49:38 +0200
  • 7640439747 DragInt: 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 +0200
  • 17d3c6305e Ran a spell checker for sanity. omar 2018-05-03 21:11:53 +0200
  • 069b284f17 Internals: 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 +0200
  • 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) omar 2018-05-03 19:36:47 +0200
  • 6c932479f2 Internal: DragScalar(), InputScalar() now support signed/unsigned, 32/64 bits, float/double data types. (#320, #643, #708, #1011) omar 2018-05-03 17:32:50 +0200
  • 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) omar 2018-05-03 14:05:17 +0200
  • 3f04fd0644 Internals: 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 +0200
  • 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) omar 2018-05-02 14:07:20 +0200
  • d9fa1f869e Comments about using "power curves". Demo tweaks. (#648) omar 2018-05-03 12:50:34 +0200
  • 8a370f6491 SliderFloat: Fixed grab size and steps with %g format. (#642, #1301) omar 2018-05-02 19:46:57 +0200
  • 10e3f17235 DragFloat/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 +0200
  • a62f195e83 Internals: Renamed IsCharIsSpace() to IsCharIsBlank*() to match standard terminlogy and added ascii/u16 variations. omar 2018-05-03 11:57:51 +0200
  • ef05141a06 Internals: 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 +0200
  • ed756d474e Internals: Added ImGuiDataType_Uint32 data type which is usable with InputScalarEx(). omar 2018-04-30 20:02:33 +0200
  • 7df985bc5c Nav: 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 +0200
  • a1da7f9860 Internals: 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 +0200
  • 92f0165f85 DragFloat, SliderFloat: Rounding scalar using the provided format string instead of parsed precision. (#648) omar 2018-04-30 16:44:57 +0200
  • 6881d065b8 DragFloat/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 +0200
  • d7e24416dd DragFloat/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 +0200
  • 429f48bb4f Clarified 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 +0200
  • f2e9dddeca DragDrop: Removed const qualifier from ImGuiPayload 's void* data, easing casting on user side. omar 2018-04-28 10:43:15 +0200
  • d317951b37 Demo: Fixed demo from using obsolete functions. Branimir Karadžić 2018-04-27 16:17:25 -0700
  • 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) omar 2018-04-28 00:11:40 +0200
  • 73445ff248 Renamed all "display_format" arguments to "format" to emphasis that they also affect rounding of values. (#648, #642) omar 2018-04-27 23:44:27 +0200
  • 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) omar 2018-04-27 23:18:28 +0200
  • 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). omar 2018-04-27 19:15:25 +0200
  • a84aff1875 Internals: DragBehavior: tweaks internals. omar 2018-04-27 18:22:10 +0200
  • 1d99b5f963 Internals: Reordered parameters of DataTypeFormatString() internal helper functions and shallow tweaks. omar 2018-04-27 17:32:31 +0200
  • 101f9b42b7 InputText: Fixed returning true when edition is cancelled with Esc and the current buffer matches the initial value. omar 2018-04-27 17:19:49 +0200
  • 28edece04f Comments, minor tweaks omar 2018-04-26 14:56:46 +0200
  • c47d34cf70 Viewport: 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 +0200
  • cd51f37fc0 Viewport, 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 +0200
  • da70c837da Viewport: Removed unnecessary fields (now that the coordinate system is consistent accross viewports): MouseRefPrevViewport, MouseClickedPosViewportId. (#1542) omar 2018-04-26 14:32:52 +0200
  • f1ae07e532 Viewport, 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 +0200
  • f8c9c33d33 Fixed static analyzers warnings with bool literals (#1775) Bruce Mitchener 2018-04-26 14:51:46 +0700
  • d9cd494eaf Viewport: Moved ScaleWindow* code in a proper location. Various comments. omar 2018-04-25 19:12:16 +0200
  • 27ac9f4761 Comments (#1695) omar 2018-04-25 22:16:16 +0200
  • 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) omar 2018-04-25 22:07:14 +0200
  • 5979233a3c Misc: tweaks + minor changes merged from master to reduce branch drift. Removed code that ended up unused. omar 2018-04-25 18:23:39 +0200
  • 0b1d6a0d52 Merge branch 'master' into viewport omar 2018-04-25 18:13:23 +0200
  • 711a63befc Misc: Stop moving window if mouse position becomes invalid. Flagged menus are _NoMove for sanity. omar 2018-04-25 17:55:26 +0200
  • d317d90610 Misc: 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 +0200
  • 9cbca8c127 Begin: 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 +0200
  • e3453d0dc4 Misc: Comments and shallow/small changes (merged from viewport branch to minimize branch drift). omar 2018-04-25 16:38:13 +0200
  • b28535d1da ImGuiTextBuffer::appendfv needs to va_end the args_copy. Bruce Mitchener 2018-04-25 22:32:24 +0700
  • 7b433605f9 Viewport: Avoid creating viewport on drag (fix cc882b0723) omar 2018-04-25 15:38:19 +0200
  • 3b9b1956cd Merge branch 'master' into viewport omar 2018-04-25 15:32:04 +0200
  • 01fa934222 Internals: 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 +0200
  • 7a41e0b1ea Platform: 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 +0200
  • cc882b0723 Viewport: Tidying up AddUpdateViewport() calls. Moved flags argument. Removed extraneous mid-frame call to FindPlatformMonitorFromRect(). (#1542) omar 2018-04-25 15:00:54 +0200
  • 6d6580f6be Viewport: Fixed glitches with newly appearing menus creating viewport while the underlying imgui window should be hidden. (#1542) omar 2018-04-25 11:23:34 +0200
  • 7684f53328 Viewport: 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 +0200
  • 7ebdadf92b Fix various typos. Bruce Mitchener 2018-04-25 14:34:26 +0700
  • e3e4b7bdf5 Viewport: 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 +0200
  • 679f4882a5 Removed 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 +0200
  • 46698c96c5 Removed 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 +0200
  • 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. omar 2018-04-23 21:38:53 +0200
  • cb78e62df9 Viewport, 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 +0200
  • 376f2aec54 Viewport: 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 +0200
  • 010757266e Viewports: 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 +0200
  • d268471285 Viewport: 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 +0200
  • 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) omar 2018-04-23 11:26:23 +0200
  • 423577e14e Viewport, 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 +0200
  • f1c31ebc67 Viewport: Fixed initial popup positioning not using the monitor area properly. (#1542) omar 2018-04-23 12:52:01 +0200
  • 4433ce4312 Viewport, Platform: Added work area in ImGuiPlatformMonitor. Renamed fields. (#1542) omar 2018-04-23 12:38:20 +0200
  • 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) omar 2018-04-23 11:15:13 +0200
  • e2f831c80e InputText: tweaks, minor refactoring, renaming + comments (#1695) omar 2018-04-23 09:37:55 +0200
  • 456bbffcc4 Viewport: 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 +0200
  • 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) omar 2018-04-20 16:03:21 +0200
  • 49a451d247 Window: 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 +0200
  • 17a7f352b5 Viewporrt. 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 +0200
  • f93dce9513 InputText: Tweak to make the if statement more readable + update Changelog (#1747) omar 2018-04-19 16:21:32 +0200