Skip to content

Commit

Permalink
Game OSD
Browse files Browse the repository at this point in the history
  • Loading branch information
garbear committed Jun 17, 2017
1 parent 532ef25 commit ca0f4dc
Show file tree
Hide file tree
Showing 22 changed files with 894 additions and 5 deletions.
46 changes: 45 additions & 1 deletion addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -5466,13 +5466,15 @@ msgstr ""

#empty strings from id 12374 to 12375

#: xbmc/games/dialogs/osd/DialogGameAudioSettings.cpp
#: xbmc/settings/dialogs/GUIDialogAudioDSPSettings.cpp
#: xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
msgctxt "#12376"
msgid "Set as default for all media"
msgstr ""

#: xbmc/games/dialogs/osd/DialogGameAudioSettings.cpp
#: xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
msgctxt "#12377"
Expand Down Expand Up @@ -6508,6 +6510,7 @@ msgstr ""

#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
#: addons/skin.estuary/xml/Variables.xml
#: addons/skin.estuary/xml/Custom_1101_SettingsList.xml
#: addons/skin.estuary/xml/Custom_1106_VideoOSDSettings.xml
msgctxt "#13395"
msgid "Video settings"
Expand Down Expand Up @@ -16964,7 +16967,48 @@ msgctxt "#35220"
msgid "Game providers"
msgstr ""

#empty strings from id 35221 to 35249
#. Title of the game OSD menu
#: addons/skin.estuary/xml/GameOSD.xml
msgctxt "#35221"
msgid "Game Menu"
msgstr ""

#. Label of button for stopping game playback
#: addons/skin.estuary/xml/GameOSD.xml
msgctxt "#35222"
msgid "Exit"
msgstr ""

#. Label of button for opening the saved game manager
#: addons/skin.estuary/xml/GameOSD.xml
msgctxt "#35223"
msgid "Saved Games"
msgstr ""

#. Title of the audio settings window for gameplay
#: addons/skin.estuary/xml/Custom_1101_SettingsList.xml
#: xbmc/games/dialogs/osd/DialogGameAudioSettings.cpp
msgctxt "#35224"
msgid "Audio settings"
msgstr ""

#. Label of button for opening the input configuration dialog
#: addons/skin.estuary/xml/Custom_1101_SettingsList.xml
msgctxt "#35225"
msgid "Input settings"
msgstr ""

#. Label of game menu button for opening the cheat manager
msgctxt "#35226"
msgid "Cheats"
msgstr ""

#. Title of the dialog for game achievements
msgctxt "#35227"
msgid "Achievements"
msgstr ""

#empty strings from id 35230 to 35249

#: xbmc/windows/GUIMediaWindow.cpp
msgctxt "#35250"
Expand Down
39 changes: 39 additions & 0 deletions addons/skin.estuary/xml/Custom_1101_SettingsList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,45 @@
<selected>Integer.IsEqual(System.StereoscopicMode,9)</selected>
</control>
</control>
<control type="grouplist" id="14100">
<visible>String.IsEqual(window(home).Property(settingslist_content),game_osd)</visible>
<width>700</width>
<height>360</height>
<itemgap>0</itemgap>
<onup>11100</onup>
<ondown>11100</ondown>
<orientation>vertical</orientation>
<control type="button" id="14101">
<description>Video settings button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[13395]</label>
<onclick>ActivateWindow(gamevideosettings)</onclick>
</control>
<control type="button" id="14102">
<description>Audio settings button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[35224]</label>
<onclick>ActivateWindow(gameaudiosettings)</onclick>
</control>
<control type="button" id="14103">
<description>Input settings button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[35225]</label>
<onclick>ActivateWindow(gamecontrollers)</onclick>
</control>
<!--
<control type="button" id="14104">
<description>Cheats button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[35226]</label>
<onclick>ActivateWindow(gamecheats)</onclick>
</control>
-->
</control>
</control>
</control>
</controls>
Expand Down
72 changes: 72 additions & 0 deletions addons/skin.estuary/xml/GameOSD.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<window>
<defaultcontrol always="true">11101</defaultcontrol>
<include>Animation_DialogPopupOpenClose</include>
<controls>
<control type="group">
<centerleft>50%</centerleft>
<height>560</height>
<centertop>50%</centertop>
<width>700</width>
<visible>!Window.IsActive(1101)</visible>
<animation effect="fade" time="200">VisibleChange</animation>
<include content="DialogBackgroundCommons">
<param name="width" value="700" />
<param name="height" value="80" />
<param name="header_label" value="$LOCALIZE[35221]" />
<param name="header_id" value="1" />
</include>
<control type="group" id="11000">
<left>0</left>
<top>80</top>
<control type="grouplist" id="11101">
<width>700</width>
<height>360</height>
<itemgap>0</itemgap>
<onup>11100</onup>
<ondown>11100</ondown>
<orientation>vertical</orientation>
<control type="button" id="11102">
<description>Resume button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[13404]</label>
<onclick>Dialog.Close(GameOSD)</onclick>
</control>
<control type="button" id="11103">
<description>Restart button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[13313]</label>
<onclick>PlayerControl(Previous)</onclick>
</control>
<control type="button" id="11104">
<description>Stop button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[35222]</label>
<onclick>PlayerControl(Stop)</onclick>
</control>
<!--
<control type="button" id="11105">
<description>Saved games button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[35223]</label>
<onclick>ActivateWindow(gamesavestates)</onclick>
</control>
-->
<control type="button" id="11106">
<description>Settings button</description>
<width>700</width>
<include>DialogSettingButton</include>
<label>$LOCALIZE[5]</label>
<onclick>SetProperty(settingslist_content,game_osd,home)</onclick>
<onclick>SetProperty(settingslist_header,$LOCALIZE[5],home)</onclick>
<onclick>ActivateWindow(1101)</onclick>
</control>
</control>
</control>
</control>
</controls>
</window>
1 change: 1 addition & 0 deletions cmake/treedata/common/games.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ xbmc/games/controllers/dialogs games/controllers/dialogs
xbmc/games/controllers/guicontrols games/controllers/guicontrols
xbmc/games/controllers/windows games/controllers/windows
xbmc/games/dialogs games/dialogs
xbmc/games/dialogs/osd games/dialogs/osd
xbmc/games/ports games/ports
xbmc/games/tags games/tags
xbmc/games/windows games/windows
9 changes: 9 additions & 0 deletions xbmc/cores/RetroPlayer/RetroPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "games/addons/GameClient.h"
#include "games/tags/GameInfoTag.h"
#include "games/GameUtils.h"
#include "settings/MediaSettings.h"
#include "threads/SingleLock.h"
#include "utils/log.h"
#include "utils/MathUtils.h"
Expand Down Expand Up @@ -54,6 +55,14 @@ bool CRetroPlayer::OpenFile(const CFileItem& file, const CPlayerOptions& options
std::string redactedPath = CURL::GetRedacted(file.GetPath());
CLog::Log(LOGINFO, "RetroPlayer: Opening: %s", redactedPath.c_str());

// Reset game settings
CMediaSettings::GetInstance().GetCurrentGameSettings() = CMediaSettings::GetInstance().GetDefaultGameSettings();

//! @todo - Remove this when RetroPlayer has a renderer
CVideoSettings &videoSettings = CMediaSettings::GetInstance().GetCurrentVideoSettings();
videoSettings.m_ScalingMethod = CMediaSettings::GetInstance().GetCurrentGameSettings().ScalingMethod();
videoSettings.m_ViewMode = CMediaSettings::GetInstance().GetCurrentGameSettings().ViewMode();

CSingleLock lock(m_mutex);

if (IsPlaying())
Expand Down
11 changes: 11 additions & 0 deletions xbmc/games/dialogs/osd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(SOURCES DialogGameAudioSettings.cpp
DialogGameOSD.cpp
DialogGameVideoSettings.cpp
)

set(HEADERS DialogGameAudioSettings.h
DialogGameOSD.h
DialogGameVideoSettings.h
)

core_add_library(gameosddialogs)
Loading

0 comments on commit ca0f4dc

Please sign in to comment.