763 Commits (19c4fa8dd5671a751275c7389deffa029a61b294)

Author SHA1 Message Date
omar f83f566530 Internals: Nav: Extracted code into a NavClampToVisibleAreaForMoveDir() + fix debug code + inline some functions, removed obsolete EndChild() comment. ago%!(EXTRA string=7 years)
omar 5f464877ed Internals: Declaring DragBehavior, SliderBehavior in there (no warantee given) as they may be useful to custom widgets. ago%!(EXTRA string=7 years)
omar 8da0d42ef2 Moved DragScalar, InputScalar, SliderScalar to imgui.h as well as ImGuiDataType (#320, #643, #708, #1011) ago%!(EXTRA string=7 years)
omar 0bf43b3a1b Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory(), io.WantSaveIniSettings. (#923, #993) ago%!(EXTRA string=7 years)
omar 023cc25c7c Internals: Removed unnecessary allocation indirection for g.LogClipboard (this only made sense when there was a global context instance) ago%!(EXTRA string=7 years)
omar 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) ago%!(EXTRA string=7 years)
omar 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. ago%!(EXTRA string=7 years)
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(). ago%!(EXTRA string=7 years)
omar f47c756755 Internals: Missing const, some renaming. Tweak legacy fast path. ago%!(EXTRA string=7 years)
omar 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. ago%!(EXTRA string=7 years)
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) ago%!(EXTRA string=7 years)
omar 6c932479f2 Internal: DragScalar(), InputScalar() now support signed/unsigned, 32/64 bits, float/double data types. (#320, #643, #708, #1011) ago%!(EXTRA string=7 years)
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) ago%!(EXTRA string=7 years)
omar 3f04fd0644 Internals: DragFloat: Removed DragSpeedScaleFast/DragSpeedScaleSlow since it's not yet usable and Nav version doesn't have an equivalent. ago%!(EXTRA string=7 years)
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) ago%!(EXTRA string=7 years)
omar 10e3f17235 DragFloat/SliderFloat internal InputScalar trim leading/trailing spaces emitted from the format string when presenting an edit box to the user. (#648) ago%!(EXTRA string=7 years)
omar a62f195e83 Internals: Renamed IsCharIsSpace() to IsCharIsBlank*() to match standard terminlogy and added ascii/u16 variations. ago%!(EXTRA string=7 years)
omar ed756d474e Internals: Added ImGuiDataType_Uint32 data type which is usable with InputScalarEx(). ago%!(EXTRA string=7 years)
omar 92f0165f85 DragFloat, SliderFloat: Rounding scalar using the provided format string instead of parsed precision. (#648) ago%!(EXTRA string=7 years)
omar 6881d065b8 DragFloat/SliderFloat internal InputScalar trip trailing decoration off the format string when presenting an edit box to the user. (#648) ago%!(EXTRA string=7 years)
omar d7e24416dd DragFloat/SliderFloat internal InputScalar relies on the user supplied format string to format and parse value. (#648) ago%!(EXTRA string=7 years)
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) ago%!(EXTRA string=7 years)
omar 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. ago%!(EXTRA string=7 years)
omar 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) ago%!(EXTRA string=7 years)
omar da70c837da Viewport: Removed unnecessary fields (now that the coordinate system is consistent accross viewports): MouseRefPrevViewport, MouseClickedPosViewportId. (#1542) ago%!(EXTRA string=7 years)
omar 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) ago%!(EXTRA string=7 years)
omar 5979233a3c Misc: tweaks + minor changes merged from master to reduce branch drift. Removed code that ended up unused. ago%!(EXTRA string=7 years)
omar e3453d0dc4 Misc: Comments and shallow/small changes (merged from viewport branch to minimize branch drift). ago%!(EXTRA string=7 years)
omar 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). ago%!(EXTRA string=7 years)
omar cc882b0723 Viewport: Tidying up AddUpdateViewport() calls. Moved flags argument. Removed extraneous mid-frame call to FindPlatformMonitorFromRect(). (#1542) ago%!(EXTRA string=7 years)
omar 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) ago%!(EXTRA string=7 years)
omar dc03c93164 Internals: Removed misleading ImRect::FixInverted + fix minor formatting in Readme. ago%!(EXTRA string=7 years)
omar 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) ago%!(EXTRA string=7 years)
omar 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) ago%!(EXTRA string=7 years)
omar 637d9c42bf Viewport: WIP for Tooltips, Popups, Menus to create their own viewport. Resizing a window allows it to leave the main viewport. (#1542) ago%!(EXTRA string=7 years)
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) ago%!(EXTRA string=7 years)
Doug Binks 1e41bad90f Added DisplaySafeAreaPadding to MainMenuBar height and fixed starting x position. Fixes main menu bar problems with TVs. (#1439) ago%!(EXTRA string=7 years)
omar 25f25d546d Viewport: Fixed manual mouse resize to handle mouse viewport change, which will allow resizing a window while it changes viewport. Releasing manual resize may merge a window. Added ConvertViewportPosToViewportPos() helper. Renamed NewFrameUpdateMovingWindowDropViewport() to UpdateTryMergeWindowIntoHostViewport() and removed the now-unnecessary half of the function. + renaming (#1542) ago%!(EXTRA string=7 years)
omar 50e453a3e2 Viewport: Comments, tweaks, renaming. Removed unnecessary stuff. Fixed zealous Clang warning. (#1542) ago%!(EXTRA string=7 years)
omar 0d16492eb7 Viewport: Moved ImGuiWindowFlags_FullViewport to an internal ViewportOwned flag. Renamed AddViewport to AddUpdateViewport. (#Viewport: Shuffled code in Begin to reset size of reappearing popups prior to selecting viewport, to avoid mistakenly using an old size. Moved code out of UpdateSelectWindowViewport() to the section of Begin where positions is being locked down, to avoid code in-between duplicating this. (#1542)) ago%!(EXTRA string=7 years)
omar 38e357ef10 Viewport: Virtual mouse position are patched immediately when viewports are moved in the virtual space, avoiding interaction glitchs on a resizing frame. (#1542) ago%!(EXTRA string=7 years)
omar 8be6f40ae1 Viewport: per-viewport overlay draw list created on demand. With this pattern it'll be easier to consider adding more (e.g. background draw list). (#545) ago%!(EXTRA string=7 years)
omar bfc0efaae9 Internals: Window: Aggregating ImDrawList into the ImGuiWindow structure. ago%!(EXTRA string=7 years)
omar 83bd3595a4 Viewport: Merged ImGuiPlatformData into ImGuiPlatformIO. Comments. (#1542) ago%!(EXTRA string=7 years)
omar 52cac135c9 Internals: Renamed GetFrontMostModalRootWindow() to GetFrontMostPopupModal() and exposed in imgui_internal.h (#1738) ago%!(EXTRA string=7 years)
omar 6f1f5cbc20 Version 1.61 WIP ago%!(EXTRA string=7 years)
omar 3a29ddbcfa Version 1.60 ago%!(EXTRA string=7 years)
omar 6d0c720451 Internals: Removed unused internal variant of ArrowButton(). ago%!(EXTRA string=7 years)
omar 82b7a39f31 Fixed a few zealous warnings. ago%!(EXTRA string=7 years)
omar e88fb10d7c NewFrame: Extract some code into a NewFrameUpdateHoveredWindowAndCaptureFlags() which can be of use with touch-based inputs systems. ago%!(EXTRA string=7 years)