Merge pull request #182 from z3ro01/develop
Fix: Crash after starting a second challenge mode #169
This commit is contained in:
commit
4fc97a80a8
8 files changed
+43
-147
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<Informations>
|
<Informations>
|
||||||
<ScreenName>PopupScreenServerQR</ScreenName>
|
<ScreenName>PopupScreenServerQR</ScreenName>
|
||||||
<ScreenVersion>1</ScreenVersion>
|
<ScreenVersion>2</ScreenVersion>
|
||||||
</Informations>
|
</Informations>
|
||||||
<Backgrounds />
|
<Backgrounds />
|
||||||
<Statics>
|
<Statics>
|
||||||
@@ -26,54 +26,10 @@
|
|||||||
<Skin>Menu</Skin>
|
<Skin>Menu</Skin>
|
||||||
<Color Name="Visible" />
|
<Color Name="Visible" />
|
||||||
<Rect>
|
<Rect>
|
||||||
<X>490</X>
|
<X>465</X>
|
||||||
<Y>210</Y>
|
<Y>210</Y>
|
||||||
<W>300</W>
|
<W>350</W>
|
||||||
<H>300</H>
|
<H>350</H>
|
||||||
<Z>-2</Z>
|
|
||||||
</Rect>
|
|
||||||
</Static>
|
|
||||||
<Static Name="StaticQRAndroid">
|
|
||||||
<Skin>Menu</Skin>
|
|
||||||
<Color Name="Visible" />
|
|
||||||
<Rect>
|
|
||||||
<X>25</X>
|
|
||||||
<Y>25</Y>
|
|
||||||
<W>200</W>
|
|
||||||
<H>200</H>
|
|
||||||
<Z>-2</Z>
|
|
||||||
</Rect>
|
|
||||||
</Static>
|
|
||||||
<Static Name="StaticQRSymbian">
|
|
||||||
<Skin>Menu</Skin>
|
|
||||||
<Color Name="Visible" />
|
|
||||||
<Rect>
|
|
||||||
<X>1055</X>
|
|
||||||
<Y>25</Y>
|
|
||||||
<W>200</W>
|
|
||||||
<H>200</H>
|
|
||||||
<Z>-2</Z>
|
|
||||||
</Rect>
|
|
||||||
</Static>
|
|
||||||
<Static Name="StaticQRWebOS">
|
|
||||||
<Skin>Menu</Skin>
|
|
||||||
<Color Name="Visible" />
|
|
||||||
<Rect>
|
|
||||||
<X>25</X>
|
|
||||||
<Y>495</Y>
|
|
||||||
<W>200</W>
|
|
||||||
<H>200</H>
|
|
||||||
<Z>-2</Z>
|
|
||||||
</Rect>
|
|
||||||
</Static>
|
|
||||||
<Static Name="StaticQRWindowsPhone">
|
|
||||||
<Skin>Menu</Skin>
|
|
||||||
<Color Name="Visible" />
|
|
||||||
<Rect>
|
|
||||||
<X>1055</X>
|
|
||||||
<Y>495</Y>
|
|
||||||
<W>200</W>
|
|
||||||
<H>200</H>
|
|
||||||
<Z>-2</Z>
|
<Z>-2</Z>
|
||||||
</Rect>
|
</Rect>
|
||||||
</Static>
|
</Static>
|
||||||
@@ -81,7 +37,7 @@
|
|||||||
<Texts>
|
<Texts>
|
||||||
<Text Name="Text1">
|
<Text Name="Text1">
|
||||||
<X>640</X>
|
<X>640</X>
|
||||||
<Y>180</Y>
|
<Y>170</Y>
|
||||||
<Z>-2</Z>
|
<Z>-2</Z>
|
||||||
<H>35</H>
|
<H>35</H>
|
||||||
<MaxW>300</MaxW>
|
<MaxW>300</MaxW>
|
||||||
@@ -93,65 +49,9 @@
|
|||||||
<Font>Outline</Font>
|
<Font>Outline</Font>
|
||||||
<Text>TR_SCREENPSERVERQR_ADDRESS</Text>
|
<Text>TR_SCREENPSERVERQR_ADDRESS</Text>
|
||||||
</Text>
|
</Text>
|
||||||
<Text Name="Text2">
|
|
||||||
<X>125</X>
|
|
||||||
<Y>230</Y>
|
|
||||||
<Z>-2</Z>
|
|
||||||
<H>27</H>
|
|
||||||
<MaxW>200</MaxW>
|
|
||||||
<Color Name="StaticColor" />
|
|
||||||
<SelColor Name="TextSelColor" />
|
|
||||||
<Align>Center</Align>
|
|
||||||
<ResizeAlign>Center</ResizeAlign>
|
|
||||||
<Style>Bold</Style>
|
|
||||||
<Font>Outline</Font>
|
|
||||||
<Text>Android</Text>
|
|
||||||
</Text>
|
|
||||||
<Text Name="Text3">
|
|
||||||
<X>1155</X>
|
|
||||||
<Y>230</Y>
|
|
||||||
<Z>-2</Z>
|
|
||||||
<H>27</H>
|
|
||||||
<MaxW>200</MaxW>
|
|
||||||
<Color Name="StaticColor" />
|
|
||||||
<SelColor Name="TextSelColor" />
|
|
||||||
<Align>Center</Align>
|
|
||||||
<ResizeAlign>Center</ResizeAlign>
|
|
||||||
<Style>Bold</Style>
|
|
||||||
<Font>Outline</Font>
|
|
||||||
<Text>Symbian</Text>
|
|
||||||
</Text>
|
|
||||||
<Text Name="Text4">
|
|
||||||
<X>125</X>
|
|
||||||
<Y>460</Y>
|
|
||||||
<Z>-2</Z>
|
|
||||||
<H>27</H>
|
|
||||||
<MaxW>200</MaxW>
|
|
||||||
<Color Name="StaticColor" />
|
|
||||||
<SelColor Name="TextSelColor" />
|
|
||||||
<Align>Center</Align>
|
|
||||||
<ResizeAlign>Center</ResizeAlign>
|
|
||||||
<Style>Bold</Style>
|
|
||||||
<Font>Outline</Font>
|
|
||||||
<Text>WebOS</Text>
|
|
||||||
</Text>
|
|
||||||
<Text Name="Text5">
|
|
||||||
<X>1155</X>
|
|
||||||
<Y>460</Y>
|
|
||||||
<Z>-2</Z>
|
|
||||||
<H>27</H>
|
|
||||||
<MaxW>200</MaxW>
|
|
||||||
<Color Name="StaticColor" />
|
|
||||||
<SelColor Name="TextSelColor" />
|
|
||||||
<Align>Center</Align>
|
|
||||||
<ResizeAlign>Center</ResizeAlign>
|
|
||||||
<Style>Bold</Style>
|
|
||||||
<Font>Outline</Font>
|
|
||||||
<Text>Windows Phone</Text>
|
|
||||||
</Text>
|
|
||||||
<Text Name="TextServerAddress">
|
<Text Name="TextServerAddress">
|
||||||
<X>640</X>
|
<X>640</X>
|
||||||
<Y>515</Y>
|
<Y>570</Y>
|
||||||
<Z>-2</Z>
|
<Z>-2</Z>
|
||||||
<H>35</H>
|
<H>35</H>
|
||||||
<MaxW>300</MaxW>
|
<MaxW>300</MaxW>
|
||||||
|
|||||||
@@ -153,10 +153,8 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, NumJokers = 5, RefillJokers = true, CurrentRoundNr = 1, ProfileIDs = new List<int>(), CatSongIndices = null, Results = null};
|
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, NumJokers = 5, RefillJokers = true, CurrentRoundNr = 1, ProfileIDs = new List<int>(), CatSongIndices = null, Results = null};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Init()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
if (!base.Init())
|
|
||||||
return false;
|
|
||||||
_Stage = EStage.Config;
|
_Stage = EStage.Config;
|
||||||
|
|
||||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||||
@@ -168,7 +166,15 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
|
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
|
||||||
|
|
||||||
GameData.ResultTable = new List<CResultTableRow>();
|
GameData.ResultTable = new List<CResultTableRow>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Init()
|
||||||
|
{
|
||||||
|
if (!base.Init())
|
||||||
|
return false;
|
||||||
|
_Stage = EStage.Config;
|
||||||
|
|
||||||
|
SetDefaults();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -168,14 +168,19 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, CurrentRoundNr = 1, ProfileIDs = new List<int>(), NumSongs = 5, Songs = new List<int>(), SongSource = ESongSource.TR_ALLSONGS, CatSongIndices = null, Results = null};
|
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, CurrentRoundNr = 1, ProfileIDs = new List<int>(), NumSongs = 5, Songs = new List<int>(), SongSource = ESongSource.TR_ALLSONGS, CatSongIndices = null, Results = null};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetDefaults()
|
||||||
|
{
|
||||||
|
_Stage = EStage.Config;
|
||||||
|
GameData.CurrentRoundNr = 1;
|
||||||
|
GameData.ResultTable = new List<CResultTableRow>();
|
||||||
|
}
|
||||||
|
|
||||||
public override bool Init()
|
public override bool Init()
|
||||||
{
|
{
|
||||||
if (!base.Init())
|
if (!base.Init())
|
||||||
return false;
|
return false;
|
||||||
_Stage = EStage.Config;
|
|
||||||
|
|
||||||
GameData.ResultTable = new List<CResultTableRow>();
|
|
||||||
|
|
||||||
|
SetDefaults();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -168,10 +168,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Init()
|
public override void SetDefaults()
|
||||||
{
|
{
|
||||||
if (!base.Init())
|
|
||||||
return false;
|
|
||||||
_Stage = EStage.Config;
|
_Stage = EStage.Config;
|
||||||
|
|
||||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||||
@@ -186,6 +184,14 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
GameData.Rounds.Clear();
|
GameData.Rounds.Clear();
|
||||||
GameData.PlayerTeam1.Clear();
|
GameData.PlayerTeam1.Clear();
|
||||||
GameData.PlayerTeam2.Clear();
|
GameData.PlayerTeam2.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Init()
|
||||||
|
{
|
||||||
|
if (!base.Init())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
SetDefaults();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,8 +63,10 @@ namespace Vocaluxe.Base
|
|||||||
get { return _CurrentPartyMode.ID; }
|
get { return _CurrentPartyMode.ID; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_CurrentPartyMode.ID == value)
|
if (_CurrentPartyMode.ID == value) {
|
||||||
|
_CurrentPartyMode.SetDefaults();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (value != -1 && !_PartyModes.ContainsKey(value))
|
if (value != -1 && !_PartyModes.ContainsKey(value))
|
||||||
throw new ArgumentException("Partymode with ID=" + value + " does not exist!");
|
throw new ArgumentException("Partymode with ID=" + value + " does not exist!");
|
||||||
IPartyMode pm = _PartyModes[value].PartyMode;
|
IPartyMode pm = _PartyModes[value].PartyMode;
|
||||||
|
|||||||
@@ -30,20 +30,11 @@ namespace Vocaluxe.Screens
|
|||||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||||
protected override int _ScreenVersion
|
protected override int _ScreenVersion
|
||||||
{
|
{
|
||||||
get { return 1; }
|
get { return 2; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private CTextureRef _QRServerAddress;
|
private CTextureRef _QRServerAddress;
|
||||||
private CTextureRef _QRAndroidLink;
|
|
||||||
private CTextureRef _QRSymbianLink;
|
|
||||||
private CTextureRef _QRWebOSLink;
|
|
||||||
private CTextureRef _QRWindowsPhoneLink;
|
|
||||||
|
|
||||||
private const string _StaticQRServer = "StaticQRServer";
|
private const string _StaticQRServer = "StaticQRServer";
|
||||||
private const string _StaticQRAndroid = "StaticQRAndroid";
|
|
||||||
private const string _StaticQRSymbian = "StaticQRSymbian";
|
|
||||||
private const string _StaticQRWebOS = "StaticQRWebOS";
|
|
||||||
private const string _StaticQRWindowsPhone = "StaticQRWindowsPhone";
|
|
||||||
|
|
||||||
private const string _TextServerAddress = "TextServerAddress";
|
private const string _TextServerAddress = "TextServerAddress";
|
||||||
private const string _TextServerNotRunning = "TextServerNotRunning";
|
private const string _TextServerNotRunning = "TextServerNotRunning";
|
||||||
@@ -52,7 +43,7 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
|
|
||||||
_ThemeStatics = new string[] {_StaticQRServer, _StaticQRAndroid, _StaticQRSymbian, _StaticQRWebOS, _StaticQRWindowsPhone};
|
_ThemeStatics = new string[] {_StaticQRServer};
|
||||||
_ThemeTexts = new string[] {_TextServerAddress, _TextServerNotRunning};
|
_ThemeTexts = new string[] {_TextServerAddress, _TextServerNotRunning};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,10 +54,6 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
_GenerateQRs();
|
_GenerateQRs();
|
||||||
_Statics[_StaticQRServer].Texture = _QRServerAddress;
|
_Statics[_StaticQRServer].Texture = _QRServerAddress;
|
||||||
_Statics[_StaticQRAndroid].Texture = _QRAndroidLink;
|
|
||||||
_Statics[_StaticQRSymbian].Texture = _QRSymbianLink;
|
|
||||||
_Statics[_StaticQRWebOS].Texture = _QRWebOSLink;
|
|
||||||
_Statics[_StaticQRWindowsPhone].Texture = _QRWindowsPhoneLink;
|
|
||||||
_Texts[_TextServerAddress].Text = CVocaluxeServer.GetServerAddress();
|
_Texts[_TextServerAddress].Text = CVocaluxeServer.GetServerAddress();
|
||||||
}
|
}
|
||||||
_Texts[_TextServerAddress].Visible = CVocaluxeServer.IsServerRunning();
|
_Texts[_TextServerAddress].Visible = CVocaluxeServer.IsServerRunning();
|
||||||
@@ -108,22 +95,6 @@ namespace Vocaluxe.Screens
|
|||||||
//ServerAddress
|
//ServerAddress
|
||||||
QRCodeGenerator.QRCode qrcode = qr.CreateQrCode(CVocaluxeServer.GetServerAddress(), QRCodeGenerator.ECCLevel.H);
|
QRCodeGenerator.QRCode qrcode = qr.CreateQrCode(CVocaluxeServer.GetServerAddress(), QRCodeGenerator.ECCLevel.H);
|
||||||
_QRServerAddress = CDraw.AddTexture(qrcode.GetGraphic(20));
|
_QRServerAddress = CDraw.AddTexture(qrcode.GetGraphic(20));
|
||||||
|
|
||||||
//Android
|
|
||||||
qrcode = qr.CreateQrCode(CSettings.LinkAndroidApp, QRCodeGenerator.ECCLevel.H);
|
|
||||||
_QRAndroidLink = CDraw.AddTexture(qrcode.GetGraphic(20));
|
|
||||||
|
|
||||||
//Symbian
|
|
||||||
qrcode = qr.CreateQrCode(CSettings.LinkSymbianApp, QRCodeGenerator.ECCLevel.H);
|
|
||||||
_QRSymbianLink = CDraw.AddTexture(qrcode.GetGraphic(20));
|
|
||||||
|
|
||||||
//WebOS
|
|
||||||
qrcode = qr.CreateQrCode(CSettings.LinkWebOSApp, QRCodeGenerator.ECCLevel.H);
|
|
||||||
_QRWebOSLink = CDraw.AddTexture(qrcode.GetGraphic(20));
|
|
||||||
|
|
||||||
//WindowsPhone
|
|
||||||
qrcode = qr.CreateQrCode(CSettings.LinkWindowsPhoneApp, QRCodeGenerator.ECCLevel.H);
|
|
||||||
_QRWindowsPhoneLink = CDraw.AddTexture(qrcode.GetGraphic(20));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,6 +48,11 @@ namespace VocaluxeLib.PartyModes
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void SetDefaults()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadTheme()
|
public void LoadTheme()
|
||||||
{
|
{
|
||||||
string xmlPath = CBase.Themes.GetThemeScreensPath(ID);
|
string xmlPath = CBase.Themes.GetThemeScreensPath(ID);
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ namespace VocaluxeLib.PartyModes
|
|||||||
|
|
||||||
bool Init();
|
bool Init();
|
||||||
|
|
||||||
|
void SetDefaults();
|
||||||
void LoadTheme();
|
void LoadTheme();
|
||||||
void ReloadSkin();
|
void ReloadSkin();
|
||||||
void ReloadTheme();
|
void ReloadTheme();
|
||||||
|
|||||||
Reference in new issue
Block a user