Commit graph

170 commits

Author SHA1 Message Date
Le Philousophe
ec06b9db8d GRAPHICS: MACGUI: Don't check if top menu is enabled in popup menus
Popup menus don't have a top menu and _activeItem is always -1.
2025-01-11 13:02:00 +01:00
Torbjörn Andersson
c64c763fd2 GRAPHICS: MACGUI: Don't expand disabled submenus 2025-01-08 20:00:45 +02:00
Torbjörn Andersson
f489b45282 GRAPHICS: MACGUI: Draw submenu arrow correctly on disabled menu items 2025-01-08 20:00:45 +02:00
Torbjörn Andersson
67da94f031 GRAPHICS: MACGUI: Disable keyboard shortcuts for disabled menus 2025-01-08 20:00:45 +02:00
Torbjörn Andersson
796719cd05 GRAPHICS: MACGUI: Allow menus in the menu bar to be drawn disabled
Disabled menus can still be opened. Menu items in disabled menus will
look and act as if they were individually disabled. Enabling the menu
will restore it to its pre-disabled state.
2025-01-08 20:00:45 +02:00
Cameron Cawley
027c9bddca GRAPHICS: Add drawRoundRect to Graphics::Surface 2025-01-06 01:35:05 +02:00
Torbjörn Andersson
c4c1d64d9f GRAPHICS: MACGUI: Allow menus to grow a bit wider
It's needed to avoid the Apple menu in the Day of the Tentacle Demo from
becoming truncated.
2025-01-02 18:00:50 +01:00
Cameron Cawley
8d9614ccd5 GRAPHICS: MACGUI: Extend the font ID enum 2024-12-09 23:24:23 +02:00
Cameron Cawley
58a9aa6a2c COMMON: Deprecate U32String constructors that accept a uint32 array 2024-11-29 01:14:36 +02:00
Eugene Sandulenko
56565c65e7
GRAPHICS: MACGUI: Fix regression after ManagedSurface usage changes 2024-10-25 23:12:53 +02:00
Eugene Sandulenko
c191ea24fa
GRAPHICS: MACGUI: Fix usage of deprecated ManagedSurface methods 2024-10-24 15:07:01 +02:00
Scott Percival
e1f2418c17
GRAPHICS: MACGUI: Fix MacMenu to support 32-bit graphics 2024-06-18 18:24:08 +08:00
D G Turner
3dcd3e6fa6 GRAPHICS: MACGUI: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings 2024-03-30 16:40:22 +00:00
Krish
34ecd753ad GRAPHICS: MACGUI: Implement submenu scrolling 2024-03-27 15:34:34 +01:00
polyesterswing
9626012752 MACGUI: Fill in the upper-left and upper-right corners with black 2024-03-04 19:16:22 +01:00
polyesterswing
a6b0d088c2 Revert "GRAPHICS: MACGUI: Fix green borders in upper right and upper left corners of Mac menu bar"
This reverts commit 49ae002d6b.

The changes in this commit prevents windows in macventure from
displaying
2024-03-04 19:16:22 +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
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
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
Harishankar Kumar
e12d3053cc GRAPHICS: Implement macpopupmenu while reusing macmenu
Added functions for menu drawing/selections, this uses the base functions of macmenu to implement mac-styled popupmenu's, also return selected item index/text.

Used by 'Popup Menu' in theapartment: With this changes the popupmenu is working with both item selectors, doesn't implement the icon selector.
2023-05-28 13:50:18 +02:00
Harishankar Kumar
5bb6e06624 GRAPHICS: Expose internal macmenu structs for reusing in popmenu
Exposed MacMenuItem, MacMenuSubMenu, MacMenuItem and MacMenuData to headers and changed visibility of needed functions to protected.

These structs and functions is used in popupmenu for reusing macmenu code.
2023-05-28 13:50:18 +02:00
Eugene Sandulenko
70b1a4432a
GRAPHICS: MACGUI: Use proper check symbol in MacMenu 2023-05-28 12:54:06 +02:00
Misty De Meo
ce61aa9b9b GRAPHICS: MACGUI: remove unused variable 2023-05-14 12:04:58 +03:00
Cameron Cawley
28d7b361ea COMMON: Move more file format code into common/formats 2022-12-11 22:33:23 +01:00
Eugene Sandulenko
62f067a72c
MACGUI: Fix incorrect logical operator usage. PVS-Studio V564 2022-10-27 23:27:44 +02:00
Le Philousophe
5774811be8 GRAPHICS: Don't dereference a null pointer 2022-09-18 16:15:56 +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
Avijeet
94efaeb278 GRAPHICS: MACGUI: Draw SubMenu over copy of game screen 2022-08-05 20:15:03 +02:00
Avijeet
77810fed70 GRAPHICS: MACGUI: Limit submenu width to 200 2022-07-31 18:33:22 +02:00
Avijeet
154bcf414a GRAPHICS: MACGUI: Enable all menus in win95 mode 2022-07-31 18:33:22 +02:00
Avijeet
5e5dd3f399 GRAPHICS: MACGUI: Fix signed/unsigned mismatch 2022-07-31 18:33:22 +02:00
Avijeet
c031566369 GRAPHICS: MACGUI: Add removeMenuItem 2022-07-31 18:33:22 +02:00
Avijeet
82688d5fb5 GRAPHICS: MACGUI: Add insertMenuItem 2022-07-31 18:33:22 +02:00
Avijeet
cd985e2a7f GRAPHICS: MACGUI: Add flag to enforce mac font in win95 mode 2022-07-31 18:33:22 +02:00
Avijeet
fae3232d89 GRAPHICS: MACGUI: Don't trigger event for click on menuitem with submenu 2022-07-31 18:33:22 +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
Pragyansh Chaturvedi
fb6497a059 DIRECTOR: Fix constrainH fail build step in BUILDBOT by adding _constraint check 2022-07-02 23:58:15 +02:00
Pragyansh Chaturvedi
1ec5304e8a DIRECTOR: Fix buildbot failure on null macmenu 2022-07-02 23:58:15 +02:00
Avijeet
44f19d74be COMMON: MACGUI: Fix transparency artifacts in subMenu 2022-06-28 23:36:29 +02:00
D G Turner
5d0e6e7bb5 GRAPHICS: MACGUI: Remove Invalid Check of this against NULL
The object's self reference of "this" can never be null, thus this
generates a GCC compiler warning when -Wnonnull-compare is passed.
2022-06-22 01:38:51 +01:00
Pragyansh Chaturvedi (r41k0u)
9fa3ec41f0 DIRECTOR: LINGO: Implement MENUREF in LC::c_theentityassign() and check for nullptr 2022-06-22 00:55:14 +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
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
ysj1173886760
c4f7848084 GRAPHICS: MACGUI: fix createSubMenuFromString. 2021-08-09 16:51:25 +08:00
Thierry Crozat
bb98ce92f2 MACGUI: Explicitly use ellipsis to draw text when needed
This is the default, so this commit does not change the behaviour.
But this will allow to change the default at a later stage.
2021-08-01 17:22:13 +02:00
ysj1173886760
99447ca832 GRAPHICS: MACGUI: implement getting member of menuItem 2021-07-30 15:43:00 +08:00