Commit Graph

212 Commits

Author SHA1 Message Date
aoqia194 cf87294a8c
feat: Add EventViewClosed event (#2377)
Where one door opens, another one closes (said someone) and in this
situation i mean view, because there's no event for closing a view only
opening one, so please add this :c

### Problem description
Simply adds an **EventViewClosed** to match the pre-existing
**EventViewOpened**. Also fixes the issue where EventViewOpened wouldn't
trigger for windows that were popups (even if they are technically a
View.

### Implementation description
I mirrored the current functionality of EventViewOpened for closing.

---------

Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
2025-08-06 22:22:46 +02:00
WerWolv 9cff9043ee impr: Remove hex::format, improve format and logging type safety 2025-08-06 20:02:23 +02:00
WerWolv baebfe96ba impr: Make banners easier to read 2025-08-05 22:19:04 +02:00
WerWolv 9fc9eb1425 fix: EventViewOpened only getting called for undocked windows 2025-08-03 17:57:46 +02:00
WerWolv 2db85ced59 fix: High background GPU usage on Windows if window is minimized 2025-08-02 23:35:47 +02:00
WerWolv ac98e4e0b5 fix: Use after free when checking for frame render condition 2025-07-30 22:33:59 +02:00
WerWolv 4c89a79dc3 feat: Added full-screen views for use with subcommands in the future 2025-07-30 17:42:56 +02:00
WerWolv 8a7f232198 fix: Properly set default font for ImGui to use 2025-07-28 18:02:33 +02:00
WerWolv 8470334d6d fix: Reduce CPU usage when FPS is unlocked 2025-07-28 00:23:01 +02:00
WerWolv f42ae97f14 impr: Added more generic way to unlock frame rate when needed 2025-07-27 16:25:10 +02:00
WerWolv 90c2667028 fix: Detached window headers not getting scaled 2025-07-21 22:36:14 +02:00
WerWolv a89fb542b0 fix: Window not being resizable anymore on Linux
Fixes #2328
2025-07-13 17:02:52 +02:00
paxcut e7a2729d36
feat: semantic syntax highlights for pattern editor. (#2214)
allows the ability to assign colors to global placed and non-placed
variables, pattern, local and calculated pointer variables, template
arguments, function variables and arguments, etc etc etc. It
accomplishes this using the parser and the token sequence generated by
the lexer. It still uses the original colorizing code but the underlying
data holding the pattern has been updated to be easier to use and to
debug. The changes are too numerous to cite here.It is a big but
necessary step to bring the pattern editor to a somewhat useful state.
There may be one commit in the pattern language repo needed to be able
to run this code
2025-07-11 22:47:56 -07:00
WerWolv 4520637aed fix: Pixel perfect font not scaling correctly 2025-07-11 14:54:54 +02:00
WerWolv 2432462ff3 impr: Unlock frame rate for the first 5 seconds after startup 2025-07-11 13:37:15 +02:00
WerWolv 8c59684c14 impr: Much more accurate frame rate limiting
Many thanks to @ws909 in https://github.com/glfw/glfw/issues/2737
2025-07-11 13:29:56 +02:00
WerWolv 82c318f91d fix: Crash when no plugins could be loaded 2025-07-10 16:36:37 +02:00
Nik d1840a2184
build: Update ImGui to v1.92.1 (#2325)
Update ImGui to the latest version and rewrite most of the font handling
code
2025-07-10 10:00:39 +02:00
WerWolv df58afe1a1 fix: Build issue when imgui test engine is disabled 2025-06-29 13:22:37 +02:00
paxcut 755a53f821
improv: ImGui test engine window can now be opened and closed from debug menu (#2310) 2025-06-20 12:26:17 -07:00
WerWolv 1ca40481bb tests: Integrated ImGui Test Engine 2025-05-29 23:44:49 +02:00
paxcut 828951ffe9
build: msvc uninitialized variables. (#2239)
MSVC build failing because of a warning treated as an error for
variables being used without initializing even though they are being
passed as references.
2025-05-12 01:58:10 -07:00
WerWolv 616f34e210 fix: Window being created partially off-screen if monitor is too small
Fixes #2238
2025-05-11 23:54:58 +02:00
paxcut 5c4cf7379f
feat: Added Subpixel Font rendering (#2092)
Proof of concept for implementing subpixel processing in ImGui. This is
work in progress, and it is bound to have problems.

What it does:
1) Uses freetype own subpixel processing implementation to build a
32-bit color atlas for the default font only (no icons, no unifont) . 2)
Avoids pixel perfect font conversion when possible. 3) Self contained,
no ImGui source code changes.
4) Results in much improved legibility of fonts rendered on low dpi LCD
screens that use horizontal RGB pixel layouts (no BRG or OLED or CRT if
they even exist anymore)

What it doesn't:
1) Fancy class based interface. The code is barely the minimum needed to
show it can work. 2) Dual source color blending. That needs to be
implemented in shader code, so it needs to change ImGui source code
although minimally. This will result in some characters appearing dimmer
than others. Easily fixed with small fragment and vertex shaders. 3)
subpixel positioning. If characters are very thin they will look
colored, or they can be moved to improve legibility. 4) deal with
detection of fringe cases including rare pixel layouts, non LCD screens,
Mac-OS not handling subpixel rendering and any other deviation from the
standard LCD. 5) tries to be efficient in speed or memory use. Font
Atlases will be 4 times the size they were before, but there are no
noticeable delays in font loading in the examples I have tried.

Any comments and code improvements are welcome.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2025-05-11 15:36:32 +02:00
WerWolv eec6a5da0a impr: Unlock frame rate in more cases 2025-05-10 11:00:18 +02:00
WerWolv 335042ec08 impr: Reduce CPU usage further 2025-02-26 16:03:24 +01:00
WerWolv f6944b15f3 fix: Large CPU usage 2025-02-26 16:03:16 +01:00
WerWolv c974c4257d fix: Crash on exit due to frame rate limiter thread not being shut down
Fixes #2140
2025-02-25 11:50:38 +01:00
WerWolv 602c85b57d fix: Way too low sleep target fps 2025-02-24 19:53:07 +01:00
WerWolv 7879f8b6a4 impr: Don't wake up frame rate limiter thread more often than necessary 2025-02-23 20:25:29 +01:00
WerWolv d3c2516f5f fix: Occasional crash when switching fonts 2025-02-18 21:50:51 +01:00
WerWolv f846afd8a9 fix: Crash when setting invalid font 2025-02-17 13:06:35 +01:00
WerWolv 02b5df03ab impr: Drastically reduce font-related memory usage 2025-02-10 12:02:05 +01:00
WerWolv e1580e51cf build: Make ImHex fully compile with warnings enabled in MSVC 2025-02-10 09:42:35 +01:00
WerWolv 9fb38922ea impr: Disable main menu items for views that aren't selected right now 2025-02-02 22:32:24 +01:00
WerWolv 71c11a5923 fix: Banner position being wrong while provider is loaded 2025-02-02 21:15:31 +01:00
WerWolv f345edb252 fix: Banners not being part of the main viewport 2025-02-02 21:06:18 +01:00
WerWolv e9bf1a9f7a fix: Crash when no plugins were loaded 2025-02-01 18:08:47 +01:00
WerWolv 3f6b5203ca fix: Further MSVC compile fixes 2025-01-31 23:48:38 +01:00
paxcut 2f981ef91e
fix: Banners not scaling properly with font size (#2096)
The banner windows did not scale with the fonts resulting in cropped
text when font size was made bigger than normal.
fixed by ensuring the window is big enough and then making sure text is
centered in the y-axis.
2025-01-30 20:18:44 +01:00
WerWolv 24e7c2f3db fix: Make sure all textures are destroyed before glfw gets uninitialized 2025-01-27 22:10:30 +01:00
WerWolv 93f1f5d076 impr: Better font scaling with larger backing scale factors 2025-01-25 22:27:59 +01:00
Wolf b646ece14b
impr: Refactor and restructure Event Manager (#2082)
### Problem description
This PR addresses issue #2013 that described a cluttered Event Manager.

This is a DX issue and should not impact the users whatsoever.

### Implementation description
The changes revolve around three main points:

1. the Event Manager (`event_manager.hpp`) was split into four
categories: GUI, Interaction, Lifecycle, and Provider, and two types:
Events, and Requests. This results in the following files:
    - `events_gui.hpp`
    - `events_interaction.hpp`
    - `events_lifecycle.hpp`
    - `events_provider.hpp`
    - `requests_gui.hpp`
    - `requests_interaction.hpp`
    - `requests_lifecycle.hpp`
    - `requests_provider.hpp`

2. Every event and request now has its own piece of documentation, with
a `@brief`, accompanied by a longer comment if needed, and gets its
`@param`s described.

3. The old `event_manager.hpp` import was removed and replaced by the
correct imports wherever needed, as to reduce spread of those files only
to where they are truly useful.

### Additional things
The commits have been split into (chrono-)logical steps:
- `feat`: split the Event Manager, and replace the imports
- `refactor`, `chore`: make various small changes to match the required
structure
- `docs`: add documentation for events and requests

Hopefully, this will help to review the PR.
*Note: Beware of very long rebuild times in between the commits, use
them sparingly! The Actions will ensure this PR builds anyways*

Closes #2013

---------

Signed-off-by: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com>
Co-authored-by: Nik <werwolv98@gmail.com>
2025-01-25 15:32:07 +00:00
WerWolv f4bad0053a fix: Linking errors in the web build 2025-01-25 15:24:44 +01:00
WerWolv 69c5d553b5 fix: Disable postprocessing shaders in Web version 2025-01-22 19:55:17 +01:00
WerWolv 242b100aa3 fix: Properly detect Windows 10 2025-01-20 21:45:53 +01:00
WerWolv 07e29f2030 feat: Added support for OpenGL post processing shaders 2025-01-20 21:24:25 +01:00
WerWolv c117d9b3e5 fix: Crash when changing DPI 2025-01-19 23:07:53 +01:00
WerWolv 7c0331df65 impr: Hide window on macOS when close button is pressed 2025-01-19 17:04:31 +01:00
WerWolv b1edd95ebc impr: Shortcut code cleanup 2025-01-19 10:55:27 +01:00