From d580d2be9aba6a54e9c9acf18c48d4e371763040 Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Tue, 13 Dec 2022 22:53:03 +0100 Subject: [PATCH] RMG-Input: add Z-Trigger to the svg & hook it up to ControllerImageWidget --- .../UserInterface/Resource/Controller.svg | 49 ++++++++++++++--- .../Resource/Controller_NoAnalogStick.svg | 52 +++++++++++++++---- .../RMG-Input/UserInterface/UIResources.qrc | 1 + .../Widget/ControllerImageWidget.cpp | 1 + .../UserInterface/Widget/ControllerWidget.cpp | 1 + 5 files changed, 89 insertions(+), 15 deletions(-) diff --git a/Source/RMG-Input/UserInterface/Resource/Controller.svg b/Source/RMG-Input/UserInterface/Resource/Controller.svg index 785f735c..ef64309f 100644 --- a/Source/RMG-Input/UserInterface/Resource/Controller.svg +++ b/Source/RMG-Input/UserInterface/Resource/Controller.svg @@ -8,7 +8,7 @@ style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" id="svg21" sodipodi:docname="Controller.svg" - inkscape:version="1.1 (c68e22c387, 2021-05-23)" + inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" @@ -23,15 +23,17 @@ inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" showgrid="false" - inkscape:zoom="0.28240146" - inkscape:cx="-426.69751" - inkscape:cy="3454.3023" + inkscape:zoom="0.070600365" + inkscape:cx="6019.7989" + inkscape:cy="1600.5583" inkscape:window-width="1920" inkscape:window-height="1017" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" - inkscape:current-layer="svg21" /> + inkscape:current-layer="layer2" + inkscape:showpageshadow="2" + inkscape:deskcolor="#d1d1d1" /> - + diff --git a/Source/RMG-Input/UserInterface/Resource/Controller_NoAnalogStick.svg b/Source/RMG-Input/UserInterface/Resource/Controller_NoAnalogStick.svg index 8db6cff9..dfebcca6 100644 --- a/Source/RMG-Input/UserInterface/Resource/Controller_NoAnalogStick.svg +++ b/Source/RMG-Input/UserInterface/Resource/Controller_NoAnalogStick.svg @@ -8,7 +8,7 @@ style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" id="svg21" sodipodi:docname="Controller_NoAnalogStick.svg" - inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)" + inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" @@ -23,15 +23,17 @@ inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" showgrid="false" - inkscape:zoom="0.14120073" - inkscape:cx="2549.5619" - inkscape:cy="3325.0536" + inkscape:zoom="0.099843994" + inkscape:cx="2829.4141" + inkscape:cy="3475.4219" inkscape:window-width="1920" - inkscape:window-height="1007" - inkscape:window-x="0" - inkscape:window-y="0" + inkscape:window-height="1017" + inkscape:window-x="-8" + inkscape:window-y="-8" inkscape:window-maximized="1" - inkscape:current-layer="svg21" /> + inkscape:current-layer="svg21" + inkscape:showpageshadow="2" + inkscape:deskcolor="#d1d1d1" /> - + diff --git a/Source/RMG-Input/UserInterface/UIResources.qrc b/Source/RMG-Input/UserInterface/UIResources.qrc index 5a7366da..9d124c4a 100644 --- a/Source/RMG-Input/UserInterface/UIResources.qrc +++ b/Source/RMG-Input/UserInterface/UIResources.qrc @@ -15,6 +15,7 @@ Resource/Controller_Pressed_Start.svg Resource/Controller_Pressed_LeftTrigger.svg Resource/Controller_Pressed_RightTrigger.svg + Resource/Controller_Pressed_ZTrigger.svg Resource/RMG.png Resource/Info.ico diff --git a/Source/RMG-Input/UserInterface/Widget/ControllerImageWidget.cpp b/Source/RMG-Input/UserInterface/Widget/ControllerImageWidget.cpp index 48d00acf..1655f4be 100644 --- a/Source/RMG-Input/UserInterface/Widget/ControllerImageWidget.cpp +++ b/Source/RMG-Input/UserInterface/Widget/ControllerImageWidget.cpp @@ -125,6 +125,7 @@ void ControllerImageWidget::paintEvent(QPaintEvent *event) { N64ControllerButton::CButtonRight, ":Resource/Controller_Pressed_CButtonRight.svg" }, { N64ControllerButton::LeftTrigger, ":Resource/Controller_Pressed_LeftTrigger.svg" }, { N64ControllerButton::RightTrigger, ":Resource/Controller_Pressed_RightTrigger.svg" }, + { N64ControllerButton::ZTrigger, ":Resource/Controller_Pressed_ZTrigger.svg" } }; static const QString baseImageUri = ":Resource/Controller_NoAnalogStick.svg"; diff --git a/Source/RMG-Input/UserInterface/Widget/ControllerWidget.cpp b/Source/RMG-Input/UserInterface/Widget/ControllerWidget.cpp index 3bfc2137..7f45a111 100644 --- a/Source/RMG-Input/UserInterface/Widget/ControllerWidget.cpp +++ b/Source/RMG-Input/UserInterface/Widget/ControllerWidget.cpp @@ -58,6 +58,7 @@ ControllerWidget::ControllerWidget(QWidget* parent, EventFilter* eventFilter) : { N64ControllerButton::CButtonRight, this->cbuttonRightButton }, { N64ControllerButton::LeftTrigger, this->leftTriggerButton }, { N64ControllerButton::RightTrigger, this->rightTriggerButton }, + { N64ControllerButton::ZTrigger, this->zTriggerButton } }); this->joystickWidgetMappings.append(