moved menu and party mode files to the new lib
This commit is contained in:
1 parent
69420d6977
commit
d6c97568c9
35 files changed
+74
-70
No files matched your search
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Vocaluxe.Menu;
|
||||
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
public abstract class CPartyMode : IPartyMode
|
||||
{
|
||||
protected Basic _Base;
|
||||
protected ScreenSongOptions _ScreenSongOptions;
|
||||
protected List<CMenu> _Screens;
|
||||
protected string _Folder;
|
||||
|
||||
public CPartyMode()
|
||||
{
|
||||
_Screens = new List<CMenu>();
|
||||
_Folder = String.Empty;
|
||||
_ScreenSongOptions = new ScreenSongOptions();
|
||||
_ScreenSongOptions.Selection = new SelectionOptions();
|
||||
_ScreenSongOptions.Sorting = new SortingOptions();
|
||||
}
|
||||
|
||||
public void Initialize(Basic Base)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
#region Implementation
|
||||
public virtual bool Init(string Folder)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual CMenu GetNextPartyScreen()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual EScreens GetStartScreen()
|
||||
{
|
||||
return EScreens.ScreenSong;
|
||||
}
|
||||
|
||||
public virtual EScreens GetMainScreen()
|
||||
{
|
||||
return EScreens.ScreenSong;
|
||||
}
|
||||
|
||||
public virtual ScreenSongOptions GetScreenSongOptions()
|
||||
{
|
||||
return new ScreenSongOptions();
|
||||
}
|
||||
|
||||
public virtual void SetSearchString(string SearchString, bool Visible)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void JokerUsed(int TeamNr)
|
||||
{
|
||||
if (_ScreenSongOptions.Selection.NumJokers == null)
|
||||
return;
|
||||
|
||||
if (_ScreenSongOptions.Selection.NumJokers.Length < TeamNr)
|
||||
return;
|
||||
|
||||
if (_ScreenSongOptions.Selection.NumJokers[TeamNr] > 0)
|
||||
_ScreenSongOptions.Selection.NumJokers[TeamNr]--;
|
||||
}
|
||||
#endregion Implementation
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
public class CPartyModeNone : CPartyMode
|
||||
{
|
||||
//just a dummy for normal game mode
|
||||
public CPartyModeNone()
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||
_ScreenSongOptions.Selection.PartyMode = false;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = true;
|
||||
_ScreenSongOptions.Selection.NumJokers = null;
|
||||
|
||||
_ScreenSongOptions.Sorting.SearchString = String.Empty;
|
||||
_ScreenSongOptions.Sorting.SearchStringVisible = false;
|
||||
}
|
||||
|
||||
public override ScreenSongOptions GetScreenSongOptions()
|
||||
{
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = _Base.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
|
||||
return _ScreenSongOptions;
|
||||
}
|
||||
|
||||
public override void SetSearchString(string SearchString, bool Visible)
|
||||
{
|
||||
_ScreenSongOptions.Sorting.SearchString = SearchString;
|
||||
_ScreenSongOptions.Sorting.SearchStringVisible = Visible;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Vocaluxe.Menu;
|
||||
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
public class CScreenPartyDummy : CMenu
|
||||
{
|
||||
// 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()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
_ThemeName = "ScreenPartyDummy";
|
||||
_ScreenVersion = ScreenVersion;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
}
|
||||
|
||||
public override void ReloadTextures()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SaveTheme()
|
||||
{
|
||||
}
|
||||
|
||||
public override void UnloadTextures()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool HandleInput(KeyEvent KeyEvent)
|
||||
{
|
||||
base.HandleInput(KeyEvent);
|
||||
|
||||
if (KeyEvent.KeyPressed)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.Back:
|
||||
case Keys.Escape:
|
||||
FadeTo(EScreens.ScreenParty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool HandleMouse(MouseEvent MouseEvent)
|
||||
{
|
||||
base.HandleMouse(MouseEvent);
|
||||
|
||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (MouseEvent.RB)
|
||||
{
|
||||
FadeTo(EScreens.ScreenParty);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
base.OnShow();
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool Draw()
|
||||
{
|
||||
base.Draw();
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Vocaluxe.Menu;
|
||||
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
#region Structs
|
||||
public struct ScreenSongOptions
|
||||
{
|
||||
public SortingOptions Sorting;
|
||||
public SelectionOptions Selection;
|
||||
}
|
||||
|
||||
public struct SortingOptions
|
||||
{
|
||||
public ESongSorting SongSorting;
|
||||
public EOffOn Tabs;
|
||||
public EOffOn IgnoreArticles;
|
||||
public string SearchString;
|
||||
public bool SearchStringVisible;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configuration of song selection options
|
||||
/// </summary>
|
||||
public struct SelectionOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Choosing song only by random
|
||||
/// </summary>
|
||||
public bool RandomOnly;
|
||||
|
||||
/// <summary>
|
||||
/// If true, it is not allowed to go to MainScreen nor open the playlist nor open the song menu
|
||||
/// </summary>
|
||||
public bool PartyMode;
|
||||
|
||||
/// <summary>
|
||||
/// If true, it is not alled to change or leave the category. It's only valid if Tabs=On.
|
||||
/// </summary>
|
||||
public bool CategoryChangeAllowed;
|
||||
|
||||
/// <summary>
|
||||
/// The number of jokers left for each team
|
||||
/// </summary>
|
||||
public int[] NumJokers;
|
||||
}
|
||||
#endregion Structs
|
||||
|
||||
public interface IPartyMode
|
||||
{
|
||||
bool Init(string Folder);
|
||||
void Initialize(Basic Base);
|
||||
|
||||
CMenu GetNextPartyScreen();
|
||||
EScreens GetStartScreen();
|
||||
EScreens GetMainScreen();
|
||||
ScreenSongOptions GetScreenSongOptions();
|
||||
|
||||
void SetSearchString(string SearchString, bool Visible);
|
||||
|
||||
void JokerUsed(int TeamNr);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user