* Apply R# clean-up for reliability - Migrate to NUnit4 Assert.That - Update dependencise versions - Fix LangVersion to 9.0 (until net core migration) - Reformat code - Apply 'var' style (easier for refactoring) - Remove redundant parentheses - Add braces on every condition blocks (1 line) - Uses new null checking patterns - Uses AutoProperties when possible - Uses string scalar type instead of class - Clean usings - Add .orig files in git ignore - Rename some properties to respect defined conventions and US format definition - ID -> Id - BPM -> Bpm - Finish -> End * Update R# settings according to the clean-up made
131 lines
3.9 KiB
C#
131 lines
3.9 KiB
C#
#region license
|
|
// This file is part of Vocaluxe.
|
|
//
|
|
// Vocaluxe is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Vocaluxe is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
|
#endregion
|
|
|
|
using VocaluxeLib.Menu;
|
|
|
|
namespace VocaluxeLib.PartyModes
|
|
{
|
|
#region Structs
|
|
public struct SScreenSongOptions
|
|
{
|
|
public SSortingOptions Sorting;
|
|
public SSelectionOptions Selection;
|
|
}
|
|
|
|
public struct SSortingOptions
|
|
{
|
|
public ESongSorting SongSorting;
|
|
public EOffOn Tabs;
|
|
public EOffOn IgnoreArticles;
|
|
public string SearchString;
|
|
public bool SearchActive;
|
|
public int FilterPlaylistId; //show only songs that are in this playlist, -1 for all songs
|
|
public EDuetOptions DuetOptions;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Configuration of song selection options
|
|
/// </summary>
|
|
public struct SSelectionOptions
|
|
{
|
|
/// <summary>
|
|
/// If != -1, the SongMenu should set the song selection to the provided song index (visible index) if possible
|
|
/// </summary>
|
|
public int SongIndex;
|
|
|
|
/// <summary>
|
|
/// If != -1, the SongMenu should enter show category based on provided category index if possible
|
|
/// </summary>
|
|
public int CategoryIndex;
|
|
|
|
/// <summary>
|
|
/// If true, the SongMenu should perform the select random song method
|
|
/// </summary>
|
|
public bool SelectNextRandomSong;
|
|
|
|
/// <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;
|
|
|
|
/// <summary>
|
|
/// The Team Name of the teams (:>)
|
|
/// </summary>
|
|
public string[] TeamNames;
|
|
}
|
|
#endregion Structs
|
|
|
|
public interface IPartyModeInfo
|
|
{
|
|
int Id { get; }
|
|
int MinMics { get; }
|
|
int MaxMics { get; }
|
|
int MinPlayers { get; }
|
|
int MaxPlayers { get; }
|
|
int MinTeams { get; }
|
|
int MaxTeams { get; }
|
|
int MinPlayersPerTeam { get; }
|
|
int MaxPlayersPerTeam { get; }
|
|
}
|
|
|
|
public interface IPartyMode : IPartyModeInfo
|
|
{
|
|
int NumPlayers { get; set; }
|
|
int NumTeams { get; set; }
|
|
|
|
bool Init();
|
|
|
|
void SetDefaults();
|
|
void LoadTheme();
|
|
void ReloadSkin();
|
|
void ReloadTheme();
|
|
|
|
void AddScreen(CMenuParty screen, string screenName);
|
|
void SaveScreens();
|
|
|
|
void UpdateGame();
|
|
|
|
IMenu GetStartScreen();
|
|
SScreenSongOptions GetScreenSongOptions();
|
|
|
|
void OnSongChange(int songIndex, ref SScreenSongOptions screenSongOptions);
|
|
void OnCategoryChange(int categoryIndex, ref SScreenSongOptions screenSongOptions);
|
|
|
|
void SetSearchString(string searchString, bool visible);
|
|
|
|
void JokerUsed(int teamNr);
|
|
void SongSelected(int songId);
|
|
void FinishedSinging();
|
|
void LeavingScore();
|
|
void LeavingHighscore();
|
|
}
|
|
} |