-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add a GUI controller. Not sure about referencing the UI abstraction project from the domain project... * Get rid of duplicate IGuiController and FrEee.UI project * Use GuiController in place of Gui * Use GuiController for Blazor history log
- Loading branch information
Showing
15 changed files
with
315 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
using FrEee.Objects.Civilization.Diplomacy.Messages; | ||
using FrEee.Objects.Space; | ||
using FrEee.Objects.Technology; | ||
using FrEee.Processes.Combat; | ||
using FrEee.Vehicles; | ||
|
||
namespace FrEee.Utility; | ||
|
||
public interface IGuiController | ||
{ | ||
/// <summary> | ||
/// Shows a particular screen. | ||
/// </summary> | ||
/// <param name="screen"></param> | ||
void Show(Screen screen); | ||
|
||
/// <summary> | ||
/// Hides a particular screen. | ||
/// </summary> | ||
/// <param name="screen"></param> | ||
void Hide(Screen screen); | ||
|
||
/// <summary> | ||
/// Closes a particular screen. | ||
/// </summary> | ||
/// <param name="screen"></param> | ||
void Close(Screen screen); | ||
|
||
/// <summary> | ||
/// Exits the game. | ||
/// </summary> | ||
void Exit(); | ||
|
||
/// <summary> | ||
/// Closes all windows except the main menu. Shows the main menu. | ||
/// </summary> | ||
void ReturnToMainMenu(); | ||
|
||
/// <summary> | ||
/// Exits or returns to the main menu, per the player's preference. | ||
/// </summary> | ||
void CloseGame(); | ||
|
||
/// <summary> | ||
/// Focuses a space object on the map. | ||
/// </summary> | ||
/// <param name="sobj"></param> | ||
void Focus(ISpaceObject context); | ||
|
||
/// <summary> | ||
/// Focuses a star system on the map. | ||
/// </summary> | ||
/// <param name="sobj"></param> | ||
void Focus(StarSystem context); | ||
|
||
/// <summary> | ||
/// Focuses a technology on the research screen. | ||
/// </summary> | ||
/// <param name="sobj"></param> | ||
void Focus(Technology context); | ||
|
||
/// <summary> | ||
/// Focuses a hull on the design screen. | ||
/// </summary> | ||
/// <param name="sobj"></param> | ||
void Focus(IHull context); | ||
|
||
/// <summary> | ||
/// Focuses a battle on the battle summary screen. | ||
/// </summary> | ||
/// <param name="sobj"></param> | ||
void Focus(IBattle context); | ||
|
||
/// <summary> | ||
/// Focuses a message on the diplomacy screen. | ||
/// </summary> | ||
/// <param name="sobj"></param> | ||
void Focus(IMessage context); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FrEee.Utility; | ||
|
||
/// <summary> | ||
/// The various screens in the UI. | ||
/// </summary> | ||
public enum Screen | ||
{ | ||
ActivateAbility, | ||
BattleReplay, | ||
BattleResults, | ||
BlazorTest, | ||
CargoTransfer, | ||
CombatSimulator, | ||
Commands, | ||
ConstructionQueue, | ||
ConstructionQueueList, | ||
CultureComparison, | ||
Debug, | ||
DesignList, | ||
Diplomacy, | ||
Editor, | ||
EmpireList, | ||
EmpireSetup, | ||
FleetTransfer, | ||
GameOver, | ||
GameSetup, | ||
HostConsole, | ||
HullPicker, | ||
Log, | ||
MainGame, | ||
MainMenu, | ||
Ministers, | ||
ModErrors, | ||
ModPicker, | ||
MountPicker, | ||
Options, | ||
PlanetList, | ||
Recycle, | ||
Research, | ||
Scores, | ||
SearchBoxResults, | ||
ShipList, | ||
SpaceObjectPicker, | ||
Status, | ||
TechTree, | ||
VehicleDesign | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.