Added button to game-options to open qr-screen.

This commit is contained in:
Florian Küpper committed 2013-12-19 08:54:22 +01:00
1 parent ae0e63d193
commit 7b62645159
3 files changed
+77 -5

No files matched your search

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<ScreenOptionsGame>
<ScreenVersion>1</ScreenVersion>
<ScreenVersion>2</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
@@ -385,6 +385,63 @@
<Height>26</Height>
</SReflection>
</ButtonExit>
<ButtonServer>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Button</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>355</X>
<Y>600</Y>
<Z>0,00</Z>
<W>150</W>
<H>50</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>12</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<ResizeAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENOGAME_BUTTON_SERVER</Text>
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<Reflection>
<Space>10</Space>
<Height>26</Height>
</Reflection>
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
<SReflection>
<Space>10</Space>
<Height>26</Height>
</SReflection>
</ButtonServer>
<SelectSlideLanguage>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
@@ -788,4 +845,4 @@
<NumVisible>3</NumVisible>
</SelectSlideTimerMode>
</ScreenOptionsGame>
</root>
</root>
@@ -0,0 +1,8 @@
ScreenOptionsGame
++++++++++
Version 2:
Add:
<ButtonServer>
++++++++++
+10 -3
View File
@@ -27,7 +27,7 @@ namespace Vocaluxe.Screens
// Version number for theme files. Increment it, if you've changed something on the theme files!
protected override int _ScreenVersion
{
get { return 1; }
get { return 2; }
}
private const string _SelectSlideLanguage = "SelectSlideLanguage";
@@ -38,12 +38,13 @@ namespace Vocaluxe.Screens
private const string _SelectSlideTimerMode = "SelectSlideTimerMode";
private const string _ButtonExit = "ButtonExit";
private const string _ButtonServer = "ButtonServer";
public override void Init()
{
base.Init();
_ThemeButtons = new string[] {_ButtonExit};
_ThemeButtons = new string[] {_ButtonExit, _ButtonServer};
_ThemeSelectSlides = new string[] {_SelectSlideLanguage, _SelectSlideDebugLevel, _SelectSlideSongMenu, _SelectSlideSongSorting, _SelectSlideTabs, _SelectSlideTimerMode};
}
@@ -86,6 +87,8 @@ namespace Vocaluxe.Screens
_SaveConfig();
CGraphics.FadeTo(EScreens.ScreenOptions);
}
else if (_Buttons[_ButtonServer].Selected)
CGraphics.ShowPopup(EPopupScreens.PopupServerQR);
break;
case Keys.Left:
@@ -112,9 +115,13 @@ namespace Vocaluxe.Screens
if (mouseEvent.LB && _IsMouseOver(mouseEvent))
{
_SaveConfig();
if (_Buttons[_ButtonExit].Selected)
{
CGraphics.FadeTo(EScreens.ScreenOptions);
_SaveConfig();
}
else if (_Buttons[_ButtonServer].Selected)
CGraphics.ShowPopup(EPopupScreens.PopupServerQR);
}
return true;
}