Commit Graph
4026 Commits
Author SHA1 Message Date
antoniou79 e128d69748 GUI: Don't draw invisible thumbnail obstucting selection in Load Save dialogue
This fix is particular to the Load Save ScummVM dialogue where the issue is observed

A more general fix is proposed in PR https://github.com/scummvm/scummvm/pull/3080.
2021-06-26 16:44:23 +03:00
Fiodar 1db270c4cd GUI: Fix warnings for header search failure
WARNING: Can't find following headers in User or System Include Paths "scrollbar.h"
2021-06-26 08:44:55 +03:00
Cameron Cawley b2d41daabc GUI: Add improved scaler selection to the Options dialog 2021-06-23 21:29:53 +02:00
Martin Gerhardy c7463600c1 GUI: fixed endless recursion in EventRecorder::pollEvent
warpMouse is calling purgeMouseEvents - which in turn calls pollEvents again

with this fix I was able to perform a small playback of twine in the menu
2021-06-21 20:56:01 +02:00
Martin Gerhardy 6bb711d037 GUI: removed unused prototype from EventRecorder class 2021-06-21 20:50:34 +02:00
antoniou79 ae5277f942 GUI: Update domain name for backendOptions upon renaming Game id
Without this, the ports using backendOptions Widget could error trying to access the domain with the old name

For example, the Android port, upon editing and renaming the Game Id, would error with a message like "E/ScummVM: ConfigManager::removeKey(onscreen_control, bladerunner-final-win) called on non-existent domain". This is because in its AndroidOptionsWidget::save() method (called within OptionsDialog::apply()), there were calls to removeKey() which internally was using the stale/old _domain (domain name before the renaming)
2021-06-20 22:50:12 +03:00
Le Philousophe aa9cbdc6ab GUI: Fix invalid rect when list width goes too small 2021-06-20 13:33:38 +02:00
Le Philousophe e62e9e84d5 GUI: Don't draw text when the rect planned for it is too small
Rect is not valid anymore and we get assertion failures
2021-06-20 11:48:19 +02:00
antoniou79 da461da6f6 GUI: Fix tooltip behavior to be less interruptive
The tooltip will show only if mouse cursor was moved but not on a hovered focused editText field

Changes and implications in this commit:
- Fix _lastMousePosition coordinates and time being updated upon giving focus to the tooltip
- Check for mouse cursor movement first in the decision for showing the tooltip, then check if sufficient time for mouse resting position has passed (kTooltipDelay).
- Prevents showing a tooltip for a widget if it is an editable field (editText) and has both mouse hovering above it and the current focus.
This is so that typing text is not interrupted / slowed down by a periodical display of the tooltip, if the mouse is hovering over the same text field that the user is editing.
- If mouse cursor is moved but lands on the same widget as the one that had its tooltip shown last, then show the tooltip but after a different (larger) delay kTooltipSameWidgetDelay.
- Still shows tooltip for other widgets, including editText ones, if the mouse is hovered over them and they are not the current focused editText widget.

The bug was mentioned for the Android port on the forums here:
https://forums.scummvm.org/viewtopic.php?p=95531#p95531
However, it is not Android specific, even though the slowdown is a lot more noticeable on an Android device.
2021-06-19 14:39:34 +02:00
Martin Gerhardy 3ddce1cf3a EVENTRECORDER: relax the out-of-sync check
this might happen if you have EventSource instances registered, that
are querying the millis by themselves, too. If the EventRecorder::poll
is registered and thus dispatched after those EventSource instances, it
might look like it ran out-of-sync.
2021-06-19 14:34:52 +02:00
Martin Gerhardy adc2671449 COMMON: fixed endless loop in recordings with only one screenshot
the stream was read after its end and the err() state wasn't checked properly
2021-06-19 14:34:52 +02:00
Martin Gerhardy 5af1192580 BACKENDS: fixed segfault in EventRecorder with buffer out of bounds writes
==3124361== Invalid write of size 8
==3124361==    at 0x483F803: memmove (vg_replace_strmem.c:1270)
==3124361==    by 0x4DBF61: SurfaceSdlGraphicsManager::grabOverlay(void*, int) const (surfacesdl-graphics.cpp:1753)
==3124361==    by 0x482051: ModularGraphicsBackend::grabOverlay(void*, int) (modular-backend.cpp:215)
==3124361==    by 0x434EE1: GUI::ThemeEngine::clearAll() (ThemeEngine.cpp:376)
==3124361==    by 0x40128E: GUI::EventRecorder::preDrawOverlayGui() (EventRecorder.cpp:558)
==3124361==    by 0x481DB2: ModularGraphicsBackend::updateScreen() (modular-backend.cpp:173)
==3124361==    by 0x559967: Graphics::Screen::updateScreen() (screen.cpp:62)
==3124361==    by 0x55991C: Graphics::Screen::update() (screen.cpp:56)
==3124361==    by 0x38AFC7: TwinE::TwineScreen::update() (twine.cpp:126)
==3124361==    by 0x3B8759: TwinE::Screens::adjustPalette(unsigned char, unsigned char, unsigned char, unsigned int const*, int) (screens.cpp:150)
==3124361==    by 0x3B8A89: TwinE::Screens::fadeToPal(unsigned int const*) (screens.cpp:207)
==3124361==    by 0x3B8403: TwinE::Screens::loadImage(int, int, bool) (screens.cpp:80)
==3124361==  Address 0x31453050 is 16 bytes after a block of size 512,000 alloc'd
==3124361==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3124361==    by 0x55B38C: Graphics::Surface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (surface.cpp:75)
==3124361==    by 0x551111: Graphics::ManagedSurface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (managed_surface.cpp:153)
==3124361==    by 0x4352D5: GUI::ThemeEngine::setGraphicsMode(GUI::ThemeEngine::GraphicsMode) (ThemeEngine.cpp:453)
==3124361==    by 0x434A52: GUI::ThemeEngine::init() (ThemeEngine.cpp:324)
==3124361==    by 0x43501B: GUI::ThemeEngine::refresh() (ThemeEngine.cpp:394)
==3124361==    by 0x405780: GUI::GuiManager::screenChange() (gui-manager.cpp:603)
==3124361==    by 0x405C6B: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:677)
==3124361==    by 0x404EBA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
==3124361==    by 0x3FD847: GUI::Dialog::runModal() (dialog.cpp:77)
==3124361==    by 0x36D747: launcherDialog() (main.cpp:106)
==3124361==    by 0x36FF92: scummvm_main (main.cpp:552)

It looks like the _videoMode.overlayHeight in SurfaceSdlGraphicsManager::grabOverlay and ThemeEngine::_backBuffer::h are somehow out of sync after
starting the game in a different resolution as the gui was started with. So the overlayHeight is updated - but the backbuffer (Surface) is not resized.

This is with event recorder being active - right after starting the game and switching the resolution.
2021-06-19 14:34:52 +02:00
Martin Gerhardy eccf343fcb GUI: removed superfluous break in EventRecorder 2021-06-19 14:34:52 +02:00
sluicebox f2f28c4549 COMMON: Rename DebugManager methods, update comments 2021-06-14 12:42:38 -05:00
sluicebox 90f836a342 GUI: Revert clearing debug flags on save/load dialog
Fixes clearing all debug flags set on the command line
whenever the ScummVM save/load dialog is displayed from
within a game.

This reverts commit 1c4e15599f
2021-06-10 10:43:22 -06:00
lb_ii 7d0a96818d GUI: Mark var as const 2021-06-10 01:56:23 +03:00
lb_ii a59108911d GUI: Use AchMan to get achievements descriptions 2021-06-10 01:56:23 +03:00
SupSuper 455cdff8df CREDITS: Add Trecision engine 2021-06-09 12:20:52 +01:00
lb_ii 080b8dad89 GUI: Remove mistakenly used _("string") 2021-06-02 01:21:37 +03:00
lb_ii d7afb6408a GUI: Fix minor issues for code review 2021-06-01 02:20:53 +03:00
lb_ii 4bea32377e GUI: Remove unused code at achievements controls 2021-06-01 02:20:53 +03:00
lb_ii 3ea4faeab7 GUI: Add Statistics dialog to game options 2021-06-01 02:20:53 +03:00
sluicebox aac1eb12bf GUI: Add delete/backspace support to save/load list
- SaveLoadChooserSimple responds to kListItemRemovalRequestCmd
- ListWidget::scrollToCurrent() only scrolls when there is a
  current selected item
2021-05-28 23:15:04 +03:00
lb_ii 4d582218a9 GUI: Use simple achievements API 2021-05-28 21:07:08 +03:00
ysj1173886760 7a0d9546ce GUI: move kDebugLevelEventRec flag to global flag 2021-05-22 01:34:57 +02:00
ysj1173886760 1c4e15599f GUI: Register debug channels before run saveload-dialog 2021-05-22 01:34:57 +02:00
Lothar Serra Mari 0b89bc6438 I18N: Update translation datafile 2021-05-19 22:17:28 +02:00
Alex Bevilacqua 5d10fae9ca ASYLUM: update credits 2021-05-18 21:17:38 +03:00
Alex Bevilacqua 8eeed61c30 ASYLUM: generate credits 2021-05-18 21:17:38 +03:00
Cameron Cawley 03b9943ec0 Revert "GUI: Convert the cursor bitmap to the overlay format"
This reverts commit 26dc725ed2.
2021-05-15 00:20:00 +01:00
Cameron Cawley 26dc725ed2 GUI: Convert the cursor bitmap to the overlay format 2021-05-14 22:37:24 +02:00
a/ bad9008a89 DETECTOR: Modify getFileProperties to cache md5 results 2021-05-14 22:35:23 +02:00
a/ 45aa165b80 Modify getFileProperties to cache md5 results 2021-05-14 22:35:23 +02:00
Eugene Sandulenko faefa38c66 TESTBED: Fix GUI for HiDPI 2021-05-14 20:01:09 +02:00
Mathias Parnaudeau 032d030060 GUI: Fix leak of ManagedSurface in PicButtonWidget
Opening the load dialog, to display thumbnails into PicButtonWidget objects,
a call to setGfx creates a temporary ManagedSurface from a Surface but is
not instantiated, so not freed.

Same fix applied in GraphicsWidget which code is the same and reported
as potential memory leak by clang-tidy.
2021-05-12 10:40:56 +02:00
Torbjörn Andersson 73f43cdcb3 GUI: Fix build when USE_TTS is undefined 2021-05-03 16:47:30 +02:00
Martin Gerhardy 9d82fa51df COMMON: removed USE_TTS check from engines
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
2021-05-03 14:13:41 +03:00
Cameron Cawley 0aa8aea4f7 GUI: Remove default mappings for the EE action 2021-05-01 21:06:18 +01:00
Eugene Sandulenko 12f107af67 GUI: Gracefully process broken images 2021-05-01 01:49:47 +02:00
Eugene Sandulenko eda31b9498 GUI: Initialized more variables 2021-05-01 01:49:47 +02:00
Eugene Sandulenko ad50a1471a GUI: Initialize class variables 2021-05-01 01:49:47 +02:00
Eugene Sandulenko 798a76ec56 DISTS: Added 2 MS-like fonts from wine to our fonts 2021-05-01 01:49:47 +02:00
Eugene Sandulenko 473a312b0e GUI: Fixing another corner case in mass add 2021-04-29 13:12:16 +02:00
Eugene Sandulenko cf84166316 GUI: Fix assert in GUI during MasAdd
If there is an entry without language specified, this would lead
to an assert. Yet another consequences of HashMap rewrite. Sigh.
2021-04-28 00:41:35 +02:00
SupSuper b3fd7c524d GUI: Recalculate tab variables consistently 2021-04-24 21:10:00 +01:00
Thierry Crozat 32c9ed7102 GUI: Do not list temporary targets in the launcher
When starting a game from the command line for a target that had
not previously been added, a temporary target is created. When
subsequently returning to the launcher, it would attempt to
include that temporary target in list of games (and crash when
trying to get the path with an unknown key error as those
temporary targets do not have a path value set, which is actually
how I noticed the issue).
2021-04-22 02:07:23 +01:00
Thierry Crozat 97f8a4e42e GUI: Fix getEditRect and implify rect handling in EditTextWidget
The same rect was hardcoded in three different places. Now it is
only in getEditRect and the other places use getEditRect.

There were actually differences between the rect width, but I put
that down to a bug in getEditRect. I see no reason to define the
right position of the rect as w - 2 - right_padding - left_padding.
Substracting the left padding would make sense if we were
specifying the rect width, but the Common:Rect constructor takes
the rect right location and not the width. There might have been
a confusion on that point by the developer who wrote that code
years ago. Also has the bottom right point is excluded, we should
only remove 1 and not 2.

This width that was smaller than it should be might have been the
reason why 6 additional pixels were arbitrarily added to the rect
passed to setTextDrawableArea later on.

There were actually
2021-04-22 01:40:12 +01:00
Thierry Crozat ba0dabd5ca GUI: Fix position of character after caret
There was a discrepency in the vertical position of the text in
the drawText call on one hand, and in the getEditRect() and rect
passed to setTextDrawableArea() on the other. This discrepency
was introduced in commit c47b204ac. Since getEditRect() is used
in EditableWidget::drawCaret() to draw the character after the
caret (when erasing the caret) this caused this vertical shift.

This fixes bug #12336.
2021-04-22 01:40:12 +01:00
Eugene Sandulenko 27c6566097 GUI: Draw border for tooltip in the remastered theme. Bugreport #10935 2021-04-20 23:04:05 +02:00
Eugene Sandulenko c84a78b778 GUI: Make Tooltip padding configurable and scalable 2021-04-20 19:03:09 +02:00