aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Brown <themagnificentmrb@gmail.com>2023-01-24 16:37:09 -0800
committerGarrett Brown <themagnificentmrb@gmail.com>2023-01-29 16:25:10 -0800
commit6a748fa1370f59f05874ea9fde8916e69cd6ec0d (patch)
tree214e34285b9b05918e534a05bb4d1a170b941ed2
parentd993f796b3116b266a46532e783d45d4fbe25bec (diff)
Game OSD: Fix conflicting IDs when other dialogs are visible
The game OSD uses window IDs in the range 108XX, so prefix game-osd-specific control IDs with "108". This is needed when the YesNo Dialog is shown over the game OSD, because the YesNo dialog's "OK" button ID is 11. When the "OK" button is focused, our game thumbnail is erroneously focused too.
-rw-r--r--addons/skin.estuary/xml/Includes_DialogSelect.xml18
-rw-r--r--xbmc/games/dialogs/osd/DialogGameSaves.cpp2
-rw-r--r--xbmc/games/dialogs/osd/DialogGameVideoSelect.cpp9
3 files changed, 16 insertions, 13 deletions
diff --git a/addons/skin.estuary/xml/Includes_DialogSelect.xml b/addons/skin.estuary/xml/Includes_DialogSelect.xml
index 3d0daeaf36..772789cf37 100644
--- a/addons/skin.estuary/xml/Includes_DialogSelect.xml
+++ b/addons/skin.estuary/xml/Includes_DialogSelect.xml
@@ -346,7 +346,7 @@
<param name="label" value="$LOCALIZE[222]" />
</include>
</control>
- <control type="label" id="12">
+ <control type="label" id="10812">
<description>Caption area</description>
<left>14</left>
<right>14</right>
@@ -380,7 +380,7 @@
<animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
<texture colordiffuse="E6FFFFFF">dialogs/dialog-bg-nobo.png</texture>
</control>
- <control type="panel" id="11">
+ <control type="panel" id="10811">
<top>30</top>
<scrolltime tween="sine">200</scrolltime>
<orientation>horizontal</orientation>
@@ -448,12 +448,12 @@
<width>444</width>
<height>250</height>
<texture border="8" colordiffuse="button_focus">buttons/thumbnail_focused.png</texture>
- <visible>Control.HasFocus(11)</visible>
+ <visible>Control.HasFocus(10811)</visible>
</control>
</control>
</focusedlayout>
</control>
- <control type="textbox" id="12">
+ <control type="textbox" id="10812">
<description>Description Area</description>
<top>410</top>
<left>100</left>
@@ -486,7 +486,7 @@
<animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
<texture colordiffuse="E6FFFFFF">dialogs/dialog-bg-nobo.png</texture>
</control>
- <control type="panel" id="11">
+ <control type="panel" id="10811">
<top>30</top>
<scrolltime tween="sine">200</scrolltime>
<orientation>horizontal</orientation>
@@ -554,7 +554,7 @@
<width>444</width>
<height>250</height>
<texture border="8" colordiffuse="button_focus">buttons/thumbnail_focused.png</texture>
- <visible>Control.HasFocus(11)</visible>
+ <visible>Control.HasFocus(10811)</visible>
</control>
</control>
</focusedlayout>
@@ -581,7 +581,7 @@
<animation effect="fade" start="100" end="0" time="300">WindowClose</animation>
<texture colordiffuse="E6FFFFFF">dialogs/dialog-bg-nobo.png</texture>
</control>
- <control type="panel" id="11">
+ <control type="panel" id="10811">
<top>30</top>
<scrolltime tween="sine">200</scrolltime>
<orientation>horizontal</orientation>
@@ -635,12 +635,12 @@
<width>444</width>
<height>250</height>
<texture border="8" colordiffuse="button_focus">buttons/thumbnail_focused.png</texture>
- <visible>Control.HasFocus(11)</visible>
+ <visible>Control.HasFocus(10811)</visible>
</control>
</control>
</focusedlayout>
</control>
- <control type="textbox" id="12">
+ <control type="textbox" id="10812">
<description>Description Area</description>
<top>410</top>
<left>100</left>
diff --git a/xbmc/games/dialogs/osd/DialogGameSaves.cpp b/xbmc/games/dialogs/osd/DialogGameSaves.cpp
index cf66220472..abba78775e 100644
--- a/xbmc/games/dialogs/osd/DialogGameSaves.cpp
+++ b/xbmc/games/dialogs/osd/DialogGameSaves.cpp
@@ -32,7 +32,7 @@ using namespace GAME;
namespace
{
constexpr int CONTROL_DETAILED_LIST = 6;
-constexpr int CONTROL_DESCRIPTION = 12;
+constexpr int CONTROL_DESCRIPTION = 10812;
} // namespace
CDialogGameSaves::CDialogGameSaves() : CGUIDialogSelect(WINDOW_DIALOG_GAME_SAVES)
diff --git a/xbmc/games/dialogs/osd/DialogGameVideoSelect.cpp b/xbmc/games/dialogs/osd/DialogGameVideoSelect.cpp
index 8a23bd50c0..77204d7f27 100644
--- a/xbmc/games/dialogs/osd/DialogGameVideoSelect.cpp
+++ b/xbmc/games/dialogs/osd/DialogGameVideoSelect.cpp
@@ -28,9 +28,12 @@
using namespace KODI;
using namespace GAME;
-#define CONTROL_HEADING 1
-#define CONTROL_THUMBS 11
-#define CONTROL_DESCRIPTION 12
+namespace
+{
+constexpr unsigned int CONTROL_HEADING = 1;
+constexpr unsigned int CONTROL_THUMBS = 10811;
+constexpr unsigned int CONTROL_DESCRIPTION = 10812;
+} // namespace
CDialogGameVideoSelect::CDialogGameVideoSelect(int windowId)
: CGUIDialog(windowId, "DialogSelect.xml"),