GUI

From BotF2-Wiki
Jump to: navigation, search

Intro

previously there was only one GUI: Federation style, but have a look to (old) Romulan GUI

2017

In 2017 work was done to create a race specific UI for the empires including Borg and Terran Empire (Mirror Universe)

It's not directly possible to adapt the UIs. They are hardcoded.

By installing Visual Studio Community version and downloading the >> Source Code (both for free), you can change the code: - inside the code in SupremacyClient \themes\Dominion\Shared.xaml: In this shared-Files the shared content for all Dominion screens are set. (In addition in \themes\Global.xaml more settings are done which are needed all over the game and each empire - have a look there if you don't find it in Shared.xaml)

Structures

The structures of game's UI are quite difficult (as far as we see it...). Coding the game began about 2006 ... that time WPF was state of the art.

  • Mostly we have screens in e.g. in \Mainline\SupremacyClient\themes\Dominion\GalaxyScreenView.xaml
  • these screens are binded to ONE code file e.g. \Mainline\SupremacyClientComponents\Views\GalaxyScreen\GalaxyScreenPresentationModel.cs e.g. delivering the description of a facility
  • general settings like colors and more are taken from Global.xaml or the race specific Shared.xaml
  • some stuff in the the resource folder of the game e.g. \Resources\UI\Romulans\ColonyScreen\rom_shipyard_dock.png
  • localized textes are sometimes taken from \Resources\Text

Parts

  • GameOptionMenu (e.g. GalaxySize)
    • used in SinglePlayerStartScreen and also in MultiPlayerStartScreen

old

see also Images: http://botf2.square7.ch/wiki-files/UI/UI.html

Thread:


For example: (finally all these files must be "%race%\ColonyScreen\shipyard_dock.png")

  • \Resources\UI\Federation\ColonyScreen\shipyard_dock.png -> used: \SupremacyClientComponents\Themes\ShipyardDockView.xaml(245): <Image Source="vfs:///Resources/UI/Federation/ColonyScreen/shipyard_dock.png" />
  • \Resources\UI\Romulans\ColonyScreen\rom_shipyard_dock.png -> not used (2014-02-06)
  • \Resources\UI\Klingons\ColonyScreen\Kling_Shipyard_Dock.png -> not used (2014-02-06)
  • \Resources\UI\Cardassians\ColonyScreen\card_shipyard_dock.png -> not used (2014-02-06)
  • \Resources\UI\Dominion\ColonyScreen\dom_shipyard_dock.png -> not used (2014-02-06)


Context Menu

  • popup.png 280x245 (Background of PopUpMenu)
  • others: 80x98 -> with size problems just reduce to 60x74