mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-16 16:04:11 +00:00
Move player info panel to top of the screen & simplify (#3087)
related to #2260 ## Description: * Moves the player info panel from the right to the top of the screen * Disable the header ad for now because it would cover up the player info, we'll find a better place for it in the future * Remove the collapsable button/functionality. It's hard to even click the button because the panel disappears when you move away from a player, and I think the info is too valuable to ever need to be collapsed. * Removed the "land" and "irradiated land" since it didn't add much value * Remove all alt text & translation, you can't hover over the player overlay so it's irrelevant. * put troop info inside the troop bar to reduce amount of text <img width="479" height="88" alt="Screenshot 2026-02-01 at 8 57 33 PM" src="https://github.com/user-attachments/assets/3b72eb16-2efa-4c00-a4d0-5e085548fa78" /> <img width="438" height="136" alt="Screenshot 2026-02-01 at 8 58 06 PM" src="https://github.com/user-attachments/assets/285bb2c9-6deb-4ee8-bcc8-743cccd6b77e" /> ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
@@ -13,6 +13,7 @@ import { Layer } from "./Layer";
|
||||
import warshipIcon from "/images/BattleshipIconWhite.svg?url";
|
||||
import cityIcon from "/images/CityIconWhite.svg?url";
|
||||
import factoryIcon from "/images/FactoryIconWhite.svg?url";
|
||||
import goldCoinIcon from "/images/GoldCoinIcon.svg?url";
|
||||
import mirvIcon from "/images/MIRVIcon.svg?url";
|
||||
import missileSiloIcon from "/images/MissileSiloIconWhite.svg?url";
|
||||
import hydrogenBombIcon from "/images/MushroomCloudIconWhite.svg?url";
|
||||
@@ -256,11 +257,11 @@ export class UnitDisplay extends LitElement implements Layer {
|
||||
<div class="p-2">
|
||||
${translateText("build_menu.desc." + structureKey)}
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center justify-center gap-1">
|
||||
<img src=${goldCoinIcon} width="13" height="13" />
|
||||
<span class="text-yellow-300"
|
||||
>${renderNumber(this.cost(unitType))}</span
|
||||
>
|
||||
${translateText("player_info_overlay.gold")}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user