come corrections
This commit is contained in:
1 parent
028e0b4dcb
commit
cd07317ac0
13 files changed
+88
-51
No files matched your search
@@ -5,39 +5,12 @@ using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Vocaluxe.Base;
|
||||
using Vocaluxe.Lib.Draw;
|
||||
using Vocaluxe.Menu;
|
||||
using Vocaluxe.PartyModes;
|
||||
using Vocaluxe.Screens;
|
||||
|
||||
namespace Vocaluxe.Menu
|
||||
namespace Vocaluxe.Base
|
||||
{
|
||||
enum EScreens
|
||||
{
|
||||
ScreenTest = 0,
|
||||
ScreenLoad = 1,
|
||||
ScreenMain = 2,
|
||||
ScreenSong = 3,
|
||||
ScreenOptions = 4,
|
||||
ScreenSing = 5,
|
||||
ScreenProfiles = 6,
|
||||
ScreenScore = 7,
|
||||
ScreenHighscore = 8,
|
||||
|
||||
ScreenOptionsGame = 9,
|
||||
ScreenOptionsSound = 10,
|
||||
ScreenOptionsRecord = 11,
|
||||
ScreenOptionsVideo = 12,
|
||||
ScreenOptionsLyrics = 13,
|
||||
ScreenOptionsTheme = 14,
|
||||
|
||||
ScreenNames = 15,
|
||||
ScreenCredits = 16,
|
||||
ScreenParty = 17,
|
||||
ScreenPartyDummy = 18,
|
||||
|
||||
ScreenNull = -1
|
||||
}
|
||||
|
||||
enum EPopupScreens
|
||||
{
|
||||
PopupPlayerControl = 0,
|
||||
|
||||
@@ -357,6 +357,21 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
CGraphics.ReloadTheme();
|
||||
}
|
||||
|
||||
public void SaveTheme()
|
||||
{
|
||||
CGraphics.SaveTheme();
|
||||
}
|
||||
|
||||
public void FadeTo(EScreens NextScreen)
|
||||
{
|
||||
CGraphics.FadeTo(NextScreen);
|
||||
}
|
||||
|
||||
public float GetGlobalAlpha()
|
||||
{
|
||||
return CGraphics.GlobalAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
class BLog : ILog
|
||||
|
||||
@@ -71,7 +71,14 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static CMenu GetNextPartyScreen()
|
||||
{
|
||||
return _PartyModes[_CurrentModeNr].PartyMode.GetNextPartyScreen();
|
||||
CMenu NextScreen = _PartyModes[_CurrentModeNr].PartyMode.GetNextPartyScreen();
|
||||
if (NextScreen != null)
|
||||
return NextScreen;
|
||||
|
||||
NextScreen = new CScreenPartyDummy();
|
||||
NextScreen.Initialize(CMain.Base);
|
||||
NextScreen.LoadTheme();
|
||||
return NextScreen;
|
||||
}
|
||||
#endregion public stuff
|
||||
|
||||
|
||||
@@ -151,6 +151,12 @@ namespace Vocaluxe.Menu
|
||||
_ThemeEqualizers = null;
|
||||
_ThemePlaylists = null;
|
||||
}
|
||||
|
||||
protected void FadeTo(EScreens NextScreen)
|
||||
{
|
||||
_Base.Graphics.FadeTo(NextScreen);
|
||||
}
|
||||
|
||||
#region ThemeHandler
|
||||
public virtual void LoadTheme()
|
||||
{
|
||||
@@ -1048,7 +1054,7 @@ namespace Vocaluxe.Menu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.S:
|
||||
CGraphics.SaveTheme();
|
||||
_Base.Graphics.SaveTheme();
|
||||
break;
|
||||
|
||||
case Keys.R:
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Text;
|
||||
|
||||
namespace Vocaluxe.Menu
|
||||
{
|
||||
abstract class CMenuParty
|
||||
abstract class CMenuParty : CMenu
|
||||
{
|
||||
public CMenuParty()
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace Vocaluxe.Menu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.S:
|
||||
CGraphics.SaveTheme();
|
||||
_Base.Graphics.SaveTheme();
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
|
||||
@@ -1198,7 +1198,7 @@ namespace Vocaluxe.Menu
|
||||
_Base.Game.AddSong(_Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID, _Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode);
|
||||
}
|
||||
if (_Base.Game.GetNumSongs() > 0)
|
||||
CGraphics.FadeTo(EScreens.ScreenNames);
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenNames); //TODO: What is if someone uses that in PartyMode?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -669,7 +669,7 @@ namespace Vocaluxe.Menu
|
||||
if (Selected && (_Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
_Base.Drawing.DrawColor(
|
||||
new SColorF(0.5f, 1f, 0.5f, 0.5f * CGraphics.GlobalAlpha),
|
||||
new SColorF(0.5f, 1f, 0.5f, 0.5f * _Base.Graphics.GetGlobalAlpha()),
|
||||
new SRectF(_DrawPosition.X, _DrawPosition.Y, _DrawPosition.Width, _DrawPosition.Height, Z)
|
||||
);
|
||||
}
|
||||
@@ -802,7 +802,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (Selected && (_Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
_Base.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f * CGraphics.GlobalAlpha), new SRectF(x, y, bounds.Width, bounds.Height, Z));
|
||||
_Base.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f * _Base.Graphics.GetGlobalAlpha()), new SRectF(x, y, bounds.Width, bounds.Height, Z));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,6 +147,10 @@ namespace Vocaluxe.Menu
|
||||
public interface IGraphics
|
||||
{
|
||||
void ReloadTheme();
|
||||
void SaveTheme();
|
||||
void FadeTo(EScreens NextScreen);
|
||||
|
||||
float GetGlobalAlpha();
|
||||
}
|
||||
|
||||
public interface ILog
|
||||
@@ -791,4 +795,31 @@ namespace Vocaluxe.Menu
|
||||
TR_GAMEMODE_DUET,
|
||||
TR_GAMEMODE_SHORTSONG
|
||||
}
|
||||
|
||||
public enum EScreens
|
||||
{
|
||||
ScreenTest = 0,
|
||||
ScreenLoad = 1,
|
||||
ScreenMain = 2,
|
||||
ScreenSong = 3,
|
||||
ScreenOptions = 4,
|
||||
ScreenSing = 5,
|
||||
ScreenProfiles = 6,
|
||||
ScreenScore = 7,
|
||||
ScreenHighscore = 8,
|
||||
|
||||
ScreenOptionsGame = 9,
|
||||
ScreenOptionsSound = 10,
|
||||
ScreenOptionsRecord = 11,
|
||||
ScreenOptionsVideo = 12,
|
||||
ScreenOptionsLyrics = 13,
|
||||
ScreenOptionsTheme = 14,
|
||||
|
||||
ScreenNames = 15,
|
||||
ScreenCredits = 16,
|
||||
ScreenParty = 17,
|
||||
ScreenPartyDummy = 18,
|
||||
|
||||
ScreenNull = -1
|
||||
}
|
||||
}
|
||||
@@ -371,7 +371,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
else if (MouseEvent.RB && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
CGraphics.FadeTo(EScreens.ScreenMain);
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenMain);
|
||||
}
|
||||
else if (_PreviewSelected != -1 && MouseEvent.LB && _Base.Songs.GetCurrentCategoryIndex() != -1 && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Vocaluxe.Menu;
|
||||
using Vocaluxe.Screens;
|
||||
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
@@ -30,7 +29,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
public virtual CMenu GetNextPartyScreen()
|
||||
{
|
||||
return new CScreenPartyDummy();
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual EScreens GetStartScreen()
|
||||
|
||||
@@ -3,14 +3,15 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Vocaluxe.Base;
|
||||
using Vocaluxe.Menu;
|
||||
|
||||
namespace Vocaluxe.Screens
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
class CScreenPartyDummy : CMenu
|
||||
{// 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!
|
||||
const int ScreenVersion = 1;
|
||||
private CText Warning;
|
||||
|
||||
public CScreenPartyDummy()
|
||||
{
|
||||
@@ -26,6 +27,16 @@ namespace Vocaluxe.Screens
|
||||
|
||||
public override void LoadTheme()
|
||||
{
|
||||
Warning = GetNewText();
|
||||
Warning.Height = 100f;
|
||||
Warning.X = 150;
|
||||
Warning.Y = 300;
|
||||
Warning.Fon = "Normal";
|
||||
Warning.Style = EStyle.Normal;
|
||||
Warning.Color = new SColorF(1f, 0f, 0f, 1f);
|
||||
Warning.SColor = new SColorF(1f, 0f, 0f, 1f);
|
||||
Warning.Text = "SOMETHING WENT WRONG!";
|
||||
AddText(Warning);
|
||||
}
|
||||
|
||||
public override void ReloadTheme()
|
||||
@@ -58,7 +69,7 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
case Keys.Back:
|
||||
case Keys.Escape:
|
||||
CGraphics.FadeTo(EScreens.ScreenParty);
|
||||
FadeTo(EScreens.ScreenParty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -76,7 +87,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
if (MouseEvent.RB)
|
||||
{
|
||||
CGraphics.FadeTo(EScreens.ScreenParty);
|
||||
FadeTo(EScreens.ScreenParty);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -95,11 +106,6 @@ namespace Vocaluxe.Screens
|
||||
public override bool Draw()
|
||||
{
|
||||
base.Draw();
|
||||
|
||||
CFonts.SetFont("Normal");
|
||||
CFonts.Style = EStyle.Normal;
|
||||
CDraw.DrawText("SOMETHING WENT WRONG!", 150, 300, 80);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Vocaluxe.Screens
|
||||
break;
|
||||
|
||||
case Keys.C:
|
||||
//CGraphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CGraphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
break;
|
||||
|
||||
case Keys.Enter:
|
||||
|
||||
Reference in new issue
Block a user