223 Commits

Author SHA1 Message Date
Cameron Cawley a3fd645179 GRAPHICS: MACGUI: Support rendering with any 8/16/32bpp pixel format 2026-05-05 13:45:11 +02:00
neuromancer b1a8eb66ea GRAPHICS: MACGUI: allow to query cursor data 2026-04-03 15:31:42 +02:00
dhruv 07795beead GRAPHICS: MACGUI: fix active window while scrolling. 2026-01-28 12:16:09 +03:00
Armaan Singh Sandhu 807a10bb53 GRAPHICS: MACGUI: Fix Beam cursor gets stuck after editable editable widget
If the cursor is moved between the MacWindow and MacTextWindow the
cursor switches to beam and back but when you click in the MacTextWindow
the cursor gets stuck to beam no matter which window or menu you are
hovering over
2026-01-03 01:20:14 +03:00
Eugene Sandulenko fc433589dd GRAPHICS: MACGUI: Wrap cursor masks in OSystem feature check
Currently, they are supported only by the OpenGL backend
2025-09-29 11:11:32 +02:00
Eugene Sandulenko 23997fe27d GRAPHICS: MACGUI: Made beam cursor inversible 2025-09-28 22:36:49 +02:00
Eugene Sandulenko f2c6b800a4 GRAPHICS: MACGUI: Fixed all built=in cursor hotpsots 2025-09-28 22:22:26 +02:00
Eugene Sandulenko 4f50cdb020 GRAPHICS: MACGUI: Remove cursor handling from MacTextWindow
Now MacText is fully owning it
2025-09-21 22:12:38 +02:00
Eugene Sandulenko e8ab5b08ab GPRAHICS: MACGUI: Drop cursor handling parameter from MacTextWindow 2025-09-21 22:12:38 +02:00
Eugene Sandulenko d52f0d2dbd GRAPHICS: MACGUI: Add 'padding' parameter to MacTextWindow
Specifies internal text padding from the window borders
2025-09-21 22:12:37 +02:00
Eugene Sandulenko e2330a716f GRAPHICS: MACGUI: Do not pass events to invisible windows
Fixes major regression in Meet Mediaband when pop-up menu is taking
half of the screen but normally is invisible
2025-09-01 22:54:00 +02:00
ellm135 caa23d3db5 GRAPHICS: MACGUI: Add text-to-speech (TTS) to submenus and dialog buttons 2025-06-19 23:38:28 +02:00
Matthew Jimenez 77ee5a9007 IMAGE: Get palette class by reference on image decoders 2025-04-12 15:47:17 +03:00
Filippos Karapetis 4e7752b923 GRAPHICS: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Le Philousophe 2a37e2b808 GRAPHICS: MACGUI: Implement drawing primitives
This makes the code comply with the latest API changes.
The drawing calls now need to be optimized for the complex shapes.
2025-01-24 12:11:17 +01:00
Le Philousophe 6be1a9a890 GRAPHICS: MACGUI: Initialize the active menu callback 2025-01-11 12:43:41 +01:00
Torbjörn Andersson 92e7d9400f GRAPHICS: MACGUI: Add callback for when the menu is activated
The LucasArts SCUMM games need to know when this happens so that they
can turn the screen black. Polling the window manager for the menu
status probably wasn't good enough, because it seemed there were cases
where the menu was both activated and opened too quickly for the game to
have a chance to register it happening.

There is no callback for when the menu is deactivated. I could be wrong,
but I don't think this is quite as sensitive?
2025-01-01 14:41:20 +02:00
Cameron Cawley 35138892c2 GRAPHICS: MACGUI: Use a const pointer for MacPatterns arrays 2024-11-26 00:32:00 +01:00
Torbjörn Andersson 97ced3166c SCUMM: MACGUI: Optimize Mac palette handling (bug #15492)
Previously, every palette change in a game get passed on to the Mac
Window Manager, which would then have to look up new colors for drawing
Mac GUI stuff. This was fine for some games, but later ones do a lot of
palette animations, which could slow things down.

Now the Mac Window Manager gets the new palette only when it's about to
draw the Mac menu, or when it's about to draw a dialog (since those can
be triggered outside of the menu).

Additionally, the Mac Window Manager now triggers the auto-opening of
the menu in the event handler, not in the drawing code. Otherwise the
menu would be drawn once before the SCUMM Mac GUI could notice that the
menu was visible, causing an ugly color glitch.
2024-11-20 11:39:25 +02:00
Cameron Cawley ff530edcb1 GRAPHICS: Deprecate ManagedSurface methods that implicitly copy pixel data 2024-07-02 13:31:18 +01:00
Matthew Jimenez 5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
Torbjörn Andersson 1bf0dbad75 GRAPHICS: MACGUI: Eliminate timer use
As part of fixing a graphical glitch in Mac Indiana Jones and the Last
Crusade, eliminate the menu timer from the Mac window manager. It's just
too unpredictable and error prone for my taste.
2024-03-10 23:12:25 +01:00
Eugene Sandulenko 7361c0f2fa GRAPHICS: MACGUI: Made readHex() more robust
This fixes crashes in Markdown with malformed translations
2024-01-05 01:04:08 +01:00
Torbjörn Andersson d4c9c7208f GRAPHICS: MACGUI: Avoid recursion in Mac menu event processing
When moving the mouse through the menu bar, over a part that's not
occupied by menu items, the Mac menu class will start calling
processEvent() recursively. This is bad for two reasons: During the
recursion (which can easily reach a depth of dozens or even hundreds of
calls) there is no delay, so it will use 100% CPU. And once the
recursion unwinds, all the delays will come at once.

This moves the call to eventLoop() to after the first event has been
fully processed. Hopefully that will have approximately the same desired
effect, without any of the bad side effects.
2023-12-16 21:14:59 +01:00
Matthew Duggan 0f795b481d GRAPHICS: MACGUI: Only set system palette if screen is CLUT8
This is needed to allow use of macgui components while 16-bit graphic games are
running, eg to display help screens.
2023-12-09 13:53:01 +11:00
Scott Percival 2c8d493984 GRAPHICS: MACGUI: Pass through key events even if window not editable
Active MacWindows should always be passed EVENT_KEYDOWN events by MacWindowManager.
Previously it would only do so if the mouse was in the vicinity.

Fixes text input on the savegame screen of Team Xtreme: Operation
Weather Disaster.
2023-12-02 02:47:40 +01:00
Scott Percival 7f5c07a738 MACGUI: Deactivate _lockedWidget when Window is removed
Fixes using the quit widget on the save screen of Team Xtreme: Operation
Weather Disaster.
2023-12-02 02:47:40 +01:00
Torbjörn Andersson b2568e05ce GRAPHICS: MACGUI: Attempt to fix threading issues
The menuTimerHandler() function is called from a timer, which means that
anything that it touches could potentially cause threading issues. I
suspect this is what's been causing the screen to go black for me a few
times, but it's not something I can reproduce at will. Add a mutex to
try and fix this.
2023-11-18 18:49:55 +01:00
Eugene Sandulenko 7e4c81e1ff GRAPHICS: MACGUI: Pass image extensions from Markdown to MacTextCanvas 2023-10-31 22:55:09 +01:00
Cameron Cawley 0a59113b43 GRAPHICS: Remove use of TransparentSurface in MacWindowManager 2023-10-24 20:16:34 +02:00
Eugene Sandulenko 5a706831c2 GRAPHICS: MACGUI: Pass Markdown tables to MacText 2023-09-25 23:30:38 +02:00
Eugene Sandulenko 152feb0f46 GRAPHICS: MACGUI: Properly pass link URLs from Markdown to MacText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko f53d39741d GRAPHICS: MACGUI: Added tag for switching font to MacText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko c668169636 GRAPHICS: MACGUI: Encode images into MacText from Markdown 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 03a758c3b1 GRAPHICS: MACGUI: Proper indentation of bullet lists in Markdown 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 2df991721d GRAPHICS: MACGUI: Added initial code for indentaiton in MacText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 5b00cc3f56 GRAPHICS: MACGUI: Implemented color on/off for MacText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko fd844bc00f GRAPHICS: MACGUI: Added kWMModeNoCursorOverride 2023-09-17 00:56:28 +02:00
Eugene Sandulenko a314def2cc GRAPHICS: MACGUI: Added Header formatting, synced with stripFormatting(), fixed closing formatting 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 32f7eec2c6 GRAPHICS: MACGUI: Remove using of \015 as a binary MacText formatting
It was not used, and moreover \015 is \x0d which is \r. oops
2023-09-17 00:56:28 +02:00
Wyatt Radkiewicz 41a942c5ce ALL: Renamed TS_ARGB to MS_ARGB 2023-08-13 00:22:10 +02:00
Harishankar Kumar a7e737b6e4 GRAPHICS: MACGUI: Implement background window
This patch adds background window, these are special type of window where
the window is always in background and in a multi-window environment, it
will prevent the window from being brought to front.
2023-08-02 18:42:24 +02:00
Harishankar Kumar 797803d515 GRAPHICS: MACGUI: Implement lockable widgets
Lockable widgets are those which takes in all input
and if set then no other widget can take any input
its same as them being inactive, no buttons, animations
etc will work.

This is implemented to support `modal` property of window,
which requires a window to take all input and prevent all
others from having any actions.
2023-06-01 20:17:23 +02:00
Harishankar Kumar 014712bbc5 GRAPHICS: Add menu by id and support custom menu
Adds new function addMenu/getMenu with menu id to add custom menus.

Used when implementing macpopupmenu which reuses macmenu for theapartment.
2023-05-28 13:50:18 +02:00
Roland van Laar 82142000c6 GRAPHICS: MACGUI: leave _desktopBmp as a nullptr
Make sure _desktopBmp can be checked to be a nullptr.
2022-09-20 23:19:08 +02:00
Roland van Laar c537cd9ca6 GRAPHICS: MACGUI: Fix memory leak
Clean up _desktopBmp before it's reallocated again.
2022-09-20 23:12:09 +02:00
Pragyansh Chaturvedi 842fe20c5e DIRECTOR: Modify decomposeColor to fix missing text in buttons in 32bpp mode 2022-09-09 02:21:47 +02:00
Le Philousophe 12df7f3767 GRAPHICS: Fix uint vs uint32 discrepancies 2022-08-22 13:09:45 +02:00
Avijeet efea402993 GRAPHICS: MACGUI: Don't consider right and bottom edges while drawing round rect 2022-08-05 20:15:03 +02:00
Eugene Sandulenko f67d9fb70c GRAPHICS: MACGUI: Fix regression in WM mode setting 2022-08-01 18:41:07 +02:00