Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
✨ First full working version of Game Options (#1023)
Browse files Browse the repository at this point in the history
  • Loading branch information
SerhatG authored May 15, 2024
1 parent 61ac446 commit 71a25d8
Show file tree
Hide file tree
Showing 7 changed files with 217 additions and 33 deletions.
14 changes: 14 additions & 0 deletions 1080i/Custom_1151_GameOptions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog" id="1151">
<defaultcontrol always="true">9000</defaultcontrol>
<controls>
<include content="Object_Options_Menu">
<param name="header" value="$LOCALIZE[5]" />
<param name="grouplist_items" value="Items_Settings_GameOptions" />
<param name="isbuttonmenu" value="true" />
<param name="isfocused" value="true" />
<param name="action_include" value="Action_OptionsMenu_ButtonMenu" />
<param name="has_background_overlay">false</param>
</include>
</controls>
</window>
62 changes: 57 additions & 5 deletions 1080i/DialogSelect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<defaultcontrol>3</defaultcontrol>
<onunload>ClearProperty(DialogSelectType,Home)</onunload>
<controls>
<include content="Object_Options_Menu" condition="String.IsEqual(Window(Home).Property(DialogSelectType),Menu) + String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive))">
<include content="Object_Options_Menu" condition="String.IsEqual(Window(Home).Property(DialogSelectType),Menu) + String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive)) + !Window.IsActive(gamevideofilter) + !Window.IsActive(gamestretchmode) + !Window.IsActive(gamevideorotation) + !Window.IsActive(gamesaves) + !Window.IsActive(ingamesaves)">
<param name="id" value="3" />
<param name="header" value="$INFO[Control.GetLabel(1)]" />
<param name="usegrouplist" value="false" />
Expand All @@ -19,8 +19,9 @@
</include>
</include>

<include condition="String.IsEmpty(Window(Home).Property(DialogSelectType))">Object_Overlay</include>
<include content="Dialog_Background" condition="String.IsEmpty(Window(Home).Property(DialogSelectType)) + String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive))">
<!-- Skip overlay for the gamevideo settings, as we want to see the effect of the option we're choosing next to the dialog -->
<include condition="String.IsEmpty(Window(Home).Property(DialogSelectType)) + !Window.IsActive(gamevideofilter) + !Window.IsActive(gamestretchmode) + !Window.IsActive(gamevideorotation) + !Window.IsActive(gamesaves) + !Window.IsActive(ingamesaves)">Object_Overlay</include>
<include content="Dialog_Background" condition="String.IsEmpty(Window(Home).Property(DialogSelectType)) + String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive)) + !Window.IsActive(gamevideofilter) + !Window.IsActive(gamestretchmode) + !Window.IsActive(gamevideorotation) + !Window.IsActive(gamesaves) + !Window.IsActive(ingamesaves)">
<include>Animation_SlideIn_Dialog</include>
<include>Dimension_DialogSelect</include>
<include content="Object_Control" condition="Window.IsVisible(script-skinshortcuts.xml)">
Expand Down Expand Up @@ -123,8 +124,7 @@
</include>
</include>


<include content="Dialog_Background" condition="!String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive))">
<include content="Dialog_Background" condition="!String.IsEmpty(Window(Home).Property(SkinViewtypes.DialogIsActive)) + !Window.IsActive(gamevideofilter) + !Window.IsActive(gamestretchmode) + !Window.IsActive(gamevideorotation) + !Window.IsActive(gamesaves) + !Window.IsActive(ingamesaves)">
<include>Animation_SlideIn_Dialog</include>
<centerleft>50%</centerleft>
<width>1702</width>
Expand Down Expand Up @@ -178,5 +178,57 @@
</include>
</control>
</include>

<include content="Dialog_Background" condition="Window.IsActive(gamevideofilter) | Window.IsActive(gamestretchmode) | Window.IsActive(gamevideorotation) | Window.IsActive(gamesaves) | Window.IsActive(ingamesaves)">
<include>Animation_SlideIn_Dialog</include>
<include>Dimension_DialogSelectGame</include>

<include content="Dialog_Nib">
<param name="use_side_nib">False</param>
</include>
<include content="Object_MenuHeader">
<param name="label" value="$LOCALIZE[5]" />
</include>

<include content="Dialog_Group">
<top>120</top>
<control type="group">
<control type="group">
<include content="List_DialogSelect">
<param name="id" value="3" />
<param name="itemlayout_include">Layout_GameVideoFilterOrView</param>
<param name="item_height">grid_x12</param>
<left>-grid_x04</left>
<right>-grid_x04</right>
<pagecontrol>61</pagecontrol>
<onright>61</onright>
</include>
<include content="List_DialogSelect">
<param name="id" value="6" />
<param name="detailed" value="True" />
<param name="item_height" value="grid_x16" />
<left>-grid_x04</left>
<right>-grid_x04</right>
<pagecontrol>62</pagecontrol>
<onright>62</onright>
</include>
<include content="List_DialogSelect">
<param name="id" value="10811" />
<param name="itemlayout_include">Layout_GameVideoFilterOrView</param>
<param name="item_height">grid_x12</param>
<left>-grid_x04</left>
<right>-grid_x04</right>
<pagecontrol>61</pagecontrol>
<onright>61</onright>
<preloaditems>0</preloaditems>
</include>
<include content="Dialog_Scrollbar">
<onleft>10811</onleft>
<visible>Control.IsVisible(10811)</visible>
</include>
</control>
</control>
</include>
</include>
</controls>
</window>
4 changes: 2 additions & 2 deletions 1080i/GameOSD.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<window type="dialog">
<defaultcontrol always="true">9000</defaultcontrol>
<controls>

<include content="Object_Options_Menu">
<param name="header" value="$LOCALIZE[31390]" />
<param name="grouplist_items" value="Items_GameOSD_Settings" />
<param name="isbuttonmenu" value="true" />
<param name="isfocused" value="true" />
<param name="action_include" value="Action_OptionsMenu_ButtonMenu" />
<param name="has_background_overlay">false</param>
</include>

</controls>
</window>
7 changes: 7 additions & 0 deletions 1080i/Includes_Dimensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@
<centertop>dialog_tall_centertop</centertop>
</include>

<include name="Dimension_DialogSelectGame">
<right>grid_x04</right>
<width>680</width>
<top>160</top>
<height>800</height>
</include>

<include name="Dimension_DialogSkinShortcuts_FullscreenWidget">
<centerleft>50%</centerleft>
<width>1080</width>
Expand Down
67 changes: 42 additions & 25 deletions 1080i/Includes_Items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2457,61 +2457,78 @@
</include>
</include>

<include name="Items_GameOSD_Settings">
<include content="Dialog_Settings_Button" description="Pause / Resume button">
<param name="id" value="101" />
<param name="control" value="button" />
<label>$LOCALIZE[35224]</label>
<onclick>Play</onclick>
</include>
<include content="Dialog_Settings_Button" description="Reset button">
<param name="id" value="102" />
<param name="control" value="button" />
<label>$LOCALIZE[13007]</label>
<onclick>PlayerControl(Reset)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Stop button">
<param name="id" value="103" />
<param name="control" value="button" />
<label>$LOCALIZE[35222]</label>
<onclick>Stop</onclick>
</include>
<include name="Items_Settings_GameOptions">
<include content="Dialog_Settings_Button" description="Game Video Filter button">
<param name="id" value="104" />
<param name="id" value="106" />
<param name="control" value="button" />
<label>$LOCALIZE[35225]</label>
<onclick>ActivateWindow(GameVideoFilter)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Game Stretch Mode button">
<param name="id" value="105" />
<param name="id" value="107" />
<param name="control" value="button" />
<label>$LOCALIZE[35233]</label>
<onclick>ActivateWindow(GameStretchMode)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Game Video Rotation button">
<param name="id" value="106" />
<param name="id" value="108" />
<param name="control" value="button" />
<label>$LOCALIZE[35227]</label>
<onclick>ActivateWindow(GameVideoRotation)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Game Volume button">
<param name="id" value="107" />
<param name="id" value="109" />
<param name="control" value="button" />
<label>$LOCALIZE[13376]</label>
<label2>$LOCALIZE[31389]</label2>
<onclick>ActivateWindow(GameVolume)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Game Controllers button">
<param name="id" value="109" />
<param name="id" value="110" />
<param name="control" value="button" />
<label>$LOCALIZE[35234]</label>
<onclick>ActivateWindow(GameControllers)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Game Advanced Settings button">
<param name="id" value="110" />
<param name="id" value="111" />
<param name="control" value="button" />
<label>$LOCALIZE[35226]</label>
<onclick>ActivateWindow(GameAdvancedSettings)</onclick>
</include>
</include>

<include name="Items_GameOSD_Settings">
<include content="Dialog_Settings_Button" description="Pause / Resume button">
<param name="id" value="101" />
<param name="control" value="button" />
<label>$LOCALIZE[35224]</label>
<label2>$LOCALIZE[31387]</label2>
<onclick>Play</onclick>
</include>
<include content="Dialog_Settings_Button" description="Save / load">
<param name="id" value="102" />
<param name="control" value="button" />
<label>$LOCALIZE[35249]</label>
<onclick>ActivateWindow(InGameSaves)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Reset button">
<param name="id" value="103" />
<param name="control" value="button" />
<label>$LOCALIZE[13007]</label>
<onclick>PlayerControl(Reset)</onclick>
</include>
<include content="Dialog_Settings_Button" description="Stop button">
<param name="id" value="104" />
<param name="control" value="button" />
<label>$LOCALIZE[35222]</label>
<label2>$LOCALIZE[31388]</label2>
<onclick>Stop</onclick>
</include>
<include content="Dialog_Settings_Button" description="Game options">
<param name="id" value="105" />
<param name="control" value="button" />
<label>$LOCALIZE[5]</label>
<onclick>ActivateWindow(1151)</onclick>
</include>
</include>
</includes>
76 changes: 75 additions & 1 deletion 1080i/Includes_Layouts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2226,4 +2226,78 @@
</control>
</definition>
</include>
</includes>

<include name="Layout_GameVideoFilterOrView">
<param name="detailed">false</param>
<param name="selected">false</param>
<param name="misc">ListItem.IsSelected</param>
<definition>
<include content="Object_Control" condition="$PARAM[selected]">
<param name="control">image</param>
<include>Texture_Highlight</include>
</include>
<control type="group">
<left>40</left>
<top>20</top>
<bottom>20</bottom>
<width>100</width>
<include content="Object_Control" condition="Window.IsVisible(ingamesaves) | Window.IsVisible(gamesaves)">
<param name="control">image</param>
<aspectratio>scale</aspectratio>
<texture border="4">$INFO[ListItem.Icon]</texture>
<bordersize>4</bordersize>
</include>
<include content="Object_Control" condition="Window.IsVisible(ingamesaves) | Window.IsVisible(gamesaves)">
<param name="control">image</param>
<aspectratio>scale</aspectratio>
<texture border="4">$INFO[ListItem.Art(screenshot)]</texture>
<bordersize>4</bordersize>
</include>
<include content="Object_Control" condition="Window.IsVisible(ingamesaves) | Window.IsVisible(gamesaves)">
<param name="control">gamewindow</param>
<pixels>$INFO[ListItem.FilenameAndPath]</pixels>
</include>
<include content="Object_Control" condition="!Window.IsVisible(ingamesaves)">
<param name="control">gamewindow</param>
<videofilter>$INFO[ListItem.Property(game.videofilter)]</videofilter>
<stretchmode>$INFO[ListItem.Property(game.stretchmode)]</stretchmode>
<rotation>$INFO[ListItem.Property(game.videorotation)]</rotation>
</include>
</control>
<control type="group">
<left>140</left>
<control type="label">
<include condition="$PARAM[selected]">Color_SelectedText</include>
<textoffsetx>40</textoffsetx>
<textcolor>dialog_fg_70</textcolor>
<selectedcolor>dialog_fg_70</selectedcolor>
<label>$INFO[ListItem.Label]</label>
<visible>String.IsEmpty(ListItem.Label2)</visible>
</control>

<control type="label">
<include condition="$PARAM[selected]">Color_SelectedText</include>
<textoffsetx>40</textoffsetx>
<font>font_main_bold</font>
<textcolor>dialog_fg_70</textcolor>
<selectedcolor>dialog_fg_70</selectedcolor>
<label>$INFO[ListItem.Label]</label>
<visible>!String.IsEmpty(ListItem.Label2)</visible>
<top>20</top>
<height>30</height>
</control>
<control type="label">
<include condition="$PARAM[selected]">Color_SelectedText</include>
<textoffsetx>40</textoffsetx>
<font>font_tiny</font>
<textcolor>dialog_fg_70</textcolor>
<selectedcolor>dialog_fg_70</selectedcolor>
<label>$INFO[ListItem.Label2]</label>
<visible>!String.IsEmpty(ListItem.Label2)</visible>
<bottom>20</bottom>
<height>30</height>
</control>
</control>
</definition>
</include>
</includes>
20 changes: 20 additions & 0 deletions language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1944,3 +1944,23 @@ msgstr ""
msgctxt "#31386"
msgid "Unwatched only"
msgstr ""

#: /1080i/Includes_Items.xml
msgctxt "#31387"
msgid "Select + X"
msgstr "Select + X"

#: /1080i/Includes_Items.xml
msgctxt "#31388"
msgid "Select + Start"
msgstr "Select + Start"

#: /1080i/Includes_Items.xml
msgctxt "#31389"
msgid "Select + Right Stick"
msgstr "Select + Right Stick"

#: /1080i/GameOSD.xml
msgctxt "#31390"
msgid "Game menu"
msgstr "Game menu"

0 comments on commit 71a25d8

Please sign in to comment.