Commit Graph

407 Commits

Author SHA1 Message Date
Lionel Landwerlin 679cf7434e Fix undefined behavior (#2561) 2019-05-18 10:43:30 +02:00
omar 42fc563fed Version 1.71 WIP + fixed minor typo 2019-05-07 16:36:08 +02:00
omar d1d5075b66 Version 1.70 2019-05-06 14:17:39 +02:00
omar 0f2852806c Amend 48a09a7 with changelog, breaking changes, tweak demo code for spacing. (#2518) 2019-04-29 12:44:17 +02:00
Richard Mitton 4c0f34fd5d Improved algorithm for mitre joints on thick lines 2019-04-29 12:07:03 +02:00
omar c8fd4afd75 Misc: Added IM_MALLOC/IM_FREE macros mimicking IM_NEW/IM_DELETE so user doesn't need to revert to using the ImGui::MemAlloc()/MemFree() calls directly. 2019-04-05 20:20:24 +02:00
omar 8dab7ac021 InputText: Made Shift+Tab consistently do nothing regardless of whether the back-end emits both char and keys or just keys. (#2467, #1336) 2019-04-03 11:14:34 +02:00
Nicolas Noble d9568c717d Silencing -Wstack-protector (#2459) 2019-03-31 01:35:03 -07:00
omar 221bf93a55 Comments, todo list, remove trailing spaces. 2019-03-17 00:56:21 +01:00
omar cf2c52282d Version 1.70 WIP 2019-03-15 13:07:30 +01:00
omar 55c02099c5 Version 1.69, comments, typos 2019-03-13 15:29:43 +01:00
omar a92c587c75 Added GetGlyphRangesVietnamese() helper. (#2403) 2019-03-11 22:02:59 +01:00
Bruce Mitchener b5d57a6615 Fix typos. (#2413) 2019-03-09 10:10:17 +01:00
Elias Daler c3ea1748dc Fix -Wconversion warning (#2379)
The warning was caused by implicit conversion from pointer type which
NULL has to non-pointer type, e.g. if ImTextureID is long int
2019-02-24 18:35:52 +01:00
omar 677e64e71e Internal: InputText: Comments. Renamed internal member. Renamed ImGuiStb->ImStb. 2019-02-20 21:34:08 +01:00
omar 257f5d204e Version 1.69 WIP 2019-02-20 00:11:36 +01:00
omar 3c15dffc94 Version 1.68 2019-02-19 12:50:46 +01:00
omar f5bf6e38d2 Font: Fixed assert when specifying duplicate/overlapping ranges within a same font. (#2353, #2233) 2019-02-18 12:11:46 +01:00
omar 93d1179805 Examples: Extracted gamepad code into ImGui_ImplGlfw_UpdateGamepads(). Renamed matching Win32 function for consistency.
Added more link to nothing's oversample document. Spacing bits.
2019-02-14 19:29:09 +01:00
omar a79785c0b9 ImDrawData: Added FramebufferScale field (currently a copy of the value from io.DisplayFramebufferScale).
This is to allow render functions being written without pulling any data from ImGuiIO, allowing incoming multi-viewport feature to behave on Retina display and with multiple displays. If you are not using a custom binding, please update your render function code ahead of time, and use draw_data->FramebufferScale instead of io.DisplayFramebufferScale. (#2306, #1676)
Examples: Metal, OpenGL2, OpenGL3: Fixed offsetting of clipping rectangle with ImDrawData::DisplayPos != (0,0) when the display frame-buffer scale scale is not (1,1). While this doesn't make a difference when using master branch, this is effectively fixing support for multi-viewport with Mac Retina Displays on those examples. (#2306) Also using ImDrawData::FramebufferScale instead of io.DisplayFramebufferScale.
Examples: Clarified the use the ImDrawData::DisplayPos to offset clipping rectangles.
2019-02-11 18:52:08 +01:00
omar 4b41d3b280 ImFont: Rearranged members toward an optimal CalcTextSize() loop. Removed comments from destructor. Made constructor more explicit. 2019-02-09 15:54:47 +01:00
omar d38f4dc143 Tabs: Non-docking tab bars are storing names to allow tab list button + whole style scaling. Added ImGuiTabBarFlags_TabListPopupButton flag to show a popup button on manual tab bars. Locking FramePadding for the scope of a tab-bar to avoid sheering/clipping of tab item. Made scaling of tab ellipsis less awkward. (#261, #351) 2019-02-05 13:23:44 +01:00
omar 8e44aacc8e Fonts: Fixed crash if FontGlobalScale is zero. Correctly debug naming default font if not 13 px. Demo: Moved PopupRounding along with other rounding values. Metrics: Displaying indexes with idx to be correct / less misleading. 2019-02-04 23:34:20 +01:00
omar 4e8e177cac Persistently fixing some PVS-Studio static analyzer false positive warnings. 2019-01-27 16:35:48 +01:00
omar c3c2cd1e82 Fix various XCode and PVS-Studio static analyzer warnings (#2309) 2019-01-27 16:18:23 +01:00
omar 2c38b32db1 Removed trailing spaces (#2038, #2299) 2019-01-20 17:56:17 +01:00
omar f94ba546ba Added checks for "zero-as-null-pointer-constant" warnings for older Clang (#2299, followup to #2277) 2019-01-20 17:46:00 +01:00
omar bebb07f12d ImFontAtlas: Added 0x2000-0x206F general punctuation range to default ChineseFull/ChineseSimplifiedCommon ranges. (#2093) 2019-01-17 16:48:11 +01:00
omar 8cbb91261e ImDrawList: Fixed AddCircle(), AddCircleFilled() angle step being off, which was visible when drawing a "circle" with a small number of segments (e.g. an hexagon). (#2287) [@baktery]
+ Demo tweaks
2019-01-16 17:47:49 +01:00
omar 06aaf23877 Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!) 2019-01-16 16:10:51 +01:00
omar 95ee99e6aa Version 1.68 WIP 2019-01-15 20:19:05 +01:00
omar 7a5058e3bf Version 1.67 2019-01-14 17:41:44 +01:00
omar 6e41745f31 Added a bunch of diagnostic ignore to cope with Clang -Weverything being absurd. Also fixed two legit warnings. (#2277) 2019-01-13 18:57:46 +01:00
omar 651130002f ImFontAtlas: Fixed allocating for last bit (would only affect is that last codepoint is a multiple of 32). (#2270) 2019-01-11 15:25:43 +01:00
omar 9a9712807e ImFontAtlas: Rewrote stb_truetype based builder.
- Atlas width is now properly based on total surface rather than glyph count (unless overridden with TexDesiredWidth).
- Fixed atlas builder so missing glyphs won't influence the atlas texture width. (#2233)
- Fixed atlas builder so duplicate glyphs (when merging fonts) won't be included in the rasterized atlas.
2019-01-10 22:23:05 +01:00
omar 9ad341902d ImDrawList: Optimized some of the functions for performance of debug builds where non-inline function call cost are non-negligible. 2019-01-08 17:37:22 +01:00
omar acfa4050ec Tweak changelog + tweak internal render helper functions. 2019-01-07 16:43:55 +01:00
omar 5cb7ce2085 Renamed ImFont::GlyphRangesBuilder to ImFontGlyphRangesBuilder. Keep redirection typedef (will obsolete). 2019-01-06 16:59:51 +01:00
omar 8399fb5071 Changed ImGuiCol_ChildBg to (0,0,0,0) in Dark style instead of (1,1,1,0), to match other styles. Shouldn't have any effect for the end-user. 2018-12-19 15:20:18 +01:00
omar 54a60aaa40 Added BETA api for Tab Bar/Tabs widgets. (#261, #351) (merged this feature from the from Docking branch so it can be used earlier as as standalone feature)
- Added BeginTabBar(), EndTabBar(), BeginTabItem(), EndTabItem(), SetTabItemClosed() API.
- Added ImGuiTabBarFlags flags for BeginTabBar().
- Added ImGuiTabItemFlags flags for BeginTabItem().
- Style: Added ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive colors.
- Demo: Added Layout->Tabs demo code.
- Demo: Added "Documents" example app showcasing possible use for tabs.
2018-12-11 12:36:47 +01:00
omar 10e13dd6bb Version 1.67 WIP (again, this time IMGUI_VERSION_NUM has leeway for another hot-fix). 2018-12-03 12:19:23 +01:00
omar 801645d350 Version 1.66b (will revisit how to change IMGUI_VERSION_NUM across versions, this commit reduces the numerical IMGUI_VERSION_NUM compared to the commit on Nov 22). 2018-12-03 10:17:17 +01:00
omar 84238240d6 Fixed a text rendering/clipping bug introduced in 1.66 (on 2018-10-12, commit ede3a3b9) that affect single ImDrawList::AddText() calls with single strings larger than 10k. Text/TextUnformatted() calls were not affected, but e.g. InputText() was. 2018-11-30 23:47:23 +01:00
Sebastian Krzyszkowiak 3335e6688f Include <alloca.h> also on macOS (and osxcross) (#2218) 2018-11-30 16:57:09 +01:00
omar d27ffefbd4 Version 1.67 WIP 2018-11-22 18:59:57 +01:00
omar da3c4330c1 Version 1.66 2018-11-22 15:11:52 +01:00
Elias Daler 8606d9fa11 Fix Clang/GCC's null-conversion warning: (#2081)
The warning is "implicit conversion of NULL constant to 'unsigned int' [-Wnull-conversion]". Happens when ImTextureID is not a void*, but unsigned int, for example.
2018-10-15 17:07:06 +02:00
omar ede3a3b92d Fixes crash introduced in previous commit 9cf94d5. 2018-10-12 13:29:13 +02:00
omar 9cf94d5dd6 RenderText(), InputTextMultiline(): Optimization for large text by using memchr, wmemchr, wcschr when appropriate. 2018-10-12 12:34:47 +02:00
omar 5719b23e01 ImDrawList: Fixed AddConvexPolyFilled() undefined behavior when passing points_count smaller than 3, in particular, points_count==0 could lead to a memory stomp if the draw list was previously empty. 2018-09-21 10:00:26 +02:00
ice1000 201fcfd2e5 Internals: Replace unsigned short with ImWchar when dealing with character storage. (#2078) 2018-09-11 22:00:57 +02:00
omar eb7033e75b Version 1.66 WIP 2018-09-06 21:44:59 +02:00
omar e0cab5664a Version 1.65 2018-09-06 15:58:58 +02:00
omar 5a679a45cc Renamed stb_truetype.h to imstb_truetype.h, stb_textedit.h to imstb_textedit.h, and stb_rect_pack.h to imstb_rectpack.h. (#1718, #2036)
If you were conveniently using the imgui copy of those STB headers in your project, you will have to update your include paths.
The reason for this change is to avoid conflicts for projects that may also be importing their own copy of the STB libraries. Note that imgui's copy of stb_textedit.h is modified.
2018-09-06 15:58:25 +02:00
omar e58bc3d5b7 Refactor: Tweaked and improved the sectioning to facilitate grepping/moving around and applied to all files. (#2036) 2018-09-06 11:36:00 +02:00
omar bcb1441ce7 Version 1.65 WIP 2018-09-03 14:38:04 +02:00
omar 48db5713d6 Version 1.64 2018-08-31 10:00:03 +02:00
omar 38cfcf9fbc Tweak comments and indexes 2018-08-31 09:59:58 +02:00
omar df37a156e8 Refactor: Moved Scrollbar function from imgui.cpp to imgui_widgets.cpp, added file index (#2036) 2018-08-30 20:51:57 +02:00
omar f2aa124eb8 Version 1.64 WIP 2018-08-30 14:25:23 +02:00
omar 9e0f24dcb6 Version 1.63 2018-08-29 16:20:25 +02:00
omar 92edb7a4e3 Internals: Tidying up, moving helpers to imgui_internal.h (in prevision of 1.64 refactor) 2018-08-29 16:12:54 +02:00
omar a082692b0a ImFontAtlas Comments (#2042) + added ImGuiFontAtlas_None for consistency. 2018-08-25 20:06:17 +02:00
omar 68448c5faa ImDrawList: Large text passed to AddText() are being scanned for their end in order to avoid pre-reserving too many vertices. 2018-08-22 12:46:47 +02:00
omar 975b5a7310 ImDrawList: Fixed clipping of leading lines above the clipping rectangle from counting in the worst case vertices reservation. (fix code added in #200!) 2018-08-22 12:46:47 +02:00
omar fda9dc8e18 Internals: Extracted RenderMouseCursor() out of EndFrame(). Moved to imgui_draw.cpp along with RenderArrowPointingAt(). Comments. (#2013) 2018-08-09 18:07:49 +02:00
omar 4d5dcdb57a Internals: Changed signature of ShadeVerts functions to remove pointers. (#1286, #1700, #1986) 2018-07-30 17:24:04 +02:00
Tommy Nguyen b5b972d0ef ImFontAtlas::AddFontDefault: Made it possible to override glyph ranges. (#1965) 2018-07-30 14:18:20 +02:00
omar 6211f40f3d Internals: Drag and Drop: default drop preview use a narrower clipping rectangle (no effect here, but other branches uses a narrow clipping rectangle that was too small so this is a fix for it) + Comments 2018-07-27 12:39:42 +02:00
omar 4ebd442a24 Added asserts to catch illegal modifications of the font atlas between NewFrame() and EndFrame()/Render(). (#1958) 2018-07-22 18:53:27 +02:00
Rokas Kupstys 7e59eb026b Fix warning when IMGUI_DEFINE_MATH_OPERATORS is already defined by build system. (#1950) 2018-07-17 17:17:56 +02:00
omar 5e73e969fb Comments, exposed a few things in imgui_internal.h for consistency, added ImQsort wrapper. 2018-07-12 11:08:24 +02:00
omar 23288547ec Revert part of c7016c2 incorrectly renaming ImGuiCol_NavWindowingHighlight to ImGuiCol_NavWindowListHighlight, that was wholly unnecessary (and not documented!). (also invalidate #1939) 2018-07-12 09:53:10 +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 93950b8c32 Internals: Removed unused ShadeVertsLinearAlphaGradientForLeftToRightText code. 2018-07-06 15:50:07 +02:00
omar 645ab6633c Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276) 2018-07-01 12:25:37 +02:00
omar 6e67afc500 Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors. (followup to #1914) 2018-06-29 16:36:40 +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
Aiekick ecd9a223e3 add hand cursor support (+11 squashed commit) 2018-06-29 16:36:40 +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 1b74e3be02 Version 1.62 2018-06-22 09:41:25 +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 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 6c684ae39b Fixed GCC pre-8 build. (#1822) + added bonus the non-ASCII character pasted from GCC breaks my SourceTree/Git combo 2018-05-17 18:10:20 +02:00
omar 64b1645deb Disabled GCC 8.1.0 warnings -Wclass-memaccess (#1822) 2018-05-17 14:19:20 +02:00
omar d5c8f404b2 Remove trailing white spaces. 2018-05-17 14:12: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 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 8149408408 Merge branch 'data_types'
# Conflicts:
#	CHANGELOG.txt
#	imgui.cpp
2018-05-11 16:48:50 +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 0bf43b3a1b Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory(), io.WantSaveIniSettings. (#923, #993) 2018-05-07 22:18:45 +02:00
omar 6eda9ed3fb Skip missing font glyphs V2 revert changes to stb_truetype.h ( 2018-05-07 19:57:53 +02:00
omar a62f195e83 Internals: Renamed IsCharIsSpace() to IsCharIsBlank*() to match standard terminlogy and added ascii/u16 variations. 2018-05-03 17:33:55 +02:00
omar 28edece04f Comments, minor tweaks 2018-04-27 17:32:03 +02:00
omar 928a4ad315 Begin: moved tooltip position code in an else block. Misc comments 2018-04-10 16:51:16 +02:00
omar 6f1f5cbc20 Version 1.61 WIP 2018-04-09 14:02:32 +02:00
omar 54fca1d1b8 Fixed erroneous call to io.Fonts->ClearInputData() + ClearTexData() that was left in DX10 example but removed in 1.47 (Nov 2015) in every other back-ends. (fixes 6cee2fca94) (#1733, ~#1731) + assert 2018-04-09 13:13:06 +02:00