diff --git a/android/Images/OtherIcons/Politics-diagram-bg.png b/android/Images/OtherIcons/Politics-diagram-bg.png new file mode 100644 index 0000000000..23086d7d33 Binary files /dev/null and b/android/Images/OtherIcons/Politics-diagram-bg.png differ diff --git a/android/Images/OtherIcons/Politics-diagram-bg.readme.txt b/android/Images/OtherIcons/Politics-diagram-bg.readme.txt new file mode 100644 index 0000000000..01cdeaeba6 --- /dev/null +++ b/android/Images/OtherIcons/Politics-diagram-bg.readme.txt @@ -0,0 +1,7 @@ +Used in GlobalPoliticsOverviewTable.DiagramLegendPopup as "easter egg" background. + +Uses 256x256 pixels in its atlas - at the time of adding it, there was ample leftover room, +but once the main atlas fill up, please move to another or even its own little atlas, +and maybe drop this file. + +Will be seldom used! diff --git a/android/assets/UnitFlags.png b/android/assets/UnitFlags.png deleted file mode 100644 index c38a4403b2..0000000000 Binary files a/android/assets/UnitFlags.png and /dev/null differ diff --git a/android/assets/game.atlas b/android/assets/game.atlas index b8c4fa12b4..f2e42a4f22 100644 --- a/android/assets/game.atlas +++ b/android/assets/game.atlas @@ -6,1456 +6,1463 @@ filter: MipMapLinearLinear, MipMapLinearLinear repeat: none CityStateIcons/Cultured rotate: false - xy: 127, 1219 + xy: 142, 1207 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Maritime rotate: false - xy: 1939, 1823 + xy: 691, 1673 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Mercantile rotate: false - xy: 535, 1577 + xy: 730, 1457 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Militaristic rotate: false - xy: 643, 1592 + xy: 730, 1349 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Religious rotate: false - xy: 1723, 1499 + xy: 544, 143 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 EmojiIcons/Automate rotate: false - xy: 436, 432 + xy: 1239, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Culture rotate: false - xy: 436, 258 + xy: 1413, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Death rotate: false - xy: 436, 200 + xy: 1471, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Faith rotate: false - xy: 436, 142 + xy: 1529, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Food rotate: false - xy: 436, 84 + xy: 1587, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Gold rotate: false - xy: 494, 432 + xy: 1703, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Artist rotate: false - xy: 494, 374 + xy: 1761, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Engineer rotate: false - xy: 494, 316 + xy: 1819, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great General rotate: false - xy: 494, 258 + xy: 1877, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Merchant rotate: false - xy: 494, 200 + xy: 1123, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Scientist rotate: false - xy: 494, 142 + xy: 1181, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Happiness rotate: false - xy: 494, 84 + xy: 1239, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Production rotate: false - xy: 544, 1087 + xy: 1877, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Science rotate: false - xy: 544, 913 + xy: 946, 1420 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Turn rotate: false - xy: 544, 797 + xy: 1164, 1637 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 ImprovementIcons/Academy rotate: false - xy: 736, 1931 + xy: 4, 976 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Ancient ruins rotate: false - xy: 952, 1931 + xy: 4, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Barbarian encampment rotate: false - xy: 4, 693 + xy: 1253, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Camp rotate: false - xy: 1276, 1931 + xy: 4, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Cancel improvement order rotate: false - xy: 4, 477 + xy: 1469, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Stop rotate: false - xy: 4, 477 + xy: 1469, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Citadel rotate: false - xy: 1492, 1931 + xy: 4, 220 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/City center rotate: false - xy: 4, 153 + xy: 1793, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/City ruins rotate: false - xy: 1708, 1931 + xy: 4, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Customs house rotate: false - xy: 119, 1111 + xy: 127, 1099 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Farm rotate: false - xy: 535, 1793 + xy: 682, 1226 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Fishing Boats rotate: false - xy: 643, 1808 + xy: 466, 1115 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Fort rotate: false - xy: 751, 1823 + xy: 682, 1118 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Holy site rotate: false - xy: 1075, 1823 + xy: 112, 436 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Landmark rotate: false - xy: 1399, 1715 + xy: 220, 775 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Lumber mill rotate: false - xy: 1615, 1715 + xy: 220, 343 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Manufactory rotate: false - xy: 1723, 1715 + xy: 220, 127 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Mine rotate: false - xy: 751, 1607 + xy: 790, 1241 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Moai rotate: false - xy: 859, 1607 + xy: 790, 1133 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Offshore Platform rotate: false - xy: 1615, 1607 + xy: 328, 343 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Oil well rotate: false - xy: 1831, 1607 + xy: 328, 127 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Pasture rotate: false - xy: 412, 1529 + xy: 436, 1007 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Plantation rotate: false - xy: 514, 1145 + xy: 436, 575 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Polder rotate: false - xy: 643, 1484 + xy: 544, 683 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Quarry rotate: false - xy: 1183, 1499 + xy: 436, 251 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Railroad rotate: false - xy: 1615, 1499 + xy: 436, 35 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Fallout rotate: false - xy: 1939, 1499 + xy: 652, 1007 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Forest rotate: false - xy: 751, 1391 + xy: 652, 899 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Jungle rotate: false - xy: 751, 1391 + xy: 652, 899 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Marsh rotate: false - xy: 967, 1392 + xy: 652, 684 size: 100, 99 orig: 100, 99 offset: 0, 0 index: -1 ImprovementIcons/Remove Railroad rotate: false - xy: 1075, 1391 + xy: 652, 576 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Road rotate: false - xy: 1183, 1391 + xy: 652, 468 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Repair rotate: false - xy: 1291, 1391 + xy: 652, 360 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Road rotate: false - xy: 1615, 1391 + xy: 652, 36 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Terrace farm rotate: false - xy: 328, 671 + xy: 1000, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Trading post rotate: false - xy: 328, 455 + xy: 1216, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/EnhanceReligion rotate: false - xy: 112, 139 + xy: 358, 1223 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/FoundPantheon rotate: false - xy: 112, 139 + xy: 358, 1223 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/FoundReligion rotate: false - xy: 112, 139 + xy: 358, 1223 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/ReformReligion rotate: false - xy: 112, 139 + xy: 358, 1223 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Faith rotate: false - xy: 112, 139 - size: 100, 100 - orig: 100, 100 - offset: 0, 0 - index: -1 -NotificationIcons/Loading - rotate: false - xy: 1507, 1715 - size: 100, 100 - orig: 100, 100 - offset: 0, 0 - index: -1 -NotificationIcons/Working - rotate: false - xy: 1507, 1715 - size: 100, 100 - orig: 100, 100 - offset: 0, 0 - index: -1 -OtherIcons/Loading - rotate: false - xy: 1507, 1715 + xy: 358, 1223 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/PickConstruction rotate: false - xy: 520, 1469 + xy: 544, 899 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Production rotate: false - xy: 520, 1469 + xy: 544, 899 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/PickPolicy rotate: false - xy: 4, 4 + xy: 2009, 1986 size: 33, 33 orig: 33, 33 offset: 0, 0 index: -1 NotificationIcons/PickTech rotate: false - xy: 514, 1361 + xy: 436, 683 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Science rotate: false - xy: 514, 1361 + xy: 436, 683 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/AirSweep rotate: false - xy: 844, 1931 + xy: 4, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Aircraft rotate: false - xy: 235, 1269 + xy: 1123, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/ArrowRight rotate: false - xy: 443, 1147 + xy: 1181, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 NotificationIcons/MoveAutomatedUnits rotate: false - xy: 443, 1147 + xy: 1181, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 NotificationIcons/NextUnit rotate: false - xy: 443, 1147 + xy: 1181, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/Movement rotate: false - xy: 443, 1147 + xy: 1181, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/BackArrow rotate: false - xy: 436, 374 + xy: 1297, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Banner rotate: false - xy: 1060, 1931 + xy: 4, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitTypeIcons/UnitTypes rotate: false - xy: 1060, 1931 + xy: 4, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Blockade rotate: false - xy: 289, 1715 + xy: 553, 1889 size: 130, 130 orig: 130, 130 offset: 0, 0 index: -1 OtherIcons/Camera rotate: false - xy: 475, 1868 + xy: 298, 1328 size: 25, 25 orig: 25, 25 offset: 0, 0 index: -1 OtherIcons/Capital rotate: false - xy: 4, 1125 + xy: 814, 1918 size: 107, 101 orig: 107, 101 offset: 0, 0 index: -1 OtherIcons/Checkmark rotate: false - xy: 4, 369 + xy: 1577, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/NextTurn rotate: false - xy: 4, 369 + xy: 1577, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Circle rotate: false - xy: 289, 1853 + xy: 4, 1345 size: 178, 178 orig: 178, 178 offset: 0, 0 index: -1 OtherIcons/Cities rotate: false - xy: 4, 261 + xy: 1685, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/CityState rotate: false - xy: 436, 316 + xy: 1355, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/CityStatus rotate: false - xy: 1816, 1931 + xy: 190, 1423 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Close rotate: false - xy: 1924, 1931 + xy: 475, 1655 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/CrosshairB rotate: false - xy: 298, 1268 + xy: 298, 1469 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Diplomacy rotate: false - xy: 112, 895 + xy: 235, 1099 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/DiplomacyW rotate: false - xy: 112, 787 + xy: 406, 1439 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/DisbandUnit rotate: false - xy: 112, 679 + xy: 406, 1331 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/ExclamationMark rotate: false - xy: 112, 31 + xy: 466, 1223 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Fire rotate: false - xy: 4, 1234 + xy: 553, 1766 size: 115, 115 orig: 115, 115 offset: 0, 0 index: -1 OtherIcons/ForwardArrow rotate: false - xy: 436, 26 + xy: 1645, 1753 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Hexagon rotate: false - xy: 4, 1791 + xy: 4, 1779 size: 277, 240 orig: 277, 240 offset: 0, 0 index: -1 OtherIcons/HexagonOutline rotate: false - xy: 4, 1543 + xy: 4, 1531 size: 277, 240 orig: 277, 240 offset: 0, 0 index: -1 OtherIcons/Improvements rotate: false - xy: 494, 26 + xy: 1297, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Keyboard rotate: false - xy: 1399, 1823 + xy: 220, 883 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Link rotate: false - xy: 552, 447 + xy: 1413, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Load rotate: false - xy: 1507, 1823 + xy: 220, 667 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +OtherIcons/Loading + rotate: false + xy: 220, 559 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +NotificationIcons/Loading + rotate: false + xy: 220, 559 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +NotificationIcons/Working + rotate: false + xy: 220, 559 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/LockSmall rotate: false - xy: 552, 389 + xy: 1471, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/MapEditor rotate: false - xy: 1831, 1823 + xy: 220, 19 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/MenuIcon rotate: false - xy: 1939, 1715 + xy: 691, 1565 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Mods rotate: false - xy: 967, 1607 + xy: 328, 991 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Multiplayer rotate: false - xy: 1075, 1607 + xy: 328, 883 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/NationSwap rotate: false - xy: 1183, 1607 + xy: 328, 775 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Nations rotate: false - xy: 552, 99 + xy: 1761, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/New rotate: false - xy: 1291, 1607 + xy: 328, 667 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Notifications rotate: false - xy: 1507, 1607 + xy: 328, 451 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Options rotate: false - xy: 1939, 1607 + xy: 328, 19 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pause rotate: false - xy: 552, 41 + xy: 1819, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Pencil rotate: false - xy: 406, 1313 + xy: 544, 1007 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pentagon rotate: false - xy: 406, 1205 + xy: 436, 791 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pillage rotate: false - xy: 514, 1253 + xy: 544, 791 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Politics rotate: false - xy: 751, 1499 + xy: 436, 467 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/WorldCongressVote rotate: false - xy: 751, 1499 + xy: 436, 467 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 +OtherIcons/Politics-diagram-bg + rotate: false + xy: 289, 1763 + size: 256, 256 + orig: 256, 256 + offset: 0, 0 + index: -1 OtherIcons/Present rotate: false - xy: 1075, 1499 + xy: 544, 467 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Puppet rotate: false - xy: 289, 1592 + xy: 691, 1904 size: 115, 115 orig: 115, 115 offset: 0, 0 index: -1 OtherIcons/Quest rotate: false - xy: 1291, 1499 + xy: 544, 359 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Question rotate: false - xy: 1399, 1499 + xy: 436, 143 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Quickstart rotate: false - xy: 1507, 1499 + xy: 544, 251 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Remove Heresy rotate: false - xy: 859, 1391 + xy: 652, 791 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Resources rotate: false - xy: 1399, 1391 + xy: 652, 252 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Resume rotate: false - xy: 1507, 1391 + xy: 652, 144 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Search rotate: false - xy: 1831, 1391 + xy: 760, 902 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/SecretOptions rotate: false - xy: 1939, 1391 + xy: 760, 794 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Settings rotate: false - xy: 227, 1111 + xy: 760, 686 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Shield rotate: false - xy: 220, 895 + xy: 760, 470 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Sleep rotate: false - xy: 220, 571 + xy: 760, 146 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Speaker rotate: false - xy: 220, 463 + xy: 760, 38 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Spy rotate: false - xy: 220, 139 + xy: 799, 1580 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Spy_White rotate: false - xy: 220, 31 + xy: 838, 1472 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Star rotate: false - xy: 335, 1103 + xy: 838, 1370 size: 100, 94 orig: 100, 94 offset: 0, 0 index: -1 OtherIcons/Swap rotate: false - xy: 328, 779 + xy: 892, 1810 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Timer rotate: false - xy: 328, 563 + xy: 1108, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Triangle rotate: false - xy: 4, 1357 + xy: 289, 1577 size: 178, 178 orig: 178, 178 offset: 0, 0 index: -1 OtherIcons/Turn right rotate: false - xy: 328, 239 + xy: 1432, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Tyrannosaurus rotate: false - xy: 328, 131 + xy: 1540, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/WLTKD rotate: false - xy: 436, 490 + xy: 1015, 1630 size: 83, 65 orig: 83, 65 offset: 0, 0 index: -1 OtherIcons/Wait rotate: false - xy: 436, 995 + xy: 1756, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Wonders rotate: false - xy: 436, 563 + xy: 1015, 1703 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/whiteDot rotate: false - xy: 289, 1583 + xy: 289, 1568 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 ResourceIcons/Aluminum rotate: false - xy: 4, 909 + xy: 1037, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Bananas rotate: false - xy: 4, 801 + xy: 1145, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Cattle rotate: false - xy: 1384, 1931 + xy: 4, 328 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Citrus rotate: false - xy: 1600, 1931 + xy: 4, 112 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Coal rotate: false - xy: 190, 1435 + xy: 583, 1658 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Copper rotate: false - xy: 190, 1327 + xy: 190, 1315 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Cotton rotate: false - xy: 298, 1484 + xy: 475, 1547 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Crab rotate: false - xy: 298, 1376 + xy: 583, 1550 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Deer rotate: false - xy: 112, 1003 + xy: 250, 1207 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Dyes rotate: false - xy: 112, 247 + xy: 622, 1334 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Fish rotate: false - xy: 535, 1685 + xy: 358, 1115 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Furs rotate: false - xy: 751, 1715 + xy: 112, 976 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Gems rotate: false - xy: 859, 1823 + xy: 112, 868 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Gold Ore rotate: false - xy: 967, 1823 + xy: 112, 652 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Horses rotate: false - xy: 1075, 1715 + xy: 112, 328 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Incense rotate: false - xy: 1183, 1823 + xy: 112, 220 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Iron rotate: false - xy: 1183, 1715 + xy: 112, 112 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Ivory rotate: false - xy: 1291, 1823 + xy: 112, 4 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Jewelry rotate: false - xy: 1291, 1715 + xy: 220, 991 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Marble rotate: false - xy: 1831, 1715 + xy: 676, 1781 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Oil rotate: false - xy: 1723, 1607 + xy: 328, 235 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Pearls rotate: false - xy: 406, 1421 + xy: 436, 899 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Porcelain rotate: false - xy: 967, 1499 + xy: 436, 359 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Salt rotate: false - xy: 1723, 1391 + xy: 760, 1010 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Sheep rotate: false - xy: 220, 1003 + xy: 760, 578 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Silk rotate: false - xy: 220, 787 + xy: 760, 362 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Silver rotate: false - xy: 220, 679 + xy: 760, 254 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Spices rotate: false - xy: 220, 247 + xy: 799, 1688 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Stone rotate: false - xy: 328, 995 + xy: 898, 1262 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Sugar rotate: false - xy: 328, 887 + xy: 898, 1154 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Truffles rotate: false - xy: 328, 347 + xy: 1324, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Uranium rotate: false - xy: 328, 23 + xy: 1648, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Whales rotate: false - xy: 436, 887 + xy: 1864, 1811 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Wheat rotate: false - xy: 436, 779 + xy: 907, 1702 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Wine rotate: false - xy: 436, 671 + xy: 907, 1594 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Acquire rotate: false - xy: 4, 1017 + xy: 929, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/CityConnection rotate: false - xy: 475, 1901 + xy: 4, 1207 size: 130, 130 orig: 130, 130 offset: 0, 0 index: -1 StatIcons/Culture rotate: false - xy: 427, 1745 + xy: 298, 1361 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Food rotate: false - xy: 643, 1700 + xy: 574, 1115 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Gold rotate: false - xy: 859, 1715 + xy: 112, 760 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Happiness rotate: false - xy: 967, 1715 + xy: 112, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/InterceptRange rotate: false - xy: 527, 505 + xy: 1355, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/Malcontent rotate: false - xy: 1723, 1823 + xy: 220, 235 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Population rotate: false - xy: 859, 1499 + xy: 544, 575 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/Worked rotate: false - xy: 859, 1499 + xy: 544, 575 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Range rotate: false - xy: 544, 1029 + xy: 946, 1536 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/RangedStrength rotate: false - xy: 544, 971 + xy: 946, 1478 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/ReligiousStrength rotate: false - xy: 1831, 1499 + xy: 544, 35 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Resistance rotate: false - xy: 613, 1916 + xy: 4, 1084 size: 115, 115 orig: 115, 115 offset: 0, 0 index: -1 StatIcons/Specialist rotate: false - xy: 220, 355 + xy: 784, 1796 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Strength rotate: false - xy: 544, 855 + xy: 1106, 1637 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 TileIcons/Blockaded rotate: false - xy: 1168, 1931 + xy: 4, 544 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/Buy rotate: false - xy: 4, 585 + xy: 1361, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/CityCenter rotate: false - xy: 4, 45 + xy: 1901, 1919 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/Locked rotate: false - xy: 1615, 1823 + xy: 220, 451 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/MapOverlayToggleMovement rotate: false - xy: 552, 331 + xy: 1529, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 TileIcons/MapOverlayToggleResources rotate: false - xy: 552, 273 + xy: 1587, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 TileIcons/MapOverlayToggleWorkedTiles rotate: false - xy: 552, 215 + xy: 1645, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 TileIcons/MapOverlayToggleYields rotate: false - xy: 552, 157 + xy: 1703, 1695 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 TileIcons/NotWorked rotate: false - xy: 1399, 1607 + xy: 328, 559 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UniqueIcons/Fallback rotate: false - xy: 427, 1637 + xy: 574, 1223 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitTypeIcons/DomainAir rotate: false - xy: 112, 571 + xy: 514, 1439 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitTypeIcons/DomainLand rotate: false - xy: 112, 463 + xy: 514, 1331 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Terrains rotate: false - xy: 112, 463 + xy: 514, 1331 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitTypeIcons/DomainWater rotate: false - xy: 112, 355 + xy: 622, 1442 size: 100, 100 orig: 100, 100 offset: 0, 0 diff --git a/android/assets/game.png b/android/assets/game.png index 9cf92033a0..5155b2ea29 100644 Binary files a/android/assets/game.png and b/android/assets/game.png differ diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 636236c5e2..2ca7cc3858 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -1424,6 +1424,7 @@ Number of your cities\ndemanding this resource for\n'We Love The King Day' = Politics = Show global politics = Show diagram = +Diagram line colors = At war with [enemy] = Defensive pact with [civName] = Friends with [civName] = diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index c948b8f439..26b4418fa0 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -19,7 +19,8 @@ import kotlin.math.max import kotlin.math.sign enum class RelationshipLevel(val color: Color) { - // War is tested separately for the Diplomacy Screen. Colored RED. + // DiplomaticStatus.War is tested separately for the Diplomacy Screen. Colored RED. + // DiplomaticStatus.DefensivePact - similar. Colored CYAN. Unforgivable(Color.FIREBRICK), Enemy(Color.YELLOW), Afraid(Color(0x5300ffff)), // HSV(260,100,100) diff --git a/core/src/com/unciv/ui/components/widgets/ShadowedLabel.kt b/core/src/com/unciv/ui/components/widgets/ShadowedLabel.kt new file mode 100644 index 0000000000..b49e9fe886 --- /dev/null +++ b/core/src/com/unciv/ui/components/widgets/ShadowedLabel.kt @@ -0,0 +1,59 @@ +package com.unciv.ui.components.widgets + +import com.badlogic.gdx.graphics.Color +import com.badlogic.gdx.scenes.scene2d.Touchable +import com.badlogic.gdx.scenes.scene2d.ui.Label +import com.badlogic.gdx.scenes.scene2d.ui.Stack +import com.badlogic.gdx.utils.Align +import com.unciv.Constants +import com.unciv.models.translations.tr +import com.unciv.ui.components.extensions.toLabel + +/** + * A widget containing two [Label]s superimposed with an offset to create a shadow effect. + * + * Reported [prefWidth], [prefHeight], [minWidth] and [minHeight] are always those of the Label plus `shadowOffset` + * + * @param text The label text (sic), autotranslated + * @param fontSize as the name says + * @param labelColor as the name says + * @param shadowColor as the name says + * @param hideIcons passed to [translation function][String.tr] + * @param shadowOffset displacement distance of the shadow to right and to bottom + */ + +class ShadowedLabel( + text: String, + fontSize: Int = Constants.defaultFontSize, + labelColor: Color = Color.WHITE, + shadowColor: Color = Color.BLACK, + hideIcons: Boolean = true, + shadowOffset: Float = 1f +) : Stack() { + private val widthWithShadow: Float + private val heightWithShadow: Float + + init { + touchable = Touchable.disabled + val shadow = text.toLabel(shadowColor, fontSize, Align.bottomRight, hideIcons) + shadow.touchable = Touchable.disabled + addActor(shadow) + val label = text.toLabel(labelColor, fontSize, Align.topLeft, hideIcons) + label.touchable = Touchable.disabled + addActor(label) + + shadow.zIndex = 0 + // Displace the shadow under the label by shadowOffset. + // Extending our size is enough due to their different Align values. + widthWithShadow = label.prefWidth + shadowOffset + heightWithShadow = label.prefHeight + shadowOffset + setSize(width + shadowOffset, height + shadowOffset) + } + + override fun getPrefWidth() = widthWithShadow + override fun getPrefHeight() = heightWithShadow + // A Label has min=pref, but Stack overrides so we must override too + // or Stack will return the smaller values directly from Label + override fun getMinWidth() = widthWithShadow + override fun getMinHeight() = heightWithShadow +} diff --git a/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt b/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt index 2e9d85abf8..4805e21e76 100644 --- a/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt +++ b/core/src/com/unciv/ui/screens/overviewscreen/GlobalPoliticsOverviewTable.kt @@ -1,8 +1,10 @@ package com.unciv.ui.screens.overviewscreen import com.badlogic.gdx.graphics.Color +import com.badlogic.gdx.math.Vector2 import com.badlogic.gdx.scenes.scene2d.Actor import com.badlogic.gdx.scenes.scene2d.Group +import com.badlogic.gdx.scenes.scene2d.Stage import com.badlogic.gdx.scenes.scene2d.Touchable import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.TextButton @@ -15,24 +17,29 @@ import com.unciv.logic.civilization.diplomacy.DiplomaticStatus import com.unciv.logic.civilization.diplomacy.RelationshipLevel import com.unciv.logic.map.HexMath import com.unciv.models.ruleset.Policy.PolicyBranchType +import com.unciv.models.ruleset.nation.getContrastRatio import com.unciv.models.ruleset.unique.UniqueType import com.unciv.ui.components.UncivTooltip.Companion.addTooltip import com.unciv.ui.components.extensions.addBorder import com.unciv.ui.components.extensions.addSeparator import com.unciv.ui.components.extensions.addSeparatorVertical import com.unciv.ui.components.extensions.center +import com.unciv.ui.components.extensions.equalizeColumns import com.unciv.ui.components.extensions.toLabel import com.unciv.ui.components.extensions.toTextButton import com.unciv.ui.components.fonts.Fonts +import com.unciv.ui.components.input.onActivation import com.unciv.ui.components.input.onClick import com.unciv.ui.components.widgets.AutoScrollPane import com.unciv.ui.components.widgets.ColorMarkupLabel +import com.unciv.ui.components.widgets.ShadowedLabel import com.unciv.ui.images.ImageGetter +import com.unciv.ui.popups.AnimatedMenuPopup import com.unciv.ui.screens.basescreen.BaseScreen import com.unciv.ui.screens.diplomacyscreen.DiplomacyScreen import kotlin.math.roundToInt -class GlobalPoliticsOverviewTable ( +class GlobalPoliticsOverviewTable( viewingPlayer: Civilization, overviewScreen: EmpireOverviewScreen, persistedData: EmpireOverviewTabPersistableData? = null @@ -66,17 +73,31 @@ class GlobalPoliticsOverviewTable ( init { + top() if (persistableData.showDiagram) updateDiagram() else updatePoliticsTable() } + override fun getFixedContent() = fixedContent + + //region Politics Table View + private fun updatePoliticsTable() { persistableData.showDiagram = false - clear() - fixedContent.clear() + createGlobalPoliticsHeader() + createGlobalPoliticsTable() + equalizeColumns(fixedContent, this) + } + /** Clears fixedContent and adds the header cells. + * Needs to stay matched to [createGlobalPoliticsTable]. + * + * 9 Columns: 5 info, 4 separators. First gets an empty header for contend below = civ image + */ + private fun createGlobalPoliticsHeader() = fixedContent.run { val diagramButton = "Show diagram".toTextButton().onClick(::updateDiagram) + clear() add() addSeparatorVertical(Color.GRAY) add("Civilization Info".toLabel()) @@ -86,16 +107,22 @@ class GlobalPoliticsOverviewTable ( add("Wonders".toLabel()) addSeparatorVertical(Color.GRAY) add(Table().apply { - add("Relations".toLabel()).row() + add("Relations".toLabel()).padTop(10f).row() add(diagramButton).pad(10f) }) - - createGlobalPoliticsTable() + addSeparator(Color.GRAY) } + /** Clears [EmpireOverviewTab]'s main Table and adds data columns/rows. + * Needs to stay matched to [createGlobalPoliticsHeader]. + */ private fun createGlobalPoliticsTable() { + clear() + for (civ in sequenceOf(viewingPlayer) + viewingPlayer.diplomacyFunctions.getKnownCivsSorted(includeCityStates = false)) { - addSeparator(Color.GRAY) + // We already have a separator under the fixed header, we only need them here between rows. + // This is also the replacement for calling row() explicitly + if (cells.size > 0) addSeparator(Color.GRAY) // civ image add(ImageGetter.getNationPortrait(civ.nation, 100f)).pad(20f) @@ -225,7 +252,8 @@ class GlobalPoliticsOverviewTable ( return politicsTable } - override fun getFixedContent() = fixedContent + //endregion + //region Diagram View ("Ball of Yarn") // Refresh content and determine landscape/portrait layout private fun updateDiagram() { @@ -406,6 +434,16 @@ class GlobalPoliticsOverviewTable ( init { setSize(freeSize, freeSize) + + // An Image Actor does not respect alpha for its hit area, it's always square, but we want a clickable _circle_ + // Radius to show legend should be no larger than freeSize / 2.25f - 15f (see below), let's make it a little smaller + val clickableArea = ClickableCircle(freeSize / 1.25f - 25f) + clickableArea.onActivation { + DiagramLegendPopup(stage, this) + } + clickableArea.center(this) + addActor(clickableArea) + val civGroups = HashMap() val civLines = HashMap>() val civCount = undefeatedCivs.count() @@ -426,7 +464,7 @@ class GlobalPoliticsOverviewTable ( addActor(civGroup) } - for (civ in undefeatedCivs) + for (civ in undefeatedCivs) { for (diplomacy in civ.diplomacy.values) { if (diplomacy.otherCiv() !in undefeatedCivs) continue val civGroup = civGroups[civ.civName]!! @@ -437,7 +475,8 @@ class GlobalPoliticsOverviewTable ( startY = civGroup.y + civGroup.height / 2, endX = otherCivGroup.x + otherCivGroup.width / 2, endY = otherCivGroup.y + otherCivGroup.height / 2, - width = 2f) + width = 2f + ) statusLine.color = if (diplomacy.diplomaticStatus == DiplomaticStatus.War) Color.RED else if (diplomacy.diplomaticStatus == DiplomaticStatus.DefensivePact @@ -451,6 +490,64 @@ class GlobalPoliticsOverviewTable ( addActorAt(0, statusLine) } + } + } } + + private class DiagramLegendPopup(stage: Stage, diagram: Actor) : AnimatedMenuPopup(stage, diagram.getCenterInStageCoordinates()) { + init { + touchable = Touchable.enabled + onActivation { close() } + } + + companion object { + private fun Actor.getCenterInStageCoordinates(): Vector2 = localToStageCoordinates(Vector2(width / 2, height / 2)) + + const val lineWidth = 3f // a little thicker than the actual diagram + const val lowContrastWidth = 4f + const val lineLength = 120f + } + + override fun createContentTable(): Table { + val legend = Table() + legend.background = ImageGetter.getDrawable("OtherIcons/Politics-diagram-bg") + legend.add(ShadowedLabel("Diagram line colors", Constants.headingFontSize)).colspan(2).row() + //todo Rethink hardcoding together with the statusLine.color one in DiplomacyGroup + legend.addLegendRow("War", Color.RED) + for (level in RelationshipLevel.values()) { + val lineColor = if (level == RelationshipLevel.Ally) Color.CYAN else level.color + legend.addLegendRow(level.name, lineColor) + } + legend.addLegendRow(Constants.defensivePact, Color.CYAN) + return super.createContentTable()!!.apply { + add(legend).grow() + } + } + + fun Table.addLegendRow(text: String, color: Color) { + // empiric hack to equalize the "visual impact" a little. Afraid is worst at contrast 1.4, Enemy has 9.8 + val contrast = getContrastRatio(Color.DARK_GRAY, color).toFloat() + val width = lineWidth + (lowContrastWidth - lineWidth) / contrast.coerceAtLeast(1f) + val line = ImageGetter.getLine(0f, width / 2, lineLength, width / 2, width) + line.color = color + add(line).size(lineLength, width).padTop(5f) + add(ShadowedLabel(text)).padLeft(5f).padTop(10f).row() + } + } + + /** An Image Actor does not respect alpha for its hit area, it's always square, but we want a clickable _circle_ */ + private class ClickableCircle(size: Float) : Group() { + val center = Vector2(size / 2, size / 2) + val maxDst2 = size * size / 4 // squared radius + init { + touchable = Touchable.enabled + setSize(size, size) + } + override fun hit(x: Float, y: Float, touchable: Boolean): Actor? { + return if (center.dst2(x, y) < maxDst2) this else null + } + } + + //endregion } diff --git a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt index d51ae55ddb..dde619df26 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt @@ -5,14 +5,12 @@ import com.badlogic.gdx.math.Interpolation import com.badlogic.gdx.math.Vector2 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.actions.FloatAction import com.badlogic.gdx.scenes.scene2d.actions.RelativeTemporalAction import com.badlogic.gdx.scenes.scene2d.actions.SequenceAction import com.badlogic.gdx.scenes.scene2d.actions.TemporalAction import com.badlogic.gdx.scenes.scene2d.ui.Image -import com.badlogic.gdx.scenes.scene2d.ui.Stack import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup import com.badlogic.gdx.utils.Align @@ -20,8 +18,8 @@ import com.unciv.UncivGame import com.unciv.logic.battle.ICombatant import com.unciv.logic.battle.MapUnitCombatant import com.unciv.logic.map.HexMath -import com.unciv.ui.components.extensions.toLabel import com.unciv.ui.components.tilegroups.TileSetStrings +import com.unciv.ui.components.widgets.ShadowedLabel import com.unciv.ui.images.ImageGetter import com.unciv.ui.screens.worldscreen.WorldScreen @@ -210,17 +208,7 @@ object BattleTableHelpers { private fun createDamageLabel(damage: Int, target: Actor) { if (damage == 0) return - val label = (-damage).toString().toLabel(Color.RED, damageLabelFontSize, Align.topLeft, true) - label.touchable = Touchable.disabled - val shadow = (-damage).toString().toLabel(Color.BLACK, damageLabelFontSize, Align.bottomRight, true) - shadow.touchable = Touchable.disabled - - val container = Stack(shadow, label) - container.touchable = Touchable.disabled - - container.pack() - // The +1f is what displaces the shadow under the red label - container.setSize(container.width + 1f, container.height + 1f) + val container = ShadowedLabel((-damage).toString(), damageLabelFontSize, Color.RED) val targetRight = target.run { localToStageCoordinates(Vector2(width, height * 0.5f)) } container.setPosition(targetRight.x, targetRight.y, Align.center) target.stage.addActor(container) diff --git a/docs/Credits.md b/docs/Credits.md index 1846f90b9c..12635a65d8 100644 --- a/docs/Credits.md +++ b/docs/Credits.md @@ -734,6 +734,7 @@ Unless otherwise specified, all the following are from [the Noun Project](https: - [charts](https://thenounproject.com/icon/charts-2312023/) by Srinivas Agra (gimped to appear bolder) for the Charts page - [framed image](https://thenounproject.com/icon/framed-image-2332187/) by Jose Dean for Victory Illustrations page - [down](https://thenounproject.com/icon/down-39378/) by Cengiz SARI for Show unit destination +- [Cat](https://thenounproject.com/icon/cat-158942/) by Josi for Politics overview diagram legend ### Main menu