[Scummvm-git-logs] scummvm master -> 43227706504b87753fef27f1a53911ed8c7b78fb

eriktorbjorn noreply at scummvm.org
Mon Mar 28 09:51:28 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d057880f92 GUI: Fix unpressed state of checkboxes and radio buttons
4322770650 AGS: Hopefully fix build


Commit: d057880f9217866247f0f944d8bf7c20cb8b088a
    https://github.com/scummvm/scummvm/commit/d057880f9217866247f0f944d8bf7c20cb8b088a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-03-28T11:16:50+02:00

Commit Message:
GUI: Fix unpressed state of checkboxes and radio buttons

Clicking on a checkbox (and, presumably, a radio button) would leave it
in the "pressed" state, which would inhibit tooltips for it. Now the
unpressed state is cleared along with _duringPress for both these
classes. There are other widgets that inherit from ButtonWidget, but
they either already did this, or didn't override handleMouseUp(), so
they should be fine.

Changed paths:
    gui/widget.cpp


diff --git a/gui/widget.cpp b/gui/widget.cpp
index 1c43dd15850..35d77aa28c1 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -691,6 +691,7 @@ void CheckboxWidget::handleMouseUp(int x, int y, int button, int clickCount) {
 	if (isEnabled() && _duringPress && x >= 0 && x < _w && y >= 0 && y < _h) {
 		toggleState();
 	}
+	setUnpressedState();
 	_duringPress = false;
 }
 
@@ -757,6 +758,7 @@ void RadiobuttonWidget::handleMouseUp(int x, int y, int button, int clickCount)
 	if (isEnabled() && _duringPress && x >= 0 && x < _w && y >= 0 && y < _h) {
 		toggleState();
 	}
+	setUnpressedState();
 	_duringPress = false;
 }
 


Commit: 43227706504b87753fef27f1a53911ed8c7b78fb
    https://github.com/scummvm/scummvm/commit/43227706504b87753fef27f1a53911ed8c7b78fb
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-03-28T11:48:53+02:00

Commit Message:
AGS: Hopefully fix build

We have to include scummsys.h before checking if USE_FREETYPE2 is
defined, and we need wchar.h for the wcslen() function. But I don't know
for certain if everything - or even anything - works correctly now.

Changed paths:
    engines/ags/lib/alfont/alfont.cpp


diff --git a/engines/ags/lib/alfont/alfont.cpp b/engines/ags/lib/alfont/alfont.cpp
index 0346e3d03e1..6ffd22794d5 100644
--- a/engines/ags/lib/alfont/alfont.cpp
+++ b/engines/ags/lib/alfont/alfont.cpp
@@ -19,16 +19,18 @@
  *
  */
 
-#ifdef USE_FREETYPE2
-
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 #include "common/scummsys.h"
+
+#ifdef USE_FREETYPE2
+
 #include "ags/lib/alfont/alfont.h"
 #include "ags/lib/allegro/color.h"
 #include "ags/lib/allegro/draw.h"
 #include "ags/lib/allegro/gfx.h"
 #include "ags/lib/allegro/unicode.h"
 #include <ft2build.h>
+#include <wchar.h>
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
 




More information about the Scummvm-git-logs mailing list