Difference between revisions of "UI"

From BotF2-Wiki
Jump to: navigation, search
(Button)
 
(10 intermediate revisions by one user not shown)
Line 12: Line 12:
 
***right bottom: Planets...
 
***right bottom: Planets...
  
 +
 +
== Theme ==
 +
 +
* Themes are appearance of each Empire's UI.
 +
 +
Common stuff is content of Global.xaml
 +
 +
Empire's themes are defined in Shared.xaml
 +
 +
=== Shared.xaml ===
 +
 +
Parts and Structure of each Shared.xaml could be (but is not ..take Klingons as an example, not the Federation sharing a lot of stuff with Global.xaml)
 +
 +
=== Border ===
 +
 +
* LCARS_BorderStyle (e.g. Chat-Window)
 +
* LCARS_ThinBorderStyle (e.g. Summary)
 +
 +
=== Button ===
 +
 +
* GameButton - Templates: // e.g. Economy
 +
** <Trigger Property="Context" Value="HorizontalGroupItem">
 +
** <Trigger Property="DisplayMode" Value="GroupedHorizontally">
 +
** <Trigger Property="DisplayMode" Value="GroupedVertically">
 +
** <Trigger Property="Context" Value="VerticalGroupItem">
 +
** <Trigger Property="DisplayMode" Value="CheckBox">
 +
** <Trigger Property="DisplayMode" Value="Hyperlink">
 +
** <Trigger Property="DisplayMode" Value="Minimal">
 +
** <Trigger Property="DisplayMode" Value="Tiny">
 +
 +
 +
* LCARS_BorderButtonStyle
 +
* LCARS_BorderToggleButtonStyle"    // e.g. CHAT Button in GalaxyMapView
 +
* LCARS_SimpleButtonStyle          // e.g. REDEPLOY-Button
 +
* LCARS_SimpleToggleButtonStyle
 +
   
 +
   
 +
* Default = IsEnable = Current Selection = GREEN = LCARS_Dom3Gradient_Bottom_Top
 +
* MouseOver = PINK GRADIENT = LCARS_Dom2Gradient_Bottom_Top
 +
* IsPressed = PINK = LCARS_Dom1Gradient_Bottom_Top
 +
* IsChecked
 +
 +
=== TextBrush ===
 +
 +
Usage: {StaticResource HeaderTextBrush}
 +
*DefaultTextBrush"
 +
*HeaderTextBrush"
 +
*LCARS_HeaderBrush"
 +
*DisabledTextBrush"
 +
*SelectionBrush"
 +
*BorderBrush"
 +
 +
----
 +
 +
* ControlTextForegroundBrushKey
 +
 +
* HeaderTextForegroundBrushKey
 +
 +
* DefaultTextForegroundBrushKey
 +
 +
* ImageBorderBrushKey
 +
 +
* DisabledTextForegroundBrushKey
 +
 +
* HighlightBrushKey
 +
 +
* InactiveHighlightBrushKey
 +
 +
* AlertTextForegroundBrushKey
 +
 +
* HighlightBrushKey
  
 
== Colour ==
 
== Colour ==
Line 49: Line 120:
 
== SUMMARY ==
 
== SUMMARY ==
  
* SitRepEntry.cs
+
SitReps are a part of CivManager of a Civilization...
 +
 
 +
* SitRepEntry.cs (contains a Global SitRep-Function and special ones)
 +
 
 +
* SitRepDialog.xaml ( = Dialog )
 +
* SitRepDialog.xaml.cs ( Logic for Dialog = Filter on/off )
 +
 
 +
== Context Menu ==
 +
 
 +
* SupremacyClient\themes\Dominion\GameContextMenu.xaml
 +
* GalaxyScreenView.xaml
 +
 
  
 
== Bottom View ==
 
== Bottom View ==
Line 76: Line 158:
  
 
== F2 ==
 
== F2 ==
 +
 +
=== Right ===
 +
 +
* SystemProductionPanel.cs (without any xaml file !)
 +
 +
=== Left ===
 +
 +
* ColonyHandlingListView.cs
  
 
== F3 ==
 
== F3 ==

Latest revision as of 11:39, 20 December 2020

Intro

some words to UI....

  • starting a game starts every of the five screens at the same time ! (Map/System/...)
  • inside the screens it is mostly jumping to the last selected tab (e.g. System: Production or Shipbuilding)
    • these complete screens are done by different parts:
      • left top: Template like SystemInfo
      • left bottom: Template like BuildQueue
      • right: ProductionScreen
      • right bottom: Planets...


Theme

  • Themes are appearance of each Empire's UI.
Common stuff is content of Global.xaml

Empire's themes are defined in Shared.xaml

Shared.xaml

Parts and Structure of each Shared.xaml could be (but is not ..take Klingons as an example, not the Federation sharing a lot of stuff with Global.xaml)

Border

  • LCARS_BorderStyle (e.g. Chat-Window)
  • LCARS_ThinBorderStyle (e.g. Summary)

Button

  • GameButton - Templates: // e.g. Economy
    • <Trigger Property="Context" Value="HorizontalGroupItem">
    • <Trigger Property="DisplayMode" Value="GroupedHorizontally">
    • <Trigger Property="DisplayMode" Value="GroupedVertically">
    • <Trigger Property="Context" Value="VerticalGroupItem">
    • <Trigger Property="DisplayMode" Value="CheckBox">
    • <Trigger Property="DisplayMode" Value="Hyperlink">
    • <Trigger Property="DisplayMode" Value="Minimal">
    • <Trigger Property="DisplayMode" Value="Tiny">


  • LCARS_BorderButtonStyle
  • LCARS_BorderToggleButtonStyle" // e.g. CHAT Button in GalaxyMapView
  • LCARS_SimpleButtonStyle // e.g. REDEPLOY-Button
  • LCARS_SimpleToggleButtonStyle


  • Default = IsEnable = Current Selection = GREEN = LCARS_Dom3Gradient_Bottom_Top
  • MouseOver = PINK GRADIENT = LCARS_Dom2Gradient_Bottom_Top
  • IsPressed = PINK = LCARS_Dom1Gradient_Bottom_Top
  • IsChecked

TextBrush

Usage: {StaticResource HeaderTextBrush}

  • DefaultTextBrush"
  • HeaderTextBrush"
  • LCARS_HeaderBrush"
  • DisabledTextBrush"
  • SelectionBrush"
  • BorderBrush"

  • ControlTextForegroundBrushKey
  • HeaderTextForegroundBrushKey
  • DefaultTextForegroundBrushKey
  • ImageBorderBrushKey
  • DisabledTextForegroundBrushKey
  • HighlightBrushKey
  • InactiveHighlightBrushKey
  • AlertTextForegroundBrushKey
  • HighlightBrushKey

Colour

LightBlue

  • Research
  • Dilithium

Red

  • Deuterium

Silver

  • Intelligence

Gray

  • Duranium = Rax Materials

Goldrod

  • Energy
  • Total Population in EmpireInfo

Borg

  • LCARS_GreenTextBrush
  • DarkGreen

ClientApp

  • SupremacyClient\ClientApp.xaml.cs - this is the main app - starting at "EntryPoint"
  • SupremacyClient\ClientWindow.xaml.cs - this is the main window

MultiplayerSetupScreen

  • MultiplayerSetupScreen.xaml + MultiplayerSetupScreen.xaml.cs

SUMMARY

SitReps are a part of CivManager of a Civilization...

  • SitRepEntry.cs (contains a Global SitRep-Function and special ones)
  • SitRepDialog.xaml ( = Dialog )
  • SitRepDialog.xaml.cs ( Logic for Dialog = Filter on/off )

Context Menu

  • SupremacyClient\themes\Dominion\GameContextMenu.xaml
  • GalaxyScreenView.xaml


Bottom View

various parts are filled in

PlanetsViewRegion

  • \SupremacyUI\StarSystemPanel.cs

AssignedShipListRegion

  • AssignedShipListRegion

PART_ChatPanel

  • PART_ChatPanel

F1

  • GalaxyScreenView.xaml (Race specific)
  • Expander EmpireInfo > EmpireInfoView.xaml


F2

Right

  • SystemProductionPanel.cs (without any xaml file !)

Left

  • ColonyHandlingListView.cs

F3

  • NewDiplomacyScreen.xaml + NewDiplomacyScreen.xaml.cs
  • DiplomacyScreenViewModel.cs
  • \SupremacyCore\Diplomacy\DiplomacyHelper.cs
  • DiplomatAI.cs
  • ForeignPowerViewModel.cs
  • DiplomacyMessageViewModel.cs and more


  • AcceptProposalVisitor.cs
  • RejectProposalVisitor.cs

F4

F5

  • AssetsScreen.xaml + AssetsScreen.xaml.cs
    • TAB: Colonies -> a) Headline directly in AssetsScreen.xaml
    • TAB: Colonies -> b) ColonyList ="{Binding Path=Colonies} -> SystemListItem.xaml (+.cs)
    • TAB: SpyReport -> b)
  • AssetsScreenPresentationModel.cs


  • ActiveAgreementViewModel.cs

F11

  • File:CheatMenu.xaml + File:CheatMenu.xaml.cs

CTRL+F11

  • FakeDialog.xaml + FakeDialog.xaml.cs

ClientSettings

  • ClientSettings.cs - stuff is written into file > ClientSettings.xaml

CTRL+O

  • ClientOptionsDialog.xaml + ClientOptionsDialog.xaml.cs

File:ClientOptionsDialog.xaml

  • File:ClientOptionsDialog.xaml

CTRL+Z

  • ClientTracesDialog.xaml + ClientTracesDialog.xaml.cs

File:TracesOptionsPage.xaml

  • File:TracesOptionsPage.xaml + File:TracesOptionsPage.xaml.cs

GameOptionsPanel

at Starting

  • GameOptionsPanel.xaml + GameOptionsPanel.xaml.cs

LoadGameDialog

  • LoadGameDialog.xaml.cs
  • SavedGameHeader.cs ( Header checks the save game version if the file is compatible)

Files

  • ClientSettings.xaml

Important Code Files

  • ClientModule.cs ... starts the App and 'ends' at StartScreen..
  • ClientOptions ... like Music Volume
  • GameEngine.cs ... start for example a SinglePlayerGame or MultiPlayerGame
    • Do....
  • GameOptions like GalaxySize
  • SupremacyCore\Game\CivilizationManager.cs ... handling Empires and other Civilizations

Sector

    • contains a System, Nebulas are also a System
    • a system might contain a Colony (which is a inhabitanted system)
    • a colony might have Planets (and them moons)
  • Colony.cs ... doing stuff for a single Colony

Civilization

  • CivilizationManager.cs > contains the civilizations (current credits and more)
  • Civilization.cs > only stuff from Civilization.xaml like Name

SAVELOAD

  • SavedGameHeader.cs = Header (Name of saved file, version nummer (!!) and more)
  • SavedGameManager.cs = saving Game