diff --git a/android/Images.Skin/Skins/Minimal/roundedEdgeRectangle-mid-border.9.png b/android/Images.Skin/Skins/Minimal/roundedEdgeRectangle-mid-border.9.png new file mode 100644 index 0000000000..2cdf550fd1 Binary files /dev/null and b/android/Images.Skin/Skins/Minimal/roundedEdgeRectangle-mid-border.9.png differ diff --git a/android/Images.Skin/Skins/Minimal/roundedEdgeRectangle-mid.9.png b/android/Images.Skin/Skins/Minimal/roundedEdgeRectangle-mid.9.png new file mode 100644 index 0000000000..5aaa9a5a42 Binary files /dev/null and b/android/Images.Skin/Skins/Minimal/roundedEdgeRectangle-mid.9.png differ diff --git a/android/Images.Skin/Skins/Minimal/roundedTopEdgeRectangle-small-border.9.png b/android/Images.Skin/Skins/Minimal/roundedTopEdgeRectangle-small-border.9.png new file mode 100644 index 0000000000..141ddcea89 Binary files /dev/null and b/android/Images.Skin/Skins/Minimal/roundedTopEdgeRectangle-small-border.9.png differ diff --git a/android/Images.Skin/Skins/Minimal/roundedTopEdgeRectangle-small.9.png b/android/Images.Skin/Skins/Minimal/roundedTopEdgeRectangle-small.9.png new file mode 100644 index 0000000000..e8a0f76ac1 Binary files /dev/null and b/android/Images.Skin/Skins/Minimal/roundedTopEdgeRectangle-small.9.png differ diff --git a/android/Images/OtherIcons/Capital.png b/android/Images/OtherIcons/Capital.png new file mode 100644 index 0000000000..2c864f9a35 Binary files /dev/null and b/android/Images/OtherIcons/Capital.png differ diff --git a/android/Images/OtherIcons/Fire.png b/android/Images/OtherIcons/Fire.png index f68b8f97a5..fb85dcca76 100644 Binary files a/android/Images/OtherIcons/Fire.png and b/android/Images/OtherIcons/Fire.png differ diff --git a/android/Images/OtherIcons/Puppet.png b/android/Images/OtherIcons/Puppet.png index b2cc0f637f..6f38cd4614 100644 Binary files a/android/Images/OtherIcons/Puppet.png and b/android/Images/OtherIcons/Puppet.png differ diff --git a/android/Images/StatIcons/CityConnection.png b/android/Images/StatIcons/CityConnection.png index 681cbe1b3f..91a7dddaf3 100644 Binary files a/android/Images/StatIcons/CityConnection.png and b/android/Images/StatIcons/CityConnection.png differ diff --git a/android/Images/StatIcons/Resistance.png b/android/Images/StatIcons/Resistance.png index e604012f69..280d8fb1fb 100644 Binary files a/android/Images/StatIcons/Resistance.png and b/android/Images/StatIcons/Resistance.png differ diff --git a/android/assets/Skin.atlas b/android/assets/Skin.atlas index c397eef4c0..d7cb473130 100644 --- a/android/assets/Skin.atlas +++ b/android/assets/Skin.atlas @@ -1,12 +1,12 @@ Skin.png -size: 128, 128 +size: 512, 64 format: RGBA8888 filter: Linear, Linear repeat: none Skins/Minimal/checkbox rotate: false - xy: 52, 16 + xy: 291, 23 size: 31, 31 split: 0, 0, 0, 0 orig: 31, 31 @@ -14,7 +14,7 @@ Skins/Minimal/checkbox index: -1 Skins/Minimal/checkbox-pressed rotate: false - xy: 64, 55 + xy: 252, 23 size: 31, 31 split: 0, 0, 0, 0 orig: 31, 31 @@ -22,7 +22,7 @@ Skins/Minimal/checkbox-pressed index: -1 Skins/Minimal/rectangleWithOutline rotate: false - xy: 112, 121 + xy: 64, 5 size: 3, 3 split: 0, 0, 0, 0 orig: 3, 3 @@ -30,25 +30,59 @@ Skins/Minimal/rectangleWithOutline index: -1 Skins/Minimal/roundedEdgeRectangle rotate: false - xy: 4, 74 + xy: 4, 4 size: 52, 50 split: 19, 20, 19, 21 pad: 12, 13, 7, 7 orig: 52, 50 offset: 0, 0 index: -1 +Skins/Minimal/roundedEdgeRectangle-mid + rotate: false + xy: 110, 16 + size: 38, 38 + split: 17, 17, 15, 15 + pad: 17, 17, -1, -1 + orig: 38, 38 + offset: 0, 0 + index: -1 +Skins/Minimal/roundedEdgeRectangle-mid-border + rotate: false + xy: 64, 16 + size: 38, 38 + split: 18, 18, 18, 18 + orig: 38, 38 + offset: 0, 0 + index: -1 Skins/Minimal/roundedEdgeRectangle-small rotate: false - xy: 4, 4 + xy: 330, 30 size: 24, 24 split: 10, 10, 10, 10 pad: 10, 10, 2, 2 orig: 24, 24 offset: 0, 0 index: -1 +Skins/Minimal/roundedTopEdgeRectangle-small + rotate: false + xy: 394, 42 + size: 24, 12 + split: 10, 10, 10, 0 + pad: 10, 10, -1, -1 + orig: 24, 12 + offset: 0, 0 + index: -1 +Skins/Minimal/roundedTopEdgeRectangle-small-border + rotate: false + xy: 362, 42 + size: 24, 12 + split: 10, 10, 10, 0 + orig: 24, 12 + offset: 0, 0 + index: -1 Skins/Minimal/select-box rotate: false - xy: 64, 94 + xy: 204, 24 size: 40, 30 split: 7, 9, 7, 7 orig: 40, 30 @@ -56,7 +90,7 @@ Skins/Minimal/select-box index: -1 Skins/Minimal/select-box-pressed rotate: false - xy: 4, 36 + xy: 156, 24 size: 40, 30 split: 7, 9, 7, 7 orig: 40, 30 diff --git a/android/assets/Skin.png b/android/assets/Skin.png index 37a6026475..602823a614 100644 Binary files a/android/assets/Skin.png and b/android/assets/Skin.png differ diff --git a/android/assets/game.atlas b/android/assets/game.atlas index b2c900cd00..5ae232f36d 100644 --- a/android/assets/game.atlas +++ b/android/assets/game.atlas @@ -6,434 +6,434 @@ filter: MipMapLinearLinear, MipMapLinearLinear repeat: none CityStateIcons/Cultured rotate: false - xy: 1171, 1828 + xy: 298, 1751 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Maritime rotate: false - xy: 298, 994 + xy: 406, 779 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Mercantile rotate: false - xy: 514, 1210 + xy: 622, 995 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Militaristic rotate: false - xy: 622, 1318 + xy: 730, 1103 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Religious rotate: false - xy: 838, 1294 + xy: 443, 455 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 EmojiIcons/Culture rotate: false - xy: 1918, 1770 + xy: 946, 1581 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Faith rotate: false - xy: 1270, 1020 + xy: 946, 1523 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Food rotate: false - xy: 1378, 1122 + xy: 946, 1465 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Gold rotate: false - xy: 1486, 1230 + xy: 946, 1407 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Artist rotate: false - xy: 1594, 1338 + xy: 946, 1349 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Engineer rotate: false - xy: 1702, 1446 + xy: 946, 1291 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great General rotate: false - xy: 356, 720 + xy: 946, 1233 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Merchant rotate: false - xy: 1004, 906 + xy: 946, 1175 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Scientist rotate: false - xy: 1810, 1604 + xy: 946, 1117 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Happiness rotate: false - xy: 1976, 1770 + xy: 946, 1059 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Production rotate: false - xy: 646, 720 + xy: 946, 653 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Science rotate: false - xy: 896, 805 + xy: 1004, 1713 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Turn rotate: false - xy: 1270, 962 + xy: 1178, 1771 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 ImprovementIcons/Academy rotate: false - xy: 847, 1936 + xy: 971, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Ancient ruins rotate: false - xy: 4, 261 + xy: 4, 153 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Barbarian encampment rotate: false - xy: 4, 45 + xy: 1511, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Camp rotate: false - xy: 1387, 1936 + xy: 1619, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Citadel rotate: false - xy: 1711, 1936 + xy: 1943, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/City center rotate: false - xy: 190, 1688 + xy: 190, 1473 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/City ruins rotate: false - xy: 190, 1580 + xy: 190, 1365 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Customs house rotate: false - xy: 1279, 1828 + xy: 298, 1643 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Farm rotate: false - xy: 112, 369 + xy: 406, 1427 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Fishing Boats rotate: false - xy: 112, 45 + xy: 730, 1751 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Fort rotate: false - xy: 298, 1642 + xy: 406, 1319 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Holy site rotate: false - xy: 622, 1750 + xy: 730, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Landmark rotate: false - xy: 406, 1318 + xy: 406, 995 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Lumber mill rotate: false - xy: 298, 1102 + xy: 298, 779 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Manufactory rotate: false - xy: 514, 1318 + xy: 514, 995 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Mine rotate: false - xy: 730, 1426 + xy: 514, 779 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Moai rotate: false - xy: 298, 886 + xy: 622, 887 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Offshore Platform rotate: false - xy: 298, 778 + xy: 838, 1705 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Oil well rotate: false - xy: 514, 994 + xy: 838, 1489 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Pasture rotate: false - xy: 406, 778 + xy: 838, 1165 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Plantation rotate: false - xy: 622, 778 + xy: 622, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Polder rotate: false - xy: 730, 886 + xy: 730, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Quarry rotate: false - xy: 1054, 1720 + xy: 601, 563 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Railroad rotate: false - xy: 1162, 1720 + xy: 335, 455 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Fallout rotate: false - xy: 1054, 1504 + xy: 659, 455 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Forest rotate: false - xy: 1162, 1612 + xy: 119, 370 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Jungle rotate: false - xy: 1162, 1612 + xy: 119, 370 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Marsh rotate: false - xy: 838, 1187 + xy: 112, 155 size: 100, 99 orig: 100, 99 offset: 0, 0 index: -1 ImprovementIcons/Remove Railroad rotate: false - xy: 946, 1288 + xy: 112, 47 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Road rotate: false - xy: 1054, 1396 + xy: 227, 347 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Repair rotate: false - xy: 1270, 1612 + xy: 443, 347 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Road rotate: false - xy: 1054, 1288 + xy: 220, 131 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Terrace farm rotate: false - xy: 1162, 1078 + xy: 983, 409 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Trading post rotate: false - xy: 1378, 1288 + xy: 976, 193 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/EnhanceReligion rotate: false - xy: 1927, 1828 + xy: 406, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/FoundPantheon rotate: false - xy: 1927, 1828 + xy: 406, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/FoundReligion rotate: false - xy: 1927, 1828 + xy: 406, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/ReformReligion rotate: false - xy: 1927, 1828 + xy: 406, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Faith rotate: false - xy: 1927, 1828 + xy: 406, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/Loading rotate: false - xy: 622, 1534 + xy: 622, 1211 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/Working rotate: false - xy: 622, 1534 + xy: 622, 1211 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Loading rotate: false - xy: 622, 1534 + xy: 622, 1211 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/PickConstruction rotate: false - xy: 514, 778 + xy: 298, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Production rotate: false - xy: 514, 778 + xy: 298, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -447,1113 +447,1120 @@ NotificationIcons/PickPolicy index: -1 NotificationIcons/PickTech rotate: false - xy: 622, 886 + xy: 406, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Science rotate: false - xy: 622, 886 + xy: 406, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/AirSweep rotate: false - xy: 4, 369 + xy: 4, 261 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/AirSweep rotate: false - xy: 4, 369 + xy: 4, 261 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Aircraft rotate: false - xy: 298, 720 + xy: 760, 39 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/ArrowRight rotate: false - xy: 838, 805 + xy: 946, 1755 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 NotificationIcons/MoveAutomatedUnits rotate: false - xy: 838, 805 + xy: 946, 1755 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 NotificationIcons/NextUnit rotate: false - xy: 838, 805 + xy: 946, 1755 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/Movement rotate: false - xy: 838, 805 + xy: 946, 1755 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/BackArrow rotate: false - xy: 946, 906 + xy: 946, 1697 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Banner rotate: false - xy: 1279, 1936 + xy: 1403, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Camera rotate: false - xy: 1328, 1045 + xy: 767, 530 size: 25, 25 orig: 25, 25 offset: 0, 0 index: -1 +OtherIcons/Capital + rotate: false + xy: 4, 477 + size: 107, 101 + orig: 107, 101 + offset: 0, 0 + index: -1 OtherIcons/Checkmark rotate: false - xy: 1603, 1936 + xy: 1835, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/NextTurn rotate: false - xy: 1603, 1936 + xy: 1835, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Circle rotate: false - xy: 4, 1610 + xy: 4, 1611 size: 178, 178 orig: 178, 178 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlag rotate: false - xy: 4, 1610 + xy: 4, 1611 size: 178, 178 orig: 178, 178 offset: 0, 0 index: -1 OtherIcons/Cities rotate: false - xy: 1819, 1936 + xy: 190, 1689 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/CityState rotate: false - xy: 1810, 1662 + xy: 946, 1639 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Close rotate: false - xy: 190, 1364 + xy: 190, 1257 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/CrosshairB rotate: false - xy: 955, 1828 + xy: 169, 609 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Diplomacy rotate: false - xy: 1495, 1828 + xy: 298, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/DiplomacyW rotate: false - xy: 1603, 1828 + xy: 406, 1643 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/DisbandUnit rotate: false - xy: 1711, 1828 + xy: 514, 1751 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/DisbandUnit rotate: false - xy: 1711, 1828 + xy: 514, 1751 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/ExclamationMark rotate: false - xy: 169, 608 + xy: 622, 1751 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Fire rotate: false - xy: 112, 261 + xy: 514, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Hexagon rotate: false - xy: 4, 1796 + xy: 4, 1797 size: 277, 240 orig: 277, 240 offset: 0, 0 index: -1 OtherIcons/Improvements rotate: false - xy: 1062, 906 + xy: 946, 943 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Link rotate: false - xy: 472, 720 + xy: 946, 827 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Load rotate: false - xy: 514, 1426 + xy: 514, 1103 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Lock rotate: false - xy: 730, 1642 + xy: 730, 1319 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/LockSmall rotate: false - xy: 530, 720 + xy: 946, 769 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/MapEditor rotate: false - xy: 622, 1426 + xy: 622, 1103 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/MenuIcon rotate: false - xy: 406, 1102 + xy: 514, 887 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Mods rotate: false - xy: 406, 994 + xy: 730, 995 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Multiplayer rotate: false - xy: 514, 1102 + xy: 622, 779 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Nations rotate: false - xy: 588, 720 + xy: 946, 711 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/New rotate: false - xy: 622, 1210 + xy: 730, 887 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Notifications rotate: false - xy: 730, 1318 + xy: 730, 779 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Options rotate: false - xy: 622, 1102 + xy: 838, 1381 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pencil rotate: false - xy: 622, 994 + xy: 838, 949 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pentagon rotate: false - xy: 730, 1102 + xy: 838, 841 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pillage rotate: false - xy: 730, 994 + xy: 514, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Pillage rotate: false - xy: 730, 994 + xy: 514, 671 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Politics rotate: false - xy: 730, 778 + xy: 838, 733 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/WorldCongressVote rotate: false - xy: 730, 778 + xy: 838, 733 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Present rotate: false - xy: 946, 1720 + xy: 385, 563 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Present rotate: false - xy: 946, 1720 + xy: 385, 563 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Puppet rotate: false - xy: 946, 1612 - size: 100, 100 - orig: 100, 100 + xy: 1943, 1835 + size: 94, 94 + orig: 94, 94 offset: 0, 0 index: -1 OtherIcons/Quest rotate: false - xy: 838, 1402 + xy: 709, 563 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Question rotate: false - xy: 946, 1504 + xy: 817, 517 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Quickstart rotate: false - xy: 1054, 1612 + xy: 227, 455 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Remove Heresy rotate: false - xy: 1270, 1720 + xy: 112, 262 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Resources rotate: false - xy: 838, 1079 + xy: 659, 347 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Resume rotate: false - xy: 946, 1180 + xy: 220, 239 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Search rotate: false - xy: 1270, 1504 + xy: 328, 131 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/SecretOptions rotate: false - xy: 1378, 1612 + xy: 436, 239 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Settings rotate: false - xy: 838, 971 + xy: 544, 239 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Shield rotate: false - xy: 1054, 1180 + xy: 652, 239 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Sleep rotate: false - xy: 1378, 1504 + xy: 328, 23 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Sleep rotate: false - xy: 1378, 1504 + xy: 328, 23 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Speaker rotate: false - xy: 1486, 1612 + xy: 436, 23 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Spy rotate: false - xy: 946, 964 + xy: 767, 409 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Spy_White rotate: false - xy: 1054, 1072 + xy: 767, 301 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Star rotate: false - xy: 1162, 1186 + xy: 760, 199 size: 100, 94 orig: 100, 94 offset: 0, 0 index: -1 OtherIcons/Stop rotate: false - xy: 1594, 1612 + xy: 868, 193 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Stop rotate: false - xy: 1594, 1612 + xy: 868, 193 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/StopMove rotate: false - xy: 1594, 1612 + xy: 868, 193 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Swap rotate: false - xy: 1054, 964 + xy: 925, 517 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Swap rotate: false - xy: 1054, 964 + xy: 925, 517 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Terrains rotate: false - xy: 1868, 1546 + xy: 1004, 1655 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Timer rotate: false - xy: 1270, 1186 + xy: 983, 301 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Triangle rotate: false - xy: 289, 1858 + xy: 289, 1859 size: 178, 178 orig: 178, 178 offset: 0, 0 index: -1 OtherIcons/Turn right rotate: false - xy: 1594, 1504 + xy: 971, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Tyrannosaurus rotate: false - xy: 1702, 1612 + xy: 1079, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Unique rotate: false - xy: 1810, 1720 + xy: 1187, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Wait rotate: false - xy: 1270, 1078 + xy: 1403, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Wait rotate: false - xy: 1270, 1078 + xy: 1403, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Wonders rotate: false - xy: 1702, 1504 + xy: 1835, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/whiteDot rotate: false - xy: 289, 1849 + xy: 289, 1850 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 ResourceIcons/Aluminum rotate: false - xy: 1063, 1936 + xy: 1187, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Bananas rotate: false - xy: 4, 153 + xy: 4, 45 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Cattle rotate: false - xy: 1495, 1936 + xy: 1727, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Citrus rotate: false - xy: 1927, 1936 + xy: 190, 1581 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Coal rotate: false - xy: 190, 1256 + xy: 190, 1149 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Copper rotate: false - xy: 190, 932 + xy: 190, 825 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Cotton rotate: false - xy: 190, 824 + xy: 847, 1813 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Crab rotate: false - xy: 847, 1828 + xy: 190, 717 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Deer rotate: false - xy: 1387, 1828 + xy: 406, 1751 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Dyes rotate: false - xy: 1819, 1828 + xy: 298, 1427 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Fish rotate: false - xy: 112, 153 + xy: 622, 1643 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Furs rotate: false - xy: 406, 1642 + xy: 730, 1643 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Gems rotate: false - xy: 514, 1750 + xy: 298, 1103 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Gold Ore rotate: false - xy: 406, 1534 + xy: 514, 1319 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Horses rotate: false - xy: 298, 1318 + xy: 298, 995 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Incense rotate: false - xy: 514, 1534 + xy: 514, 1211 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Iron rotate: false - xy: 622, 1642 + xy: 622, 1319 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Ivory rotate: false - xy: 730, 1750 + xy: 730, 1427 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Jewelry rotate: false - xy: 298, 1210 + xy: 298, 887 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Marble rotate: false - xy: 730, 1534 + xy: 730, 1211 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Oil rotate: false - xy: 406, 886 + xy: 838, 1597 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Pearls rotate: false - xy: 514, 886 + xy: 838, 1057 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Porcelain rotate: false - xy: 838, 1612 + xy: 277, 563 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Salt rotate: false - xy: 1162, 1396 + xy: 328, 239 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Sheep rotate: false - xy: 946, 1072 + xy: 544, 131 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Silk rotate: false - xy: 1162, 1288 + xy: 652, 131 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Silver rotate: false - xy: 1270, 1396 + xy: 220, 23 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Spices rotate: false - xy: 838, 863 + xy: 652, 23 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Stone rotate: false - xy: 1486, 1504 + xy: 875, 301 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Sugar rotate: false - xy: 1702, 1720 + xy: 868, 85 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Truffles rotate: false - xy: 1486, 1396 + xy: 976, 85 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Uranium rotate: false - xy: 1162, 970 + xy: 1295, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Whales rotate: false - xy: 1378, 1180 + xy: 1511, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Wheat rotate: false - xy: 1486, 1288 + xy: 1619, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Wine rotate: false - xy: 1594, 1396 + xy: 1727, 1829 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Acquire rotate: false - xy: 4, 477 + xy: 4, 369 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/CityConnection rotate: false - xy: 190, 1472 - size: 100, 100 - orig: 100, 100 + xy: 847, 1921 + size: 116, 116 + orig: 116, 116 offset: 0, 0 index: -1 StatIcons/Culture rotate: false - xy: 1063, 1828 + xy: 119, 478 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Food rotate: false - xy: 298, 1750 + xy: 298, 1211 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Gold rotate: false - xy: 298, 1426 + xy: 406, 1211 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Happiness rotate: false - xy: 514, 1642 + xy: 622, 1427 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/InterceptRange rotate: false - xy: 1810, 1546 + xy: 946, 885 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/Malcontent rotate: false - xy: 406, 1210 + xy: 406, 887 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Population rotate: false - xy: 838, 1720 + xy: 838, 625 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Range rotate: false - xy: 704, 720 + xy: 1004, 1771 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/RangedStrength rotate: false - xy: 762, 720 + xy: 1062, 1771 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/ReligiousStrength rotate: false - xy: 946, 1396 + xy: 551, 455 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Resistance rotate: false - xy: 1378, 1720 + xy: 551, 347 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Specialist rotate: false - xy: 1594, 1720 + xy: 544, 23 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Strength rotate: false - xy: 1868, 1604 + xy: 1062, 1713 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 UnitActionIcons/AddInCapital rotate: false - xy: 955, 1936 + xy: 1079, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Automate rotate: false - xy: 1171, 1936 + xy: 1295, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/HurryConstruction rotate: false - xy: 1171, 1936 + xy: 1295, 1937 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/ConductTradeMission rotate: false - xy: 190, 1148 + xy: 190, 1041 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/ConstructImprovement rotate: false - xy: 190, 1040 + xy: 190, 933 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Repair rotate: false - xy: 190, 1040 + xy: 190, 933 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/EnhanceReligion rotate: false - xy: 190, 716 + xy: 514, 1643 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/FoundReligion rotate: false - xy: 190, 716 + xy: 514, 1643 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Explore rotate: false - xy: 112, 477 + xy: 298, 1319 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Fortify rotate: false - xy: 406, 1750 + xy: 514, 1427 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/FortifyUntilHealed rotate: false - xy: 406, 1750 + xy: 514, 1427 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/FoundCity rotate: false - xy: 298, 1534 + xy: 622, 1535 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/HideMore rotate: false - xy: 414, 720 + xy: 946, 1001 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 UnitActionIcons/HurryResearch rotate: false - xy: 406, 1426 + xy: 406, 1103 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Paradrop rotate: false - xy: 730, 1210 + xy: 838, 1273 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/Promote rotate: false - xy: 838, 1510 + xy: 493, 569 size: 100, 94 orig: 100, 94 offset: 0, 0 index: -1 UnitActionIcons/Upgrade rotate: false - xy: 838, 1510 + xy: 493, 569 size: 100, 94 orig: 100, 94 offset: 0, 0 index: -1 UnitActionIcons/RemoveHeresy rotate: false - xy: 1162, 1504 + xy: 335, 347 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/SetUp rotate: false - xy: 1486, 1720 + xy: 436, 131 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitActionIcons/ShowMore rotate: false - xy: 1868, 1662 + xy: 1120, 1771 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 UnitActionIcons/Star rotate: false - xy: 1270, 1294 + xy: 760, 97 size: 100, 94 orig: 100, 94 offset: 0, 0 index: -1 UnitActionIcons/StartGoldenAge rotate: false - xy: 1378, 1396 + xy: 875, 409 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlagCivilian rotate: false - xy: 4, 1385 + xy: 4, 1386 size: 178, 217 orig: 178, 217 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlagEmbark rotate: false - xy: 4, 1167 + xy: 4, 1168 size: 178, 210 orig: 178, 210 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlagFortify rotate: false - xy: 475, 1858 + xy: 475, 1859 size: 178, 178 orig: 178, 178 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlagSelection rotate: false - xy: 4, 981 + xy: 4, 982 size: 178, 178 orig: 178, 178 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlagSelectionCivilian rotate: false - xy: 4, 585 + xy: 4, 586 size: 157, 170 orig: 157, 170 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlagSelectionEmbark rotate: false - xy: 4, 763 + xy: 4, 764 size: 178, 210 orig: 178, 210 offset: 0, 0 index: -1 UnitFlagIcons/UnitFlagSelectionFortify rotate: false - xy: 661, 1858 + xy: 661, 1859 size: 178, 178 orig: 178, 178 offset: 0, 0 diff --git a/android/assets/game.png b/android/assets/game.png index 79b18b4d53..274535b76d 100644 Binary files a/android/assets/game.png and b/android/assets/game.png differ diff --git a/core/src/com/unciv/models/skins/SkinStrings.kt b/core/src/com/unciv/models/skins/SkinStrings.kt index 6e1d0b659f..0331781e58 100644 --- a/core/src/com/unciv/models/skins/SkinStrings.kt +++ b/core/src/com/unciv/models/skins/SkinStrings.kt @@ -11,6 +11,10 @@ class SkinStrings(skin: String = UncivGame.Current.settings.skin) { // Default shapes must always end with "Shape" so the UiElementDocsWriter can identify them val roundedEdgeRectangleSmallShape = skinLocation + "roundedEdgeRectangle-small" + val roundedTopEdgeRectangleSmallShape = skinLocation + "roundedTopEdgeRectangle-small" + val roundedTopEdgeRectangleSmallBorderShape = skinLocation + "roundedTopEdgeRectangle-small-border" + val roundedEdgeRectangleMidShape = skinLocation + "roundedEdgeRectangle-mid" + val roundedEdgeRectangleMidBorderShape = skinLocation + "roundedEdgeRectangle-mid-border" val roundedEdgeRectangleShape = skinLocation + "roundedEdgeRectangle" val rectangleWithOutlineShape = skinLocation + "rectangleWithOutline" val selectBoxShape = skinLocation + "select-box" diff --git a/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt b/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt index d3909810c2..1af2f35138 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreenCityPickerTable.kt @@ -37,11 +37,6 @@ class CityScreenCityPickerTable(private val cityScreen: CityScreen) : Table() { cityNameTable.add(fireImage).size(20f).padRight(5f) } - if (city.isCapital()) { - val starImage = ImageGetter.getImage("OtherIcons/Star").apply { color = Color.LIGHT_GRAY } - cityNameTable.add(starImage).size(20f).padRight(5f) - } - if (city.isPuppet) { val starImage = ImageGetter.getImage("OtherIcons/Puppet").apply { color = Color.LIGHT_GRAY } cityNameTable.add(starImage).size(20f).padRight(5f) @@ -52,6 +47,11 @@ class CityScreenCityPickerTable(private val cityScreen: CityScreen) : Table() { cityNameTable.add(resistanceImage).size(20f).padRight(5f) } + if (city.isCapital()) { + val starImage = ImageGetter.getImage("OtherIcons/Star").apply { color = Color.LIGHT_GRAY } + cityNameTable.add(starImage).size(20f).padRight(5f) + } + val currentCityLabel = city.name.toLabel(fontSize = 30, fontColor = civInfo.nation.getInnerColor()) if (cityScreen.canChangeState) currentCityLabel.onClick { AskTextPopup( diff --git a/core/src/com/unciv/ui/images/ImageGetter.kt b/core/src/com/unciv/ui/images/ImageGetter.kt index 917dc7003b..f2a783e611 100644 --- a/core/src/com/unciv/ui/images/ImageGetter.kt +++ b/core/src/com/unciv/ui/images/ImageGetter.kt @@ -386,16 +386,26 @@ object ImageGetter { .surroundWithThinCircle(techIconColor) } - fun getProgressBarHorizontal(width: Float, height: Float, percentComplete: Float, progressColor: Color, backgroundColor: Color): Group { + fun getProgressBarHorizontal( + width: Float, height: Float, + percentComplete: Float, + progressColor: Color, + backgroundColor: Color): Group { return ProgressBar(width, height, false) .setBackground(backgroundColor) .setProgress(progressColor, percentComplete) } - fun getProgressBarVertical(width: Float, height: Float, percentComplete: Float, progressColor: Color, backgroundColor: Color): Group { + fun getProgressBarVertical( + width: Float, + height: Float, + percentComplete: Float, + progressColor: Color, + backgroundColor: Color, + progressPadding: Float = 0f): Group { return ProgressBar(width, height, true) .setBackground(backgroundColor) - .setProgress(progressColor, percentComplete) + .setProgress(progressColor, percentComplete, padding = progressPadding) } class ProgressBar(width: Float, height: Float, val vertical: Boolean = true):Group() { @@ -427,7 +437,7 @@ object ImageGetter { fun setBackground(color: Color): ProgressBar { background = getWhiteDot() - background?.color = color + background?.color = color.cpy() background?.setSize(width, height) //clamp between 0 and 1 background?.toBack() background?.center(this) @@ -436,34 +446,44 @@ object ImageGetter { return this } - fun setSemiProgress(color: Color, percentage: Float): ProgressBar { + fun setSemiProgress(color: Color, percentage: Float, padding: Float = 0f): ProgressBar { secondaryPercentage = percentage secondaryProgress = getWhiteDot() - secondaryProgress?.color = color + secondaryProgress?.color = color.cpy() if (vertical) - secondaryProgress?.setSize(width, height * max(min(percentage, 1f),0f)) + secondaryProgress?.setSize(width-padding*2, height * max(min(percentage, 1f),0f)) else - secondaryProgress?.setSize(width * max(min(percentage, 1f),0f), height) - if (secondaryProgress != null) + secondaryProgress?.setSize(width * max(min(percentage, 1f),0f), height-padding*2) + if (secondaryProgress != null) { addActor(secondaryProgress) + if (vertical) + secondaryProgress?.centerX(this) + else + secondaryProgress?.centerY(this) + } return this } - fun setProgress(color: Color, percentage: Float): ProgressBar { + fun setProgress(color: Color, percentage: Float, padding: Float = 0f): ProgressBar { primaryPercentage = percentage primaryProgress = getWhiteDot() - primaryProgress?.color = color + primaryProgress?.color = color.cpy() if (vertical) - primaryProgress?.setSize(width, height * max(min(percentage, 1f),0f)) + primaryProgress?.setSize(width-padding*2, height * max(min(percentage, 1f),0f)) else - primaryProgress?.setSize(width * max(min(percentage, 1f),0f), height) - if (primaryProgress != null) + primaryProgress?.setSize(width * max(min(percentage, 1f),0f), height-padding*2) + if (primaryProgress != null) { addActor(primaryProgress) + if (vertical) + primaryProgress?.centerX(this) + else + primaryProgress?.centerY(this) + } return this } } - fun getHealthBar(currentHealth: Float, maxHealth: Float, healthBarSize: Float): Table { + fun getHealthBar(currentHealth: Float, maxHealth: Float, healthBarSize: Float, height: Float=5f): Table { val healthPercent = currentHealth / maxHealth val healthBar = Table() @@ -473,10 +493,10 @@ object ImageGetter { healthPercent > 1 / 3f -> Color.ORANGE else -> Color.RED } - healthBar.add(healthPartOfBar).size(healthBarSize * healthPercent, 5f) + healthBar.add(healthPartOfBar).size(healthBarSize * healthPercent, height) val emptyPartOfBar = getDot(Color.BLACK) - healthBar.add(emptyPartOfBar).size(healthBarSize * (1 - healthPercent), 5f) + healthBar.add(emptyPartOfBar).size(healthBarSize * (1 - healthPercent), height) healthBar.pad(1f) healthBar.pack() diff --git a/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt index b22733d24a..430e286765 100644 --- a/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/PolicyPickerScreen.kt @@ -77,7 +77,9 @@ fun Policy.isPickable() : Boolean { } class PolicyButton(val policy: Policy, size: Float = 30f) : BorderedTable( - style = BaseScreen.skinStrings.roundedEdgeRectangleSmallShape, + path = "PolicyScreen/PolicyButton", + defaultBorder = BaseScreen.skinStrings.roundedEdgeRectangleSmallShape, + defaultInner = BaseScreen.skinStrings.roundedEdgeRectangleSmallShape, borderSize = 2f ) { @@ -93,10 +95,10 @@ class PolicyButton(val policy: Policy, size: Float = 30f) : BorderedTable( init { icon.setSize(size*0.7f, size*0.7f) - highlight.setSize(size*1.35f, size*1.35f) + highlight.setSize(size*1.38f, size*1.38f) addActor(icon) - add(highlight).center() + addActor(highlight) updateState() pack() @@ -595,7 +597,10 @@ class PolicyPickerScreen(val worldScreen: WorldScreen, civInfo: CivilizationInfo Colors.policyNotPickable} } - val table = BorderedTable(style = skinStrings.roundedEdgeRectangleSmallShape, innerColor = color, borderSize = 2f) + val table = BorderedTable( + defaultInner = skinStrings.roundedEdgeRectangleSmallShape, + defaultBorder = skinStrings.roundedEdgeRectangleSmallShape, + innerColor = color, borderSize = 2f) table.add(label).minHeight(30f).minWidth(150f).growX() table.addActor(lockIcon) diff --git a/core/src/com/unciv/ui/tilegroups/CityButton.kt b/core/src/com/unciv/ui/tilegroups/CityButton.kt index d8fbe25b15..42762847de 100644 --- a/core/src/com/unciv/ui/tilegroups/CityButton.kt +++ b/core/src/com/unciv/ui/tilegroups/CityButton.kt @@ -7,31 +7,57 @@ import com.badlogic.gdx.scenes.scene2d.Actor import com.badlogic.gdx.scenes.scene2d.Group import com.badlogic.gdx.scenes.scene2d.Touchable import com.badlogic.gdx.scenes.scene2d.actions.Actions -import com.badlogic.gdx.scenes.scene2d.ui.Label +import com.badlogic.gdx.scenes.scene2d.ui.Image import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.utils.Align +import com.unciv.Constants import com.unciv.logic.battle.CityCombatant import com.unciv.logic.city.CityConstructions import com.unciv.logic.city.CityInfo import com.unciv.logic.city.INonPerpetualConstruction import com.unciv.logic.city.PerpetualConstruction import com.unciv.logic.civilization.diplomacy.RelationshipLevel +import com.unciv.models.translations.tr import com.unciv.ui.cityscreen.CityReligionInfoTable import com.unciv.ui.cityscreen.CityScreen import com.unciv.ui.images.ImageGetter import com.unciv.ui.popup.Popup import com.unciv.ui.trade.DiplomacyScreen import com.unciv.ui.utils.BaseScreen +import com.unciv.ui.utils.BorderedTable import com.unciv.ui.utils.Fonts import com.unciv.ui.utils.extensions.brighten +import com.unciv.ui.utils.extensions.center import com.unciv.ui.utils.extensions.centerX -import com.unciv.ui.utils.extensions.centerY +import com.unciv.ui.utils.extensions.colorFromRGB import com.unciv.ui.utils.extensions.onClick -import com.unciv.ui.utils.extensions.setFontSize +import com.unciv.ui.utils.extensions.setSize +import com.unciv.ui.utils.extensions.surroundWithCircle +import com.unciv.ui.utils.extensions.surroundWithThinCircle +import com.unciv.ui.utils.extensions.toGroup import com.unciv.ui.utils.extensions.toLabel import kotlin.math.max import kotlin.math.min +object Colors { + + val construction = colorFromRGB(196,140,62) + val growh = colorFromRGB(130,225,78) + +} + +class IconTable(borderColor: Color, innerColor: Color, borderSize: Float, borderOnTop:Boolean=true): BorderedTable( + path = "WorldScreen/CityButton/IconTable", + defaultInner = BaseScreen.skinStrings.roundedEdgeRectangleMidShape, + defaultBorder = BaseScreen.skinStrings.roundedEdgeRectangleMidBorderShape, + borderColor = borderColor, + innerColor = innerColor, + borderSize = borderSize, + borderOnTop = borderOnTop +) { + override fun draw(batch: Batch?, parentAlpha: Float) { super.draw(batch, parentAlpha) } +} + class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Table(BaseScreen.skin){ val worldScreen = tileGroup.worldScreen val uncivGame = worldScreen.game @@ -51,10 +77,8 @@ class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Tab clear() setButtonActions() addAirUnitTable() - if (showAdditionalInfoTags && city.health < city.getMaxHealth().toFloat()) { - val healthBar = ImageGetter.getHealthBar(city.health.toFloat(), city.getMaxHealth().toFloat(), 100f) - add(healthBar).row() - } + + add(getDefenceTable()).row() iconTable = getIconTable() add(iconTable).row() @@ -62,12 +86,21 @@ class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Tab if (city.civInfo.isCityState() && city.civInfo.knows(worldScreen.viewingCiv)) { val diplomacyManager = city.civInfo.getDiplomacyManager(worldScreen.viewingCiv) val influenceBar = getInfluenceBar(diplomacyManager.getInfluence(), diplomacyManager.relationshipLevel()) - add(influenceBar).row() + add(influenceBar).padTop(1f).row() } - + add(getStatuses()).padTop(3f) pack() + + if (showAdditionalInfoTags && city.health < city.getMaxHealth().toFloat()) { + val healthBar = ImageGetter.getHealthBar(city.health.toFloat(), + city.getMaxHealth().toFloat(), 100f, 3f) + addActor(healthBar) + healthBar.center(this) + healthBar.y = iconTable.y + iconTable.height-healthBar.height - 1f + } + setOrigin(Align.center) centerX(tileGroup) @@ -128,9 +161,9 @@ class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Tab setOrigin(Align.center) if (!isButtonMoved) { rotation = 180f - setPosition(positionX - width/2, 0f) + setPosition(positionX - width/2, -height) } else - setPosition(positionX - width/2, -height/4) // height compensation because of asymmetrical icon + setPosition(positionX - width/2, -height) // height compensation because of asymmetrical icon } iconTable.addActor(indicator) listOfHiddenUnitMarkers.add(indicator) @@ -187,102 +220,127 @@ class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Tab } } - private fun getIconTable(forPopup: Boolean = false): Table { - val secondaryColor = city.civInfo.nation.getInnerColor() - class IconTable: Table() { - override fun draw(batch: Batch?, parentAlpha: Float) { super.draw(batch, parentAlpha) } + private fun getDefenceTable(forPopup: Boolean = false): Group { + val borderColor = if (city.civInfo == worldScreen.viewingCiv) + colorFromRGB(255, 237, 200) else Color.BLACK + + val table = BorderedTable( + path="WorldScreen/CityButton/DefenceTable", + innerColor = Color.BLACK, + borderColor = borderColor, + defaultInner = BaseScreen.skinStrings.roundedTopEdgeRectangleSmallShape, + defaultBorder = BaseScreen.skinStrings.roundedTopEdgeRectangleSmallBorderShape, + borderSize = 5f) + table.pad(2f, 3f, 0f, 3f) + + val cityStrength = CityCombatant(city).getDefendingStrength() + val cityStrengthLabel = "${Fonts.strength}$cityStrength".toLabel(fontSize = 12) + cityStrengthLabel.setAlignment(Align.center) + + if (!forPopup) + table.add(cityStrengthLabel).grow().center() + return table + } + + private fun getStatuses() : Table { + + val table = Table() + + if (belongsToViewingCiv() && city.isConnectedToCapital() && !city.isCapital()) { + val connectionImage = ImageGetter.getStatIcon("CityConnection") + table.add(connectionImage).size(16f) } - val iconTable = IconTable().apply { isTransform = false } - iconTable.touchable = Touchable.enabled - iconTable.background = BaseScreen.skinStrings.getUiBackground("WorldScreen/CityButton/IconTable", BaseScreen.skinStrings.roundedEdgeRectangleShape, city.civInfo.nation.getOuterColor()) if (city.isInResistance()) { val resistanceImage = ImageGetter.getImage("StatIcons/Resistance") - iconTable.add(resistanceImage).size(20f).padLeft(5f) + table.add(resistanceImage).size(16f).padLeft(2f) } if (city.isPuppet) { val puppetImage = ImageGetter.getImage("OtherIcons/Puppet") - puppetImage.color = secondaryColor - iconTable.add(puppetImage).size(20f).padLeft(5f) + table.add(puppetImage).size(16f).padLeft(2f) } if (city.isBeingRazed) { val fireImage = ImageGetter.getImage("OtherIcons/Fire") - iconTable.add(fireImage).size(20f).padLeft(5f) + table.add(fireImage).size(16f).padLeft(2f) } + return table + + } + + private fun getIconTable(forPopup: Boolean = false): Table { + val secondaryColor = city.civInfo.nation.getInnerColor() + val borderColor = if (city.civInfo == worldScreen.viewingCiv) + colorFromRGB(233, 233, 172) else Color.BLACK + val borderSize = if (city.civInfo == worldScreen.viewingCiv) 4f else 2f /* 7 */ + + val iconTable = IconTable( + borderColor = borderColor, + innerColor = city.civInfo.nation.getOuterColor().cpy().apply { a = 0.9f }, + borderSize = borderSize + ).apply { + isTransform = false + } + iconTable.pad(0f).padLeft(5f) + iconTable.touchable = Touchable.enabled + + val popGroup = getPopulationGroup(uncivGame.viewEntireMapForDebug + || belongsToViewingCiv() + || worldScreen.viewingCiv.isSpectator()) + val popGroupCell = iconTable.add(popGroup).minHeight(34f) + + val labelTable = Table() if (city.isCapital()) { if (city.civInfo.isCityState()) { val cityStateImage = ImageGetter.getNationIcon("CityState") - .apply { color = secondaryColor } - iconTable.add(cityStateImage).size(20f).padLeft(5f) + .apply { color = secondaryColor } + labelTable.add(cityStateImage).size(20f).padRight(5f) } else { - val starImage = ImageGetter.getImage("OtherIcons/Star").apply { color = Color.LIGHT_GRAY } - iconTable.add(starImage).size(20f).padLeft(5f) + val starImage = ImageGetter.getImage("OtherIcons/Capital") + labelTable.add(starImage).size(20f).padRight(5f) } - } else if (belongsToViewingCiv() && city.isConnectedToCapital()) { - val connectionImage = ImageGetter.getStatIcon("CityConnection") - connectionImage.color = secondaryColor - iconTable.add(connectionImage).size(20f).padLeft(5f) } - val populationGroup = getPopulationGroup(uncivGame.viewEntireMapForDebug - || belongsToViewingCiv() - || worldScreen.viewingCiv.isSpectator()) - iconTable.add(populationGroup).padLeft(5f) - populationGroup.toBack() + val cityButtonText = city.name.tr() + val label = cityButtonText.toLabel(secondaryColor).apply { setAlignment(Align.center) } + labelTable.add(label).growY().center() - val cityButtonText = city.name - val label = cityButtonText.toLabel(secondaryColor) - val rightPadding = if (city.civInfo.isCityState()) 10f else 20f // CS needs less padding here as there will be an icon - iconTable.add(label).padRight(rightPadding).padLeft(20f) // sufficient horizontal padding - .fillY() // provide full-height clicking area - label.toBack() // this is so the label is rendered right before the population group, - // so we save the font texture and avoid another texture switch - - val cityStrength = CityCombatant(city).getDefendingStrength() - val cityStrengthLabel = - "${Fonts.strength}$cityStrength".toLabel(city.civInfo.nation.getInnerColor(), 10) if (!forPopup) { - // City strength is added NOT inside the table, but rather - top-center to it - iconTable.addActor(cityStrengthLabel) // We create this here to we can .toBack() it as well. - cityStrengthLabel.toBack() + val cityReligion = city.religion.getMajorityReligion() + if (cityReligion != null) { + val religionImage = ImageGetter.getReligionImage(cityReligion.getIconName()).apply { + color = secondaryColor }.toGroup(20f) + labelTable.add(religionImage).size(20f).padLeft(5f) + } } + labelTable.pack() + iconTable.add(labelTable).padLeft(10f).padRight(10f).expandY().minHeight(32f).center() + label.toFront() + if (city.civInfo.isCityState()) { val cityStateImage = ImageGetter.getImage("CityStateIcons/" +city.civInfo.cityStateType.name).apply { color = secondaryColor } - iconTable.add(cityStateImage).size(20f).fillY() + iconTable.padLeft(10f) + iconTable.add(cityStateImage).size(20f).fillY().padRight(5f) } if (uncivGame.viewEntireMapForDebug || belongsToViewingCiv() || worldScreen.viewingCiv.isSpectator()) { val constructionGroup = getConstructionGroup(city.cityConstructions) iconTable.add(constructionGroup) - constructionGroup.toBack() // We do this so the construction group is right before the label. - // What we end up with is construction group > label > population group. - // Since the label in the construction group is rendered *last* (toFront()), - // and the two labels in the the population group are rendered *first* (toBack()), - // What we get is that ALL 4 LABELS are rendered one after the other, - // and so the glyph texture only needs to be swapped in once rather than 4 times! :) } else if (city.civInfo.isMajorCiv()) { val nationIcon = ImageGetter.getNationIcon(city.civInfo.nation.name) nationIcon.color = secondaryColor - iconTable.add(nationIcon).size(20f) - } - - if (!forPopup) { - val cityReligion = city.religion.getMajorityReligion() - if (cityReligion != null) { - val religionImage = ImageGetter.getReligionImage(cityReligion.getIconName()).apply { color = city.civInfo.nation.getInnerColor() } - iconTable.add(religionImage).size(20f).padLeft(5f).fillY() - } + iconTable.add(nationIcon).size(20f).padRight(7f) + popGroupCell.padLeft(5f) } + if (city.civInfo == worldScreen.viewingCiv) + iconTable.bgBorder.toFront() + else + iconTable.bgBorder.toBack() iconTable.pack() - if (!forPopup) { - cityStrengthLabel.x = label.x // so it'll be aligned right above the city name - cityStrengthLabel.setY(iconTable.height, Align.top) - } return iconTable } @@ -309,23 +367,20 @@ class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Tab } private fun getPopulationGroup(showGrowth: Boolean): Group { - val growthGreen = Color(0.0f, 0.5f, 0.0f, 1.0f) - - - class PopulationGroup:Group() { // for recognition in the profiler - override fun draw(batch: Batch?, parentAlpha: Float) { super.draw(batch, parentAlpha) } + val secondaryColor = city.civInfo.nation.getInnerColor() + val table = Table().apply { isTransform = false } + val popLabel = city.population.population.toString() + .toLabel(fontColor = secondaryColor, fontSize = 18).apply { + setAlignment(Align.center) } - val group = PopulationGroup().apply { isTransform=false } + table.add(popLabel).minHeight(30f).apply { + if (showGrowth) + minWidth(26f) + else + minWidth(17f) + }.pad(0f) - val populationLabel = city.population.population.toLabel() - populationLabel.color = city.civInfo.nation.getInnerColor() - - group.addActor(populationLabel) - - val groupHeight = 25f - var groupWidth = populationLabel.width - if (showGrowth) groupWidth += 12f - group.setSize(groupWidth, groupHeight) + table.pack() if (showGrowth) { var growthPercentage = city.population.foodStored / city.population.getFoodToNextPopulation().toFloat() @@ -335,83 +390,64 @@ class CityButton(val city: CityInfo, private val tileGroup: WorldTileGroup): Tab // Without it, it caused the growth bar's height to exceed that of the group's. if (growthPercentage > 1) growthPercentage = 1.0f - val growthBar = ImageGetter.getProgressBarVertical(2f, groupHeight, - if (city.isStarving()) 1.0f else growthPercentage, - if (city.isStarving()) Color.RED else growthGreen, Color.BLACK) - growthBar.x = populationLabel.width + 3 - growthBar.centerY(group) + val growthBar = ImageGetter.getProgressBarVertical(4f, 30f, + if (city.isStarving()) 1.0f else growthPercentage, + if (city.isStarving()) Color.RED else Colors.growh, Color.BLACK, 1f) + growthBar.color.a = 0.8f + table.add(growthBar).padTop(1f).padBottom(1f) - group.addActor(growthBar) - - val turnLabel: Label = when { + val turnLabelText = when { city.isGrowing() -> { val turnsToGrowth = city.getNumTurnsToNewPopulation() - if (turnsToGrowth != null && turnsToGrowth < 100) turnsToGrowth.toString().toLabel() else "∞".toLabel() + if (turnsToGrowth != null && turnsToGrowth < 100) turnsToGrowth.toString() else "∞" } city.isStarving() -> { val turnsToStarvation = city.getNumTurnsToStarvation() - if (turnsToStarvation != null && turnsToStarvation < 100) turnsToStarvation.toString().toLabel() else "∞".toLabel() + if (turnsToStarvation != null && turnsToStarvation < 100) turnsToStarvation.toString() else "∞" } - else -> "∞".toLabel() + else -> "∞" } - turnLabel.color = city.civInfo.nation.getInnerColor() - turnLabel.setFontSize(14) - turnLabel.pack() - group.addActor(turnLabel) - turnLabel.toBack() // this is so both labels are rendered next to each other - - // this is important because when switching to a label, we switch out the texture we're using to use the font texture, - // so this has a direct impact on framerate! - turnLabel.x = growthBar.x + growthBar.width + 1 + val turnLabel = turnLabelText.toLabel(fontColor = secondaryColor, fontSize = 13) + table.add(turnLabel).expandY().bottom().padLeft(3f) + turnLabel.toBack() } - populationLabel.centerY(group) - - return group + return table } private fun getConstructionGroup(cityConstructions: CityConstructions): Group { + val secondaryColor = city.civInfo.nation.getInnerColor() val cityCurrentConstruction = cityConstructions.getCurrentConstruction() - class ConstructionGroup : Group() { // for recognition in the profiler - override fun draw(batch: Batch?, parentAlpha: Float) { - super.draw(batch, parentAlpha) - } - } + val table = Table().apply { isTransform = false } + val tableHeight = 30f - val group = ConstructionGroup().apply { isTransform = false } - val groupHeight = 25f - val groupWidth = if (cityCurrentConstruction is PerpetualConstruction) 15f else 40f - group.setSize(groupWidth, groupHeight) if (cityConstructions.currentConstructionFromQueue.isNotEmpty()) { - val constructionImage = ImageGetter.getPortraitImage(cityCurrentConstruction.name, 25f) - constructionImage.centerY(group) - constructionImage.x = group.width - constructionImage.width - group.addActor(constructionImage) + + if (cityCurrentConstruction !is PerpetualConstruction) { + val turnsToConstruction = cityConstructions.turnsToConstruction(cityCurrentConstruction.name) + val label = (if (turnsToConstruction < 100) turnsToConstruction.toString() else "∞").toLabel(secondaryColor, 13) + + table.add(label).expandY().bottom().padRight(3f) + + val constructionPercentage = cityConstructions.getWorkDone(cityCurrentConstruction.name) / + (cityCurrentConstruction as INonPerpetualConstruction).getProductionCost(cityConstructions.cityInfo.civInfo).toFloat() + val productionBar = ImageGetter.getProgressBarVertical(4f, tableHeight, constructionPercentage, + Colors.construction, Color.BLACK, 1f) + productionBar.color.a = 0.8f + + table.add(productionBar).padTop(1f).padBottom(1f) + } + + val constructionImage = ImageGetter.getPortraitImage(cityCurrentConstruction.name, 24f) + table.add(constructionImage).minHeight(32f).minWidth(26f) + .expand().center().right().pad(0f).padRight(4f).padLeft(3f) + table.pack() } - val secondaryColor = cityConstructions.cityInfo.civInfo.nation.getInnerColor() - if (cityCurrentConstruction !is PerpetualConstruction) { - val turnsToConstruction = cityConstructions.turnsToConstruction(cityCurrentConstruction.name) - val label = (if (turnsToConstruction < 100) turnsToConstruction.toString() else "∞").toLabel(secondaryColor, 14) - label.pack() - group.addActor(label) - val constructionPercentage = cityConstructions.getWorkDone(cityCurrentConstruction.name) / - (cityCurrentConstruction as INonPerpetualConstruction).getProductionCost(cityConstructions.cityInfo.civInfo).toFloat() - val productionBar = ImageGetter.getProgressBarVertical(2f, groupHeight, constructionPercentage, - Color.BROWN.brighten(0.5f), Color.BLACK) - productionBar.x = 10f - label.x = productionBar.x - label.width - 3 - group.addActor(productionBar) - productionBar.toBack() // Since the production bar is based on whiteDot.png in the MAIN texture, - // and the constructionImage may be a building or unit which have their own textures, - // we move the production bar's rendering to be next to the circle's rendering, - // so we have circle - bar - constructionImage - label (2 texture switches and ending with label) - // which is the minimal amount of switches we can have here - label.toFront() - } - return group + return table } private fun foreignCityInfoPopup() { diff --git a/core/src/com/unciv/ui/utils/BorderedTable.kt b/core/src/com/unciv/ui/utils/BorderedTable.kt index 6650b34f7f..8ce04ed5ad 100644 --- a/core/src/com/unciv/ui/utils/BorderedTable.kt +++ b/core/src/com/unciv/ui/utils/BorderedTable.kt @@ -1,44 +1,64 @@ package com.unciv.ui.utils import com.badlogic.gdx.graphics.Color +import com.badlogic.gdx.scenes.scene2d.Actor +import com.badlogic.gdx.scenes.scene2d.ui.Cell import com.badlogic.gdx.scenes.scene2d.ui.Image import com.badlogic.gdx.scenes.scene2d.ui.Table import com.unciv.ui.utils.extensions.center open class BorderedTable( - val style: String = BaseScreen.skinStrings.rectangleWithOutlineShape, + val path: String = "", + val defaultInner: String = BaseScreen.skinStrings.rectangleWithOutlineShape, + val defaultBorder: String = BaseScreen.skinStrings.rectangleWithOutlineShape, + val borderColor: Color = Color.WHITE, val innerColor: Color = Color.BLACK, - val borderSize: Float = 5f + val borderSize: Float = 5f, + val borderOnTop: Boolean = false ) : Table() { - private var bgBorder: Image = Image(BaseScreen.skinStrings.getUiBackground("", style, Color.WHITE)) - private var bgInner: Image = Image(BaseScreen.skinStrings.getUiBackground("", style, innerColor)) + var bgBorder: Image = Image(BaseScreen.skinStrings.getUiBackground(path, defaultBorder, borderColor)) + var bgInner: Image = Image(BaseScreen.skinStrings.getUiBackground(path, defaultInner, innerColor)) init { - this.addActor(bgBorder) + if (borderSize != 0f) + this.addActor(bgBorder) this.addActor(bgInner) - bgInner.toBack() - bgBorder.toBack() + + if (borderOnTop) { + if (borderSize != 0f) + bgBorder.toBack() + bgInner.toBack() + } else { + bgInner.toBack() + if (borderSize != 0f) + bgBorder.toBack() + } } fun setBackgroundColor(color: Color) { bgInner.remove() - bgInner = Image(BaseScreen.skinStrings.getUiBackground("", style, color)) + bgInner = Image(BaseScreen.skinStrings.getUiBackground(path, defaultInner, color)) addActor(bgInner) - bgInner.zIndex = bgBorder.zIndex + 1 + if (borderSize != 0f) { + if (borderOnTop) + bgBorder.zIndex = bgInner.zIndex + 1 + else + bgInner.zIndex = bgBorder.zIndex + 1 + } sizeChanged() - } override fun sizeChanged() { super.sizeChanged() - bgBorder.setSize(width + borderSize, height + borderSize) + if (borderSize != 0f) + bgBorder.setSize(width + borderSize, height + borderSize) bgInner.setSize(width, height) - bgBorder.center(this) + if (borderSize != 0f) + bgBorder.center(this) bgInner.center(this) - } } diff --git a/core/src/com/unciv/ui/utils/extensions/Scene2dExtensions.kt b/core/src/com/unciv/ui/utils/extensions/Scene2dExtensions.kt index 9d9105e479..5a21460b7d 100644 --- a/core/src/com/unciv/ui/utils/extensions/Scene2dExtensions.kt +++ b/core/src/com/unciv/ui/utils/extensions/Scene2dExtensions.kt @@ -313,7 +313,7 @@ fun Actor.surroundWithCircle(size: Float, resizeActor: Boolean = true, color: Co return IconCircleGroup(size, this, resizeActor, color) } -fun Actor.surroundWithThinCircle(color: Color=Color.BLACK): IconCircleGroup = surroundWithCircle(width*1.05f, false, color) +fun Actor.surroundWithThinCircle(color: Color=Color.BLACK): IconCircleGroup = surroundWithCircle(width+2f, false, color) fun Actor.addBorder(size:Float, color: Color, expandCell:Boolean = false): Table { diff --git a/docs/Credits.md b/docs/Credits.md index c5adee5f1e..32338aa19c 100644 --- a/docs/Credits.md +++ b/docs/Credits.md @@ -676,7 +676,7 @@ Unless otherwise specified, all the following are from [the Noun Project](https: - [Aircraft](https://thenounproject.com/search/?q=aircraft&i=1629000) By Tom Fricker for aircraft icon in city button - [radar scan](https://thenounproject.com/search/?q=range&i=1500234) By icon 54 for Range - [short range radar](https://thenounproject.com/search/?q=air%20range&i=2612731) by Vectors Point for Intercept range -- [Puppet](https://thenounproject.com/search/?q=puppet&i=285735) By Ben Davis for puppeted cities +- Puppet by [vegeta1k95](https://github.com/veget1k95) based on [Puppet](https://thenounproject.com/search/?q=puppet&i=285735) by Ben Davis, for puppeted cities - [City](https://thenounproject.com/search/?q=city&i=1765370) By Muhajir ila Robbi in the Icon center - [Lock](https://thenounproject.com/search/?q=lock&i=3217613) by Vadim Solomakhin for locked tiles - [Hourglass](https://thenounproject.com/search/?q=hourglass&i=142268) by I Create Stuff for the 'Turn' icon diff --git a/docs/Modders/Creating-a-UI-skin.md b/docs/Modders/Creating-a-UI-skin.md index 36c9f7df43..b4bf1e339e 100644 --- a/docs/Modders/Creating-a-UI-skin.md +++ b/docs/Modders/Creating-a-UI-skin.md @@ -104,7 +104,6 @@ These shapes are used all over Unciv and can be replaced to make a lot of UI ele | WorldScreen/ | TutorialTaskTable | null | | | WorldScreen/ | UnitTable | null | | | WorldScreen/CityButton/ | AirUnitTable | roundedEdgeRectangle | | -| WorldScreen/CityButton/ | IconTable | roundedEdgeRectangle | | | WorldScreen/CityButton/ | InfluenceBar | null | | | WorldScreen/Minimap/ | Background | null | | | WorldScreen/Minimap/ | Border | null | |