1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-12-21 12:06:00 +01:00
Commit Graph

2454 Commits

Author SHA1 Message Date
ocornut
696d049ae5 ImStrv: made length() returns an int as it simplify the most common case (of passing %.*s to printf) 2024-12-11 15:48:12 +01:00
ocornut
61094fe0ec ImStrv: allow constructing from two null pointers. 2024-12-11 15:48:12 +01:00
ocornut
f1167f86c9 ImStrv: Combo(), ListBox(): maybe seems better to not introducte the ImStrv [] versions?
As 1) user is unlikely to store that on their end. 2) nowadays with lambdas isn't an easy user-side conversion.
Then we limit explosion of an already messy API.
2024-12-11 15:48:12 +01:00
ocornut
e7f8cba95e ImStrv: convert Combo()/ListBox() to use ImStrv in their getters.
Didn't convert Combo() "const char* items_separated_by_zeros" as this doesn't translate well when used via a ImStrv constructor, may actually aim to obsolete.
2024-12-11 15:48:12 +01:00
ocornut
9fa0a03e4f ImStrv: add needed disambiguishing functions for const char* now being ambiguous. (5079)
amended for gcc/clang warnings
amended to facilitate merge with docking
2024-12-11 15:48:11 +01:00
ocornut
8c29abb70a ImStrv: backtracked for now on supporting ImStrv for format strings.
It's widely incomplete and slow, requires a printf function taking non-zero-terminated format string to work.
Might do it eventually but it's much less a problem than labels. Format string are more frequently inlined in code and tend to be small, so existing solutions at call site can work better for now.
2024-12-11 15:48:11 +01:00
ocornut
2e0aa8299d ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks. 2024-12-11 15:48:11 +01:00
ocornut
ede8912724 ImStrv: changed ImStrv xxx=NULL args to an explicit xxx=ImStrv()
This is mostly for the benefit of cimgui parser, ideally we would do without.
2024-12-11 15:48:11 +01:00
ocornut
55f55640e7 ImStrv: Step 2 - change ImStrv typedef to struct, perform all other logic conversion.
Squashed commits (initially a commit from rokups + many rework by ocornut. keeping them separate commits made rebasing unnecessarily tricking so merged from 2024/02)
ImStrv: many fixes (see details), added imconfig class extension example, added natvis description.
ImStrv: rework toward ensuring End is always set to constant can be compile time calculated
ImStrv: using length(), fix ambiguous empty() function, fix altered behaviors, removed unused operators.
ImStrv: various tweaks and fixes. removed ImGuiTextRange from ImGuiTextFilter, fix test engine hooks, removed constructor only used twice.
2024-12-11 15:48:11 +01:00
Rokas Kupstys
4b89bbbaf0 ImStrv: Step 1 - change string type to ImStrv in API. (REBASED)
(last rebase amend 2024/12/11)
2024-12-11 15:48:09 +01:00
ocornut
993fa34749 Version 1.91.6 2024-12-11 15:05:36 +01:00
ocornut
c3ffd4c53e Misc: Added IMGUI_USE_LEGACY_CRC32_ADLER to use old tables. (#8169, #4933) 2024-12-11 12:13:28 +01:00
ocornut
d78e823449 InputText: added ImGuiInputTextFlags_ElideLeft. (#1442, #1440, #4391, #7208, #8216) 2024-12-09 15:00:04 +01:00
ocornut
70b6ba4240 Clarify that IMGUI_USE_BGRA_PACKED_COLOR requires backend support. (#8201) 2024-12-04 10:38:19 +01:00
ocornut
19a1f2a5d2 Fonts: fixed AddCustomRect() not being packed with TexGlyphPadding + not accounted in surface area. (#8107) 2024-11-29 18:58:01 +01:00
Teselka
e6dd8f626a Misc: changed CRC32 table to use crc32c polynomial in order to be compatible with SSE 4.2 instructions. (#8169, #4933) 2024-11-27 12:20:00 +01:00
ocornut
9b27329437 Comments on ImageButton(). (#8165) + comments on Emscripten -sSINGLE_FILE option. (#8153) 2024-11-25 19:11:40 +01:00
ocornut
20360e00ce Merge miscellaneous small changes to reduce drift with texture update branch.
- ImGuiDebugLogFlags_EventFont is yet unused.
2024-11-20 21:46:47 +01:00
ocornut
3381ab423b Version 1.91.6 WIP + fixed typo in tooltip. 2024-11-12 11:56:21 +01:00
ocornut
f401021d5a Version 1.91.5 2024-11-07 19:57:33 +01:00
ocornut
419a9ada16 Ignore clang warning Wnontrivial-memaccess (#8129, #8135)
Amend 88e2327
Use void* cast in backend where the memset are infrequent.
2024-11-07 19:08:37 +01:00
ocornut
17bd417a3d AddCustomRectFontGlyph: added storage for Colored bool in ImFontAtlasCustomRect. (#8133) 2024-11-07 14:58:15 +01:00
ocornut
df0776e931 (Breaking) Removed ImGuiKey_COUNT. (#4921) 2024-11-06 17:55:00 +01:00
ocornut
738d6db3e6 (Breaking) Removed used of ImGuiKey_KeysData_SIZE, ImGuiKey_KeysData_OFFSET. (#4921) 2024-11-06 17:55:00 +01:00
ocornut
6f287dd16d (Breaking) Removed pre-1.87 obsolete io.KeyMap[], io.KeysDown[], io.NavInputs[]. Remove IMGUI_DISABLE_OBSOLETE_KEYIO. (#4921) 2024-11-06 17:54:59 +01:00
ocornut
be2d006e2e Align warning blocks. Removed -Wunused-function, -Wmissing-prototypes from imgui_internal.h
As supposedly they were for stb_textedit.h which is now moved to imgui_draw.cpp
2024-11-05 10:50:49 +01:00
Brotcrunsher
d4791f1bbe
Fixed a comment typo. (#8128) 2024-11-05 10:12:52 +01:00
ocornut
75f83de52a InputText: fixed a bug (regression in 1.91.2) where modifying text buffer within a callback would sometimes prevents further appending to the buffer. (#7925)
There's a confusion between TextA.Size and CurLenA we should be merging them.
Amend 19accb14a
2024-11-04 20:22:10 +01:00
ocornut
772ca9e9a9 Log/Capture: added experimental io.ConfigWindowsCopyContentsWithCtrlC config option. 2024-10-30 15:38:58 +01:00
ocornut
9a0dff1bc5 Buttons: using ImGuiItemFlags_ButtonRepeat makes default button behavior use PressedOnClick instead of PressedOnClickRelease when unspecified. 2024-10-29 14:26:02 +01:00
ocornut
0bde57c25a Font, Misc: remove qualifier from most font functions.
Fixed ClearOutputData() not clearing Used4kPagesMap (mostly harmless).
2024-10-29 11:48:37 +01:00
ocornut
3b8c7d0326 Backends: Win32: rework to add ImGui_ImplWin32_WndProcHandlerEx() not using current context (experimental). (#8069, #6293, #5856, #586)
+ GetIOEx(). Amend fedf45c + cba656a. Amend 416cfdb9.
2024-10-28 17:22:17 +01:00
ocornut
41f02825fc Version 1.91.5 WIP 2024-10-23 12:16:28 +02:00
ocornut
83b64b8be2 Version 1.91.4 2024-10-18 21:45:36 +02:00
ocornut
ab9ce2a927 Nav: added io.ConfigNavCursorVisibleAuto, io.ConfigNavCursorVisibleAlways. (#1074, #2048, #7237, #8059, #3200, #787)
Note: the NavCursorHideFrames addition is to support 88a354585 even though ConfigNavCursorVisibleAlways is set.
2024-10-18 18:54:46 +02:00
ocornut
3982cb35dc Nav, Docs: consistently use "keyboard/gamepad" instead of sometimes "gamepad/keyboard". 2024-10-18 18:49:44 +02:00
ocornut
1ff9768aa3 Nav: (Breaking) renamed ImGuiCol_NavHighlight to ImGuiCol_NavCursor. (#1074, #2048, #7237, #8059, #1712, #7370, #787) 2024-10-18 18:49:44 +02:00
ocornut
634a7ed988 Nav: added SetNavCursorVisible(). (#1074, #2048, #7237, #8059)
+ Further internal renaming for consistency.
2024-10-18 18:49:44 +02:00
ocornut
23b655f8e3 Internals: (Breaking) changed g.NavDisableHighlight to g.NavCursorVisible : same logic but inverted value. (#1074, #2048, #7237, #8059, #1712, #7370, #787) 2024-10-18 18:49:43 +02:00
ocornut
7a56b41124 Nav: added io.ConfigNavEscapeClearFocusItem. (#8059, #2048, #1074, #3200) 2024-10-18 18:49:43 +02:00
ocornut
38617a5ad3 Internals: remove ImGuiInputTextFlags_NoMarkEdited and g.LockMarkEdited n favor of ImGuiItemFlags_NoMarkEdited. 2024-10-17 15:38:00 +02:00
ocornut
83ecc846dc Disabled: clicking a disabled item focuses parent window. (#8064) 2024-10-16 20:25:48 +02:00
ocornut
67e5f3505d InvisibleButton: disable navigation properly + added ImGuiButtonFlags_EnableNav to enable navigation. (#8057) 2024-10-16 19:56:20 +02:00
ocornut
49a9eee33f Commented out obsolete internals's SetItemUsingMouseWheel() (#2891), TreeNodeBehaviorIsOpen() (#4814, #5423, #282, #2958, #924)
+ Removed obsolete header checks for IMGUI_DISABLE_METRICS_WINDOW.
2024-10-15 10:45:10 +02:00
ocornut
b001038901 Nav: added io.ConfigNavEscapeClearFocusWindow to clear focused window on Escape. (#3200)
+ pressing escape to hide nav highlight doesn't clear location from when ctrl+tabbing back into same window later.
2024-10-14 16:57:34 +02:00
ocornut
ba5161740e Amend d885fe4, fixes default value of ConfigNavCaptureKeyboard. (#2517, #2009) 2024-10-14 16:52:25 +02:00
ocornut
d885fe4dd0 (Breaking) moved ImGuiConfigFlags_NavEnableSetMousePos -> io.ConfigNavMoveSetMousePos, ImGuiConfigFlags_NavNoCaptureKeyboard -> ConfigNavCaptureKeyboard. (#2517, #2009) 2024-10-14 15:29:24 +02:00
ocornut
98d52b7b26 DrawList: AddCallback() added an optional size parameter allowing to copy and store any amount of user data for usage by callbacks: (#6969, #4770, #7665) 2024-10-11 13:29:13 +02:00
ocornut
f3d242a90d Tables: fixed initial auto-sizing issue with synched-instances. (#8045, #7218) 2024-10-08 19:45:58 +02:00
ocornut
92b94980c6 (Breaking) Default ImTextureID to use a Im64 instead of void* (#1641) 2024-10-08 14:21:44 +02:00