Commit Graph

3142 Commits

Author SHA1 Message Date
Bastien Bouclet
dcfac42bb3 GUI: Remove alpha bitmap support
It was never used since its introduction 4 years ago
It was not updated to work with the clipping rect
2018-04-19 19:13:12 +02:00
Thierry Crozat
5df28d6049 I18N: Regenerate translations data file 2018-04-16 05:05:06 +02:00
Thierry Crozat
f525174495 I18N: Regenerate translations data file 2018-04-09 05:05:05 +02:00
Cameron Cawley
a873544840 DS: Fix building with AGI engine disabled 2018-04-07 09:30:07 +02:00
Thierry Crozat
766574e03e I18N: Regenerate translations data file 2018-04-02 05:05:02 +02:00
Eugene Sandulenko
b0affe5bf2 GUI: Added override specifiers 2018-03-28 12:47:23 +02:00
Eugene Sandulenko
283f7485e3 GUI: Added override clauses 2018-03-28 12:28:12 +02:00
Thierry Crozat
f198c16f45 I18N: Regenerate translations data file 2018-03-26 05:05:06 +02:00
Thierry Crozat
68596bed8e I18N: Regenerate translations data file 2018-03-19 05:05:04 +01:00
Bastien Bouclet
4d0bb753e4 GUI: Remove the ThemeItem draw queues
Drawing nows happens directly when the Dialog or Widget draw methods are
called. This makes it easy to debug why a particular low level draw
method was called, by inspecting the call stack.

This replaces the notion of "buffering" by two independant ways to
control what is drawn and where:
- The active layer is used to select whether the foreground or
  background part of the dialogs are rendered by the draw calls.
- The active surface is used to select if the draw calls affect the back
  buffer or the screen.

The foreground layer of the active dialog is drawn directly to the
screen. Its background layer is drawn to the back buffer. This way
widgets can restore the back buffer in order to update without having to
redraw the dialog's background.

Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-03-12 11:46:04 +01:00
Thierry Crozat
7b2523a78b I18N: Regenerate translations data file 2018-03-12 05:05:05 +01:00
Thierry Crozat
9dbffa1763 I18N: Regenerate translations data file 2018-02-05 05:05:08 +01:00
Thierry Crozat
fa28602abf I18N: Regenerate translations data file 2018-01-29 05:05:05 +01:00
Bastien Bouclet
21552fb4e6 GUI: Remove the parent from the button_idle DrawData
Removing it does not result in any visible difference. It was likeliy
set by mistake.
2018-01-27 18:16:08 +01:00
Bastien Bouclet
7dc602f352 GUI: Fix the caret drawing over the scroll bar in the list widget
Also remove the unused linesWidth variable and fix the hlLeftPadding and
hlRightPadding widget attributes to actually work.

There are still issues remaining with the caret in the list widget due
to the ellipsis being used to shorten long text. Ellipsis is accounted
for when drawing the text but not when computing the caret position.
2018-01-27 18:12:53 +01:00
Bastien Bouclet
5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 2018-01-27 18:12:34 +01:00
Bastien Bouclet
fc37918130 GUI: Remove explicit redraw when scrolling the ScrollContainer
The redraw is already handled by the GUI main loop
2018-01-27 18:12:34 +01:00
Bastien Bouclet
0496ede62f GUI: Implement dirty-checking for widget redraws 2018-01-27 18:12:34 +01:00
Bastien Bouclet
3b50b57f54 GUI: Rework the frame limiter to actually reach the target framerate
The previous combination of a fixed 10 milliseconds delay and time since
last update checks meant that in most cases 20 milliseconds elapsed
between two calls to updateScreen resulting in a 50 fps framerate. On
systems with wait for vsync enabled that meant that some frames were
missed.

The new frame limiter waits for a variable delay equal to the non
consumed time in the slot allocated to the frame.
2018-01-27 18:12:34 +01:00
rsn8887
e6add01d72 GUI: never enable checkbox if GUI_ONLY_FULLSCREEN is set 2018-01-13 15:21:51 -06:00
Eugene Sandulenko
d6078ea406 ALL: Bump copyright year. 2018! 2018-01-01 00:09:56 +01:00
Bastien Bouclet
ee4ff8ca08 SDL: Cleanup joystick deadzone handling 2017-12-26 21:11:04 +01:00
Thierry Crozat
ee1da05d0b I18N: Regenerate translations data file 2017-12-25 05:05:04 +01:00
Thierry Crozat
a912979778 I18N: Regenerate translations data file 2017-12-11 05:05:01 +01:00
Thierry Crozat
71ff55ee65 I18N: Regenerate translations data file 2017-12-04 05:05:02 +01:00
Colin Snover
d087c9605f BASE: Remove bad casts between incompatible Plugin types
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.

Closes gh-1051.
2017-12-03 20:26:38 -06:00
D G Turner
afdcde4b54 GUI: Fix Signed vs. Unsigned Comparison GCC Compiler Warning. 2017-11-27 11:39:58 +00:00
Thierry Crozat
1232a3cb01 I18N: Regenerate translations data file 2017-11-27 05:05:07 +01:00
Thierry Crozat
469e75cb64 GUI: Fix incorrect SaveLoad dialog state after updating the save list
Updating the list reset the selection in the list widget, however if
a save had previously been selected and the Choose button was enabled,
it remained enabled despite no save being selected. Trying to load
the game resulted in a crash. This was particularly an issue with
cloud enabled as if you are unlucky you could have tried to load a
save just as the cloud sync finished, which updated the list and
unselected the save. This change fixes bug #9766: Assert in
SaveLoadChooser dialog.

In addition to adding a sanity check on the selected index for the
Choose command, this commit also preserves the selection when
updating the list as I think this would be the expected behaviour
in this dialog.
2017-11-24 22:44:41 +00:00
Bastien Bouclet
5ed745f532
Merge pull request #1063 from bgK/keyboard-repeat
SDL2: Improve handling of keyboard repeat events
2017-11-24 19:37:58 +01:00
Cameron Cawley
0c222d95d6 CREDITS: Add credits for RISC OS port
Closes gh-1068.
2017-11-21 14:51:14 -06:00
Thierry Crozat
d34a97451f I18N: Regenerate translations data file 2017-11-20 05:05:04 +01:00
Bastien Bouclet
8beb519c5e EVENTS: Rename synthetic to kbdRepeat 2017-11-19 16:12:50 +01:00
Thierry Crozat
63b90d13e4 I18N: Regenerate translations data file 2017-11-13 05:05:08 +01:00
Colin Snover
51329c0dc6 ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
Thierry Crozat
18b8a8cd78 I18N: Regenerate translations data file 2017-11-06 05:05:04 +01:00
Thierry Crozat
f638f1453c I18N: Regenerate translations data file 2017-10-23 05:05:03 +02:00
Thierry Crozat
2e96e4d3df I18N: Regenerate translations data file 2017-10-16 05:05:02 +02:00
Eugene Sandulenko
fb30dd4362 GUI: Cleanup 2017-10-15 20:55:31 +02:00
Eugene Sandulenko
c71633de77 GUI: UPDATES: Redesign updates dialog as suggested by criezy in PR#1040 2017-10-15 15:53:57 +02:00
Willem Jan Palenstijn
7198dd0596 GUI: Fix memory leak with empty debugger input 2017-09-29 18:15:49 +02:00
Willem Jan Palenstijn
078e3b43be GUI: Fix crash after empty debugger command 2017-09-29 18:11:10 +02:00
Paul Gilbert
47f6c2e9b9 Merge pull request #1010 from dreammaster/debugger_params
GUI: Support double quoted debugger parameters
2017-09-24 12:18:15 -04:00
Thierry Crozat
1d4e2c67fa I18N: Regenerate translations data file 2017-09-18 05:05:09 +02:00
Colin Snover
eb4e9fe1d4 GUI: Remove mostly-broken audio output sample rate control
Removing this GUI control was suggested as far back as 2011 at
<http://lists.scummvm.org/pipermail/scummvm-devel/2011-November/010416.html>.
There were no objections, but it was never removed. When working
on audio latency bugs, I independently rediscovered that the GUI
option was broken: the per-game options would *never* work, and the
option would not take effect until ScummVM was restarted because
there is no API for interacting with the backend audio mixer. So
now, it is finally gone.

Primarily for the sake of future troubleshooting, configurability
of the audio sample frequency within SdlMixerManager is maintained
for the moment, but now users will need to edit their ScummVM
configuration file manually to change it.
2017-09-12 11:27:45 -05:00
Colin Snover
96d87a821f GUI: Fix non-macOS/iOS builds 2017-09-10 22:35:02 -05:00
Colin Snover
3c5440add7 CREATE_PROJECT: Move browser_osx.mm hack to Xcode generator
c19c10d548 fixed the bad parsing of
module.mk which meant the Xcode generator broke. For the moment,
just move the hack for browser_osx.mm into the generator, until
there is a more elegant solution to this problem (if ever).
2017-09-10 22:17:14 -05:00
Thierry Crozat
400ff0459c I18N: Regenerate translations data file 2017-09-11 05:05:08 +02:00
Colin Snover
b5e801379f DEBUGGER: Flush stdout after debugger writes with USE_TEXT_CONSOLE_FOR_DEBUGGER
stdout may be buffered, in which case debugger messages are
delayed until a newline is written. The same kinds of calls to
OSystem::logMessage are flushed, so this just seems to be a simple
omission on this non-default code branch.
2017-09-08 16:02:32 -05:00
Paul Gilbert
0b9b3e336a GUI: Remove code that closes debugger if # or ~ keys are pressed 2017-09-05 19:36:47 -04:00
Paul Gilbert
54ec788541 GUI: Update comment for strdup call 2017-09-05 19:35:08 -04:00
Paul Gilbert
67090d3cda GUI: Add support for double quoted parameters in debugger 2017-09-04 10:04:26 -04:00
Bastien Bouclet
a46d126e73 CREDITS: Add Titanic 2017-09-02 16:38:31 +02:00
Thierry Crozat
3de1fd1f3e I18N: Regenerate translations data file 2017-08-14 05:05:05 +02:00
Thierry Crozat
e7b103c6a0 I18N: Regenerate translations data file 2017-08-07 05:05:02 +02:00
Bastien Bouclet
f5b335af10 GUI: Mark some fall-through cases as intentional
Comments explain how the num lock handling works before the
fall-through cases.
2017-08-06 17:55:33 +02:00
Torbjörn Andersson
665f5c99b2 JANITORIAL: Silence some more GCC 7 fall through warnings
I think these are the last one that were already flagged as being
deliberate.
2017-08-06 16:54:38 +02:00
Thierry Crozat
cb3191a57a I18N: Regenerate translations data file 2017-07-31 05:05:09 +02:00
Thierry Crozat
a421962b38 OSX: Make sure the native file browser runs in the main thread 2017-07-26 23:31:24 +01:00
Thierry Crozat
4981b4bbef OSX: Make sure to release the NSOpenPanel immediately after closing it
This is an attempt to fix a difficult to reproduce issue where the NSOpenPanel
remains open in the background and locks the application. Some tests suggest
that it might fix the issue, but only time will tell.
2017-07-26 23:08:48 +01:00
Thierry Crozat
6162cd1c19 OSX: Set focus back to the ScummVM window when closing the native file browser 2017-07-26 23:08:39 +01:00
Thierry Crozat
b8c2f26098 OSX: Clear pending events when closing the native file browser
This is to avoid dispatching to ScummVM events that were intended for
the NSOpenPanel dialog.
2017-07-26 21:50:32 +01:00
Thierry Crozat
41398761ba I18N: Regenerate translations data file 2017-07-17 05:05:02 +02:00
Eugene Sandulenko
940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat
eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Thierry Crozat
afc0ac65c9 I18N: Regenerate translations data file 2017-07-10 05:05:08 +02:00
Thierry Crozat
db0728970c I18N: Regenerate translations data file 2017-06-26 05:05:03 +02:00
Thierry Crozat
3213c426a5 GUI: Separate bevel and shadow effect when extending widget rect
When widget::draw() is called it asks the ThemeEngine to redraw the background
first and then the widget gets redrawn in drawWidget(). The ThemeEngine uses
an extended rect to restore the background to include bevel and shadow effects.
However if this extended rect overlaps with other widgets, since those other
widgets are not redrawn, a part of those will be missing. See for example
bug #6394: GUI: List View save page drawns over font.

In case we get overlap we might need to change the way widgets are drawn so
that all widgets intersecting the area where the backgroud is restored are
redrawn. This commit simply seperate the bevel and shadow effects, and uses
the shadow offset only to extend the bottom and right sides of the rectangle
(while the bevel offset is still used to extend all four sides). This
results in a smaller extended rectangle (if the shadow offset is bigger than
the bevel offset, which is the case of the list view) and thus decrease the
risk of the issue happening. The particular cases described in bug #6394
are all fixed with this change.
2017-06-20 19:36:56 +01:00
Thierry Crozat
64c82e7e0e I18N: Regenerate translations data file 2017-06-19 05:05:03 +02:00
Bastien Bouclet
9bb9c0d58e GUI: Focus the first 'focusable' widget when rebuilding dialogs
Fixes Trac#9838.
2017-06-13 07:21:34 +02:00
Tarek Soliman
2977ae546e GUI: Improve calculation for savegame thumbnail labels
Instead of shrinking the rect based on how many labels aren't there,
expand the rect based on how many labels are there.

Closes gh-958
2017-06-09 13:17:09 -05:00
Tarek Soliman
7de8be411d GUI: Fix savegame thumbnail label layout
The Save/Load screen has a preview area with labels for date and time.
The bottom label was drawing past the bottom of the rect.
2017-06-09 13:17:09 -05:00
Tarek Soliman
231c263f70 GUI: Use dashes in default save description
Closes gh-956
2017-06-09 13:16:46 -05:00
Thierry Crozat
a614638747 I18N: Regenerate translations data file 2017-05-29 05:05:06 +02:00
Thierry Crozat
8983a82741 I18N: Regenerate translations data file 2017-05-22 05:05:03 +02:00
Thierry Crozat
5c31db0594 I18N: Regenerate translations data file 2017-05-15 05:05:08 +02:00
Thierry Crozat
dba9ef4fa4 I18N: Regenerate translations data file 2017-05-01 05:05:08 +02:00
Thierry Crozat
e0539dd0e5 I18N: Regenerate translations data file 2017-04-24 05:05:10 +02:00
Thierry Crozat
571f608192 I18N: Regenerate translations data file 2017-04-17 05:05:09 +02:00
Thierry Crozat
82540e6363 I18N: Regenerate translations data file 2017-04-10 05:05:14 +02:00
Thierry Crozat
05bd770ea9 Merge pull request #921 from Joefish/PR_9711
GUI: Restore previous settings if GUI cannot be rendered
2017-04-09 21:09:10 +01:00
Joseph-Eugene Winzer
7ff4641d5d GUI: Restore settings if GUI cannot be rendered
PR#921 changes the behavior of the client that if the GUI fails to be
rendered the previously applied settings in the misc category are
restored. Error messages were altered according to the changes.

Bug: #9717 GUI: Indirectly changing 'GUI Language' can produce
                inconsistent behaviour when changing some options.
2017-04-06 23:08:28 +02:00
Thierry Crozat
78561ca94d GUI: Fix access to deleted widget after rebuilding a dialog
The issue was with the focus or mouse widget as it may not be a
direct child of the dialog (it may for example be a child of the tab
widget in the options dialog) and removing a widget was not
resetting the mouse of focus widget if that widget was not a
direct child.
2017-04-06 21:55:28 +01:00
Thierry Crozat
91125bcbcd GUI: Add method to know if a widget contains a given widget 2017-04-06 21:55:28 +01:00
Thierry Crozat
2dac196370 I18N: Regenerate translations data file 2017-04-03 05:05:09 +02:00
Thierry Crozat
8054869161 CREDITS: Add credits for Lab 2017-03-29 23:38:08 +01:00
Thierry Crozat
11fda24477 CREDITS: Add snover as contributor for the SCI engine 2017-03-29 23:24:16 +01:00
Thierry Crozat
de1a1ee7b3 CREDITS: Move access engine credits to its proper place 2017-03-29 23:10:10 +01:00
Thierry Crozat
8d3b84ae1c CREDITS: Add credits for Fullpipe 2017-03-29 23:05:55 +01:00
Thierry Crozat
c36a945449 CREDITS: Add credits for ADL engine 2017-03-29 22:00:49 +01:00
Peter Kohaut
d7080148c3 BLADERUNNER: Added credits for Blade Runner 2017-03-25 23:51:35 +01:00
D G Turner
7843e12cad GUI: Fix GCC Warnings. 2017-03-20 11:11:54 +00:00
Bastien Bouclet
4ca6f58264 GUI: Fix a signed vs unsigned comparison warning 2017-03-18 16:17:10 +01:00
rsn8887
ef992f26bb PSP2: Add credits for Vita port 2017-03-14 19:02:40 -05:00
Eugene Sandulenko
121cb80696 JANITORIAL: Remove trailing spaces 2017-03-13 08:59:22 +01:00
Eugene Sandulenko
1ffb661853 GUI: Fix warnings 2017-03-13 08:59:10 +01:00
Thierry Crozat
a9d60aeb99 I18N: Regenerate translations data file 2017-03-13 05:05:07 +01:00
Thierry Crozat
1a874f9c07 GUI: Delay deletion of child widgets when rebuilding launcher and options dialog
This is to avoid writing in deleted memory in the ButtonWidget::sendCommand
when the sent command results in the parent dialog being rebuilt.
2017-03-10 02:05:27 +00:00
Thierry Crozat
cc75d17e9c GUI: Allow delayed deletion of GuiObject
This is achieved by adding a list of GuiObject to delete to GuiManager
and doing the deletion in GuiManager::runLoop.

The main purpose of this is to avoid the deletion of ButtonWidget object
while their ButtonWidget::sendCommand function is being called. For
example the sendCommand of the Apply button of the OptionsDialog
may cause a rebuild (if the GUI language was changed) which tries to
delete the widgets inside the OptionsDialog, including the Apply button.
2017-03-10 02:02:58 +00:00
Joseph-Eugene Winzer
f39412fcec GUI: Fix Theme Label in Options->Misc
The theme label in the Misc tab will not change to the correct theme
when current language and theme is changed and 'apply' pressed.
loadNewTheme() does not do a rebuild of all widgets, including the
theme label, like it is explicitly done in the 'language section'.
The problem is that rebuild() uses the currently applied settings to
rebuild all widgets. Although a new theme was selected by the user the
label will be overwritten with the name of the still active theme.

By rearranging the logic a complete rebuild of the GUI is done and
updates the widgets correctly.
2017-03-09 04:26:20 +01:00