Commit Graph
204 Commits
Author SHA1 Message Date
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
Eugene Sandulenko 8b17ee5272 GRAPHICS: MACGUI: Properly load desktop tile if requested 2022-07-19 23:46:57 +02:00
Eugene Sandulenko 8ee1fcbcb8 GRAPHICS: MACGUI: Implemented debug method for printing WM mode 2022-07-19 23:46:57 +02:00
Eugene Sandulenko dc2883e4cf GRAPHICS: MACGUI: Do not double free desktop image 2022-07-19 20:43:12 +02:00
Eugene Sandulenko 463dddfa2e GRAPHICS: MACGUI: Do not load desktop background multiple times and fix setMode() 2022-07-19 20:38:39 +02:00
Pragyansh Chaturvedi 5c17fe70b8 JANITORIAL: Fix conventions and reimplement MacFontManager::rectifyId() 2022-07-17 13:04:14 +02:00
Eugene Sandulenko 3515dc79eb GRAPHICS: MACGUI: Switch to wider Rect primitives for now
We need to eliminate their usage but that requires more testing
2022-07-13 23:23:03 +02:00
Eugene Sandulenko d37a01fd2c GRAPHICS: MACGUI: Fix rendering for 32bpp mode 2022-07-04 01:36:18 +02:00
Eugene Sandulenko 4649680c9b GRAPHICS: MACGUI: Switch color lookup to Graphics::PaletteLookup 2022-07-03 12:50:06 +02:00
Pragyansh Chaturvedi (r41k0u) d5485c7595 DIRECTOR: LINGO: Fix MacMenu::getName() to implement STUB kTheMenu 2022-06-22 00:55:14 +02:00
Pragyansh Chaturvedi (r41k0u) f83934e05b DIRECTOR: LINGO: Implement MENUREF Datum type and STUB for Menu, Menus, MenuItem and MenuItems [WIP] 2022-06-22 00:55:14 +02:00
Eugene Sandulenko 83f66c6eb0 GRAPHICS: MACGUI: Fixed pattern origin calculation 2022-06-17 01:07:14 +02:00
Misty De Meo 8558276dd9 DIRECTOR: additional RearWindow methods 2022-03-22 12:27:13 +01:00
Misty De Meo c2daf29bb2 DIRECTOR: implement RearWindow methods 2022-03-21 11:44:32 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Martin Gerhardy 1287dce313 MACGUI: whitespace issues 2021-09-19 15:21:56 +02:00
DivyamAhuja 04a2a1f87c MACGUI: Fix code formatting according to coding conventions 2021-09-19 15:21:56 +02:00
DivyamAhuja bf46669cf8 MACGUI: Add methods to find top window at at a given point 2021-09-19 15:21:56 +02:00
ysj1173886760 4133592992 GRAPHICS: MACGUI: add cache for inverted color. 2021-08-16 16:58:48 +08:00
ysj1173886760 50bfc4e521 GRAPHICS: MACGUI: implement global color inverter. 2021-08-16 16:54:00 +08:00