Commit graph

1148 commits

Author SHA1 Message Date
AndywinXp
49ae002d6b GRAPHICS: MACGUI: Fix green borders in upper right and upper left corners of Mac menu bar
It probably went unnoticed until now because the menu bar is
mostly used for black and white games, and in those instances
the green color is converted to black.

Tested with Indy3, Loom, The Apartment, Spaceship Warlock,
and several WAGE games.
2023-12-01 21:08:04 +01:00
Eugene Sandulenko
63c8367ace
GRAPHICS: MACGUI: Indicate presence of a table in debug output in MacTextCanvas 2023-11-25 19:46:40 -08:00
Eugene Sandulenko
92b03145a2
GRAPHICS: MACGUI: Disable MacText with tables resizing
The problem is more complex than it appears, so, disabling this
before the release, because the current code is removing
tables on resize
2023-11-24 19:48:24 +01:00
Eugene Sandulenko
446908f458
GRAPHICS: MACGUI: Fix crash on reshuffling text after table in Markdown
Array::insert_at() is calling destructor for old data, whuch was freeing
the _table pointer that we are copying to new element which led to
use-after-free.

This moves MacTextLine cleanup to MacTextCanvas.
2023-11-23 00:13:33 +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
AndywinXp
2efd9ab70a GRAPHICS: MACGUI: Add kWMModeForceMacBorder mode
This allows for having the Mac desktop arc even during Win95 mode.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson
d63ad4c2e3 GRAPHICS: MACGUI: Don't filter keypresses in processMenuShortCut()
This is already done in keyEvent(), which is the only place where
processMenuShortCut() is called. This allows using Alt-<key> as
shortcut, which is consistent with how the Mac emulators I've tried does
it.
2023-11-18 18:47:39 +01:00
Torbjörn Andersson
0e76018a10 GRAPHICS: MACGUI: Handle menu shortcuts even when menus are hidden 2023-11-18 18:47:39 +01:00
Torbjörn Andersson
1b3e863801 GRAPHICS: MACGUI: Consider menu item font when calculating menu width
Mac Loom and Last Crusade use bold for their "About" menu item, and that
made the menu too narrow.
2023-11-18 18:47:39 +01:00
Eugene Sandulenko
ff0abf2b69
GRAPHICS: MACGUI: Fix crashes when dealing with empty MacTexts 2023-11-16 00:23:09 +01:00
Eugene Sandulenko
035fd6085b
GRAPHICS: MACGUI: Added more debug output to MacTextCanvas 2023-11-04 07:31:35 +01:00
Eugene Sandulenko
7eac71a4c7
GRAPHICS: MACGUI: Fixed computation of image sizes in pixels in MacTextCanvas 2023-11-01 00:27:34 +01:00
Eugene Sandulenko
175bf5c001
GRAPHICS: MACGUI: Use image extensiosn for calculating image dimensions in MacTextCanvas 2023-11-01 00:16:00 +01:00
Eugene Sandulenko
ddadee5daf
GRAPHICS: MACGUI: Copy defaultFormatting to MacTextCanvas 2023-10-31 23:16:13 +01:00
Eugene Sandulenko
fc00188eeb
GRAPHICS: MACGUI: Parse image extension string into a fixed format 2023-10-31 22:55:14 +01:00
Eugene Sandulenko
7e4c81e1ff
GRAPHICS: MACGUI: Pass image extensions from Markdown to MacTextCanvas 2023-10-31 22:55:09 +01:00
Eugene Sandulenko
6683a75954
COMMON: FORMATS: Pass image extensions to the user callbacks in Markdown 2023-10-31 01:58:55 +01:00
Eugene Sandulenko
4afcad492a
GRAPHICS: MACGUI: Fixed numbered list indentation in MacTextCanvas 2023-10-31 01:02:19 +01:00
Eugene Sandulenko
2dbfef826d
GRAPHICS: MACGUI: Added more debug output to MacTextCanvas 2023-10-31 01:01:38 +01:00
Eugene Sandulenko
d4cea997f8
GRAPHICS: MACGUI: Hid noisy debug output in table rendering 2023-10-30 01:25:41 +01:00
Eugene Sandulenko
85ea0aa22e
GRAPHICS: MACGUI: Wrap MaxTexCanvas table cell contents 2023-10-30 01:22:30 +01:00
Eugene Sandulenko
ad5fe9f2bc
GRAPHICS: MACGUI: Factored out MacTextCanvas::setMaxWidth() 2023-10-30 01:14:29 +01:00
Eugene Sandulenko
3d237bccf1
GRAPHCS: MACGUI: Made MacText::setMaxWidth() use reshuffleParagraph()
This preserves all formatting
2023-10-30 01:08:40 +01:00
Eugene Sandulenko
526c116bbe
GRAPHICS: MACGUI: Break infinite loop triggered in some cases
Triggered in wage:afm on attempt to go to the shop
2023-10-30 00:40:21 +01:00
Eugene Sandulenko
0652a4c246
GRAPHICS: MACGUI: Do not add extra line at end of the text when splitting MacText 2023-10-30 00:33:47 +01:00
Eugene Sandulenko
ca299d7ae1
GRAPHICS: MACGUI: Fix MacTexCanvas rendereing debug output 2023-10-30 00:28:05 +01:00
D G Turner
e851067c97 GRAPHICS: MACGUI: Fix Signed vs. Unsigned GCC Compiler Warning 2023-10-27 23:25:00 +01:00
Eugene Sandulenko
46e5e44da2
GRAPHICS: MACGUI: Hide MacTextCanvas debug output under compile-time macros 2023-10-27 02:30:28 +02:00
Eugene Sandulenko
867ec92bde
GRAPHICS: MACGUI: Removed superfluous warning 2023-10-27 01:14:52 +02:00
Eugene Sandulenko
2180be6b71
GRAPHICS: MACGUI: Restore paragraph mark after reshuffling 2023-10-27 01:14:25 +02:00
Eugene Sandulenko
1b99e013a7
GRAPHICS: MACGUI: Hid debug messages deeper 2023-10-27 01:11:59 +02:00
Eugene Sandulenko
ed8da34fff
GRAPHICS: MACGUI: Remove leftover variable 2023-10-26 03:54:56 +02:00
Eugene Sandulenko
83a4a6002a
GRAPHICS: MACGUI: Fix text reshuffling in MacTextCanvas 2023-10-26 03:39:49 +02:00
Eugene Sandulenko
58f05eeb24
GRAPHICS: MACGUI: Added more debug output to MacTextCanvas 2023-10-26 03:39:49 +02:00
Eugene Sandulenko
33c2fcfbf2
GRAPHCIS: MACGUI: Added debug printing methods to MacTextCanvas 2023-10-26 03:39:49 +02:00
Eugene Sandulenko
68e6f3a8ef
GRAPHICS: MACGUI: Rewrote reshuffleParagraph() in MacTextCanvas to use chunks 2023-10-26 03:39:49 +02:00
Cameron Cawley
0a59113b43 GRAPHICS: Remove use of TransparentSurface in MacWindowManager 2023-10-24 20:16:34 +02:00
Cameron Cawley
6ee5aad258 GRAPHICS: Remove use of TransparentSurface in NinePatch code 2023-10-24 20:16:34 +02:00
Eugene Sandulenko
67ab2657d8
GRAPHICS: MACGUI: Split out MacTextCanvas into a separate file 2023-10-24 02:38:17 +02:00
Eugene Sandulenko
37deafe413
GRAPHICS: MACGUI: Moved more methods to MacTextCanvas 2023-10-24 02:38:17 +02:00
Eugene Sandulenko
4e614216b2
GRAPHICS: MACGUI: Add equality test for MacFontRun 2023-10-24 02:38:14 +02:00
Scott Percival
e44f40318e GRAPHICS: MACGUI: Fix MacText::getMouseWord()/getMouseItem()
Fixes the text entry puzzles in Wrath of the Gods.
2023-10-22 17:19:54 +02:00
Scott Percival
52fb94307c GRAPHICS: MACGUI: Add guardrails for MacWindow::updateInnerDims() 2023-10-22 17:19:54 +02:00
Eugene Sandulenko
d47d26547b
GRAPHICS: MACGUI: Reduced code duplication in MacText constructors 2023-10-22 09:18:32 -06:00
Eugene Sandulenko
0d40edb121
GRAPHICS: MACGUI: Renamed _bgcolor to _tbgcolor to avoid clashes with MacWidget 2023-10-19 22:28:37 -06:00
Eugene Sandulenko
9ee23562fd
GRAPHICS: MACGUI: Fix tail chunks in MacText 2023-10-19 22:28:37 -06:00
Eugene Sandulenko
4f15a3817a
GRAPHICS: MACGUI: Added more debug output to MacText rendering 2023-10-19 22:28:37 -06:00
Eugene Sandulenko
825fcda83c
GRAPHICS: MACGUI: Fix table parsing in MacText 2023-10-19 22:28:37 -06:00
Eugene Sandulenko
b859f7d013
GRAPHICS: MACGUI: Refactored more methods into MacTextCanvas 2023-10-19 22:28:37 -06:00
D G Turner
7ed7882640 GRAPHICS: MACGUI: Fix Signed vs. Unsigned GCC Compiler Warning 2023-10-15 19:13:07 +01:00