diff --git a/android/Images/OtherIcons/Charts.png b/android/Images.NationIcons/VictoryScreenIcons/Charts.png similarity index 100% rename from android/Images/OtherIcons/Charts.png rename to android/Images.NationIcons/VictoryScreenIcons/Charts.png diff --git a/android/Images.NationIcons/VictoryScreenIcons/Demographics.png b/android/Images.NationIcons/VictoryScreenIcons/Demographics.png new file mode 100644 index 0000000000..b25fc10e75 Binary files /dev/null and b/android/Images.NationIcons/VictoryScreenIcons/Demographics.png differ diff --git a/android/Images.NationIcons/VictoryScreenIcons/Global.png b/android/Images.NationIcons/VictoryScreenIcons/Global.png new file mode 100644 index 0000000000..39487d3941 Binary files /dev/null and b/android/Images.NationIcons/VictoryScreenIcons/Global.png differ diff --git a/android/Images.NationIcons/VictoryScreenIcons/Illustration.png b/android/Images.NationIcons/VictoryScreenIcons/Illustration.png new file mode 100644 index 0000000000..d337453838 Binary files /dev/null and b/android/Images.NationIcons/VictoryScreenIcons/Illustration.png differ diff --git a/android/Images.NationIcons/VictoryScreenIcons/OurStatus.png b/android/Images.NationIcons/VictoryScreenIcons/OurStatus.png new file mode 100644 index 0000000000..7c57a59711 Binary files /dev/null and b/android/Images.NationIcons/VictoryScreenIcons/OurStatus.png differ diff --git a/android/Images.NationIcons/VictoryScreenIcons/Rankings.png b/android/Images.NationIcons/VictoryScreenIcons/Rankings.png new file mode 100644 index 0000000000..b25fc10e75 Binary files /dev/null and b/android/Images.NationIcons/VictoryScreenIcons/Rankings.png differ diff --git a/android/Images.NationIcons/VictoryScreenIcons/Replay.png b/android/Images.NationIcons/VictoryScreenIcons/Replay.png new file mode 100644 index 0000000000..ad1235c513 Binary files /dev/null and b/android/Images.NationIcons/VictoryScreenIcons/Replay.png differ diff --git a/android/Images.NationIcons/VictoryTypeIcons/Cultural.png b/android/Images.NationIcons/VictoryTypeIcons/Cultural.png new file mode 100644 index 0000000000..601f0bc4f2 Binary files /dev/null and b/android/Images.NationIcons/VictoryTypeIcons/Cultural.png differ diff --git a/android/Images.NationIcons/VictoryTypeIcons/Diplomatic.png b/android/Images.NationIcons/VictoryTypeIcons/Diplomatic.png new file mode 100644 index 0000000000..22af5ba3ef Binary files /dev/null and b/android/Images.NationIcons/VictoryTypeIcons/Diplomatic.png differ diff --git a/android/Images.NationIcons/VictoryTypeIcons/Domination.png b/android/Images.NationIcons/VictoryTypeIcons/Domination.png new file mode 100644 index 0000000000..52737f513f Binary files /dev/null and b/android/Images.NationIcons/VictoryTypeIcons/Domination.png differ diff --git a/android/Images.NationIcons/VictoryTypeIcons/Scientific.png b/android/Images.NationIcons/VictoryTypeIcons/Scientific.png new file mode 100644 index 0000000000..1923e362fb Binary files /dev/null and b/android/Images.NationIcons/VictoryTypeIcons/Scientific.png differ diff --git a/android/Images.NationIcons/VictoryTypeIcons/Time.png b/android/Images.NationIcons/VictoryTypeIcons/Time.png new file mode 100644 index 0000000000..b5fb7a9f64 Binary files /dev/null and b/android/Images.NationIcons/VictoryTypeIcons/Time.png differ diff --git a/android/assets/NationIcons.atlas b/android/assets/NationIcons.atlas index 4176729399..4a805ebffa 100644 --- a/android/assets/NationIcons.atlas +++ b/android/assets/NationIcons.atlas @@ -6,266 +6,350 @@ filter: MipMapLinearLinear, MipMapLinearLinear repeat: none NationIcons/America rotate: false - xy: 4, 328 + xy: 4, 278 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Arabia rotate: false - xy: 4, 220 + xy: 127, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Austria rotate: false - xy: 112, 328 + xy: 4, 170 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Aztecs rotate: false - xy: 4, 112 + xy: 235, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Babylon rotate: false - xy: 112, 220 + xy: 4, 62 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Barbarians rotate: false - xy: 220, 328 + xy: 343, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Byzantium rotate: false - xy: 4, 4 + xy: 451, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Carthage rotate: false - xy: 112, 112 + xy: 559, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Celts rotate: false - xy: 220, 220 + xy: 667, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/China rotate: false - xy: 328, 328 + xy: 883, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/CityState rotate: false - xy: 112, 4 + xy: 991, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Denmark rotate: false - xy: 220, 112 + xy: 1315, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Egypt rotate: false - xy: 328, 220 + xy: 1531, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/England rotate: false - xy: 436, 328 + xy: 1639, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Ethiopia rotate: false - xy: 220, 4 + xy: 1747, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/France rotate: false - xy: 328, 112 + xy: 1855, 401 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Germany rotate: false - xy: 436, 220 + xy: 112, 278 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Greece rotate: false - xy: 544, 328 + xy: 112, 170 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Inca rotate: false - xy: 328, 4 + xy: 220, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/India rotate: false - xy: 436, 112 + xy: 220, 185 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Iroquois rotate: false - xy: 544, 220 + xy: 328, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Japan rotate: false - xy: 652, 328 + xy: 220, 77 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Korea rotate: false - xy: 436, 4 + xy: 328, 185 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Mongolia rotate: false - xy: 544, 112 + xy: 436, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Persia rotate: false - xy: 652, 220 + xy: 436, 185 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Polynesia rotate: false - xy: 760, 328 + xy: 544, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Random rotate: false - xy: 544, 4 + xy: 436, 77 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Rome rotate: false - xy: 652, 112 + xy: 652, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Russia rotate: false - xy: 760, 220 + xy: 544, 77 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Siam rotate: false - xy: 868, 328 + xy: 760, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Songhai rotate: false - xy: 652, 4 + xy: 652, 77 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Spain rotate: false - xy: 760, 112 + xy: 760, 185 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Spectator rotate: false - xy: 868, 220 + xy: 868, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/Sweden rotate: false - xy: 976, 328 + xy: 760, 77 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/The Huns rotate: false - xy: 760, 4 + xy: 868, 185 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/The Maya rotate: false - xy: 868, 112 + xy: 976, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/The Netherlands rotate: false - xy: 976, 220 + xy: 868, 77 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NationIcons/The Ottomans rotate: false - xy: 1084, 328 + xy: 976, 185 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryScreenIcons/Charts + rotate: false + xy: 775, 401 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryScreenIcons/Demographics + rotate: false + xy: 1207, 401 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryScreenIcons/Rankings + rotate: false + xy: 1207, 401 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryScreenIcons/Global + rotate: false + xy: 4, 4 + size: 50, 50 + orig: 50, 50 + offset: 0, 0 + index: -1 +VictoryScreenIcons/Illustration + rotate: false + xy: 112, 62 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryScreenIcons/OurStatus + rotate: false + xy: 328, 77 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryScreenIcons/Replay + rotate: false + xy: 544, 185 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryTypeIcons/Cultural + rotate: false + xy: 1099, 401 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryTypeIcons/Diplomatic + rotate: false + xy: 1423, 401 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryTypeIcons/Domination + rotate: false + xy: 4, 386 + size: 115, 115 + orig: 115, 115 + offset: 0, 0 + index: -1 +VictoryTypeIcons/Scientific + rotate: false + xy: 652, 185 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +VictoryTypeIcons/Time + rotate: false + xy: 1084, 293 size: 100, 100 orig: 100, 100 offset: 0, 0 diff --git a/android/assets/NationIcons.png b/android/assets/NationIcons.png index f63777bfec..d11abec883 100644 Binary files a/android/assets/NationIcons.png and b/android/assets/NationIcons.png differ diff --git a/android/assets/game.atlas b/android/assets/game.atlas index 85e9c0926b..6d9eff66b2 100644 --- a/android/assets/game.atlas +++ b/android/assets/game.atlas @@ -6,140 +6,133 @@ filter: MipMapLinearLinear, MipMapLinearLinear repeat: none CityStateIcons/Cultured rotate: false - xy: 127, 1219 + xy: 427, 1745 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Maritime rotate: false - xy: 1939, 1823 + xy: 1831, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Mercantile rotate: false - xy: 535, 1577 + xy: 1939, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Militaristic rotate: false - xy: 643, 1592 + xy: 535, 1577 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 CityStateIcons/Religious rotate: false - xy: 1723, 1499 + xy: 1615, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -EmojiIcons/Automate - rotate: false - xy: 436, 432 - size: 50, 50 - orig: 50, 50 - offset: 0, 0 - index: -1 EmojiIcons/Culture rotate: false - xy: 436, 258 + xy: 436, 418 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Death rotate: false - xy: 436, 200 + xy: 436, 360 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Faith rotate: false - xy: 436, 142 + xy: 436, 302 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Food rotate: false - xy: 436, 84 + xy: 436, 244 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Gold rotate: false - xy: 494, 432 + xy: 436, 128 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Artist rotate: false - xy: 494, 374 + xy: 436, 70 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Engineer rotate: false - xy: 494, 316 + xy: 436, 12 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great General rotate: false - xy: 494, 258 + xy: 494, 534 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Merchant rotate: false - xy: 494, 200 + xy: 494, 476 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Great Scientist rotate: false - xy: 494, 142 + xy: 494, 418 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Happiness rotate: false - xy: 494, 84 + xy: 494, 360 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Production rotate: false - xy: 552, 215 + xy: 527, 607 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Science rotate: false - xy: 552, 41 + xy: 552, 433 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 EmojiIcons/Turn rotate: false - xy: 544, 1029 + xy: 552, 317 size: 50, 50 orig: 50, 50 offset: 0, 0 @@ -188,259 +181,280 @@ OtherIcons/Stop index: -1 ImprovementIcons/Citadel rotate: false - xy: 4, 261 + xy: 1492, 1931 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/City center rotate: false - xy: 1708, 1931 + xy: 4, 153 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/City ruins rotate: false - xy: 4, 45 + xy: 1708, 1931 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Customs house rotate: false - xy: 119, 1111 + xy: 127, 1219 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Farm rotate: false - xy: 535, 1793 + xy: 427, 1637 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Fishing Boats rotate: false - xy: 643, 1808 + xy: 535, 1685 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Fort rotate: false - xy: 751, 1823 + xy: 643, 1700 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Holy site rotate: false - xy: 1075, 1823 + xy: 967, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Landmark rotate: false - xy: 1399, 1715 + xy: 1399, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Lumber mill rotate: false - xy: 1615, 1715 + xy: 1615, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Manufactory rotate: false - xy: 1723, 1715 + xy: 1723, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Mine rotate: false - xy: 751, 1607 + xy: 643, 1592 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Moai rotate: false - xy: 859, 1607 + xy: 751, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Offshore Platform rotate: false - xy: 1615, 1607 + xy: 1507, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Oil well rotate: false - xy: 1831, 1607 + xy: 1723, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Pasture rotate: false - xy: 412, 1529 + xy: 1939, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Plantation rotate: false - xy: 514, 1145 + xy: 514, 1253 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Polder rotate: false - xy: 643, 1484 + xy: 514, 1145 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Quarry rotate: false - xy: 1183, 1499 + xy: 1075, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Railroad rotate: false - xy: 1615, 1499 + xy: 1507, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Fallout rotate: false - xy: 1939, 1499 + xy: 1831, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Forest rotate: false - xy: 751, 1391 + xy: 1939, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Jungle rotate: false - xy: 751, 1391 + xy: 1939, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Marsh rotate: false - xy: 967, 1392 + xy: 859, 1392 size: 100, 99 orig: 100, 99 offset: 0, 0 index: -1 ImprovementIcons/Remove Railroad rotate: false - xy: 1075, 1391 + xy: 967, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Remove Road rotate: false - xy: 1183, 1391 + xy: 1075, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Repair rotate: false - xy: 1291, 1391 + xy: 1183, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Road rotate: false - xy: 1615, 1391 + xy: 1507, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Terrace farm rotate: false - xy: 328, 671 + xy: 328, 773 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ImprovementIcons/Trading post rotate: false - xy: 328, 455 + xy: 328, 557 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/EnhanceReligion rotate: false - xy: 112, 139 + xy: 112, 247 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/FoundPantheon rotate: false - xy: 112, 139 + xy: 112, 247 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/FoundReligion rotate: false - xy: 112, 139 + xy: 112, 247 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/ReformReligion rotate: false - xy: 112, 139 + xy: 112, 247 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Faith rotate: false - xy: 112, 139 + xy: 112, 247 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +NotificationIcons/Loading + rotate: false + xy: 1507, 1823 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +NotificationIcons/Working + rotate: false + xy: 1507, 1823 + size: 100, 100 + orig: 100, 100 + offset: 0, 0 + index: -1 +OtherIcons/Loading + rotate: false + xy: 1507, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/PickConstruction rotate: false - xy: 520, 1469 + xy: 406, 1205 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Production rotate: false - xy: 520, 1469 + xy: 406, 1205 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -454,14 +468,14 @@ NotificationIcons/PickPolicy index: -1 NotificationIcons/PickTech rotate: false - xy: 514, 1361 + xy: 520, 1469 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Science rotate: false - xy: 514, 1361 + xy: 520, 1469 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -510,7 +524,7 @@ StatIcons/Movement index: -1 OtherIcons/BackArrow rotate: false - xy: 436, 374 + xy: 436, 534 size: 50, 50 orig: 50, 50 offset: 0, 0 @@ -550,23 +564,16 @@ OtherIcons/Capital orig: 107, 101 offset: 0, 0 index: -1 -OtherIcons/Charts +OtherIcons/Checkmark rotate: false xy: 4, 369 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 -OtherIcons/Checkmark - rotate: false - xy: 1492, 1931 - size: 100, 100 - orig: 100, 100 - offset: 0, 0 - index: -1 NotificationIcons/NextTurn rotate: false - xy: 1492, 1931 + xy: 4, 369 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -580,56 +587,56 @@ OtherIcons/Circle index: -1 OtherIcons/Cities rotate: false - xy: 1600, 1931 + xy: 4, 261 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/CityState rotate: false - xy: 436, 316 + xy: 436, 476 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Close rotate: false - xy: 1924, 1931 + xy: 1816, 1931 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/CrosshairB rotate: false - xy: 298, 1268 + xy: 298, 1376 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Diplomacy rotate: false - xy: 112, 895 + xy: 112, 1003 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/DiplomacyW rotate: false - xy: 112, 787 + xy: 112, 895 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/DisbandUnit rotate: false - xy: 112, 679 + xy: 112, 787 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/ExclamationMark rotate: false - xy: 112, 31 + xy: 112, 139 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -643,7 +650,7 @@ OtherIcons/Fire index: -1 OtherIcons/ForwardArrow rotate: false - xy: 436, 26 + xy: 436, 186 size: 50, 50 orig: 50, 50 offset: 0, 0 @@ -664,168 +671,147 @@ OtherIcons/HexagonOutline index: -1 OtherIcons/Improvements rotate: false - xy: 494, 26 + xy: 494, 302 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Keyboard rotate: false - xy: 1399, 1823 + xy: 1291, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Link rotate: false - xy: 552, 447 + xy: 494, 186 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Load rotate: false - xy: 1507, 1823 - size: 100, 100 - orig: 100, 100 - offset: 0, 0 - index: -1 -OtherIcons/Loading - rotate: false - xy: 1507, 1715 - 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 + xy: 1399, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/LockSmall rotate: false - xy: 552, 389 + xy: 494, 128 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/MapEditor rotate: false - xy: 1831, 1823 + xy: 1723, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/MenuIcon rotate: false - xy: 1939, 1715 + xy: 1939, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Mods rotate: false - xy: 967, 1607 + xy: 859, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Multiplayer rotate: false - xy: 1075, 1607 + xy: 967, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/NationSwap rotate: false - xy: 1183, 1607 + xy: 1075, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Nations rotate: false - xy: 552, 331 + xy: 494, 70 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/New rotate: false - xy: 1291, 1607 + xy: 1183, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Notifications rotate: false - xy: 1507, 1607 + xy: 1399, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Options rotate: false - xy: 1939, 1607 + xy: 1831, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pause rotate: false - xy: 552, 273 + xy: 494, 12 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 OtherIcons/Pencil rotate: false - xy: 406, 1313 + xy: 406, 1421 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pentagon rotate: false - xy: 406, 1205 + xy: 406, 1313 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Pillage rotate: false - xy: 514, 1253 + xy: 514, 1361 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Politics rotate: false - xy: 751, 1499 + xy: 643, 1484 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 NotificationIcons/WorldCongressVote rotate: false - xy: 751, 1499 + xy: 643, 1484 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Present rotate: false - xy: 1075, 1499 + xy: 967, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -839,119 +825,119 @@ OtherIcons/Puppet index: -1 OtherIcons/Quest rotate: false - xy: 1291, 1499 + xy: 1183, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Question rotate: false - xy: 1399, 1499 + xy: 1291, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Quickstart rotate: false - xy: 1507, 1499 + xy: 1399, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Remove Heresy rotate: false - xy: 859, 1391 + xy: 751, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Resources rotate: false - xy: 1399, 1391 + xy: 1291, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Resume rotate: false - xy: 1507, 1391 + xy: 1399, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Search rotate: false - xy: 1831, 1391 + xy: 1723, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/SecretOptions rotate: false - xy: 1939, 1391 + xy: 1831, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Settings rotate: false - xy: 227, 1111 + xy: 1939, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Shield rotate: false - xy: 220, 895 + xy: 220, 1003 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Sleep rotate: false - xy: 220, 571 + xy: 220, 679 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Speaker rotate: false - xy: 220, 463 + xy: 220, 571 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Spy rotate: false - xy: 220, 139 + xy: 220, 247 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Spy_White rotate: false - xy: 220, 31 + xy: 220, 139 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Star rotate: false - xy: 335, 1103 + xy: 220, 37 size: 100, 94 orig: 100, 94 offset: 0, 0 index: -1 OtherIcons/Swap rotate: false - xy: 328, 779 + xy: 328, 881 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Timer rotate: false - xy: 328, 563 + xy: 328, 665 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -965,35 +951,35 @@ OtherIcons/Triangle index: -1 OtherIcons/Turn right rotate: false - xy: 328, 239 + xy: 328, 341 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Tyrannosaurus rotate: false - xy: 328, 131 + xy: 328, 233 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/WLTKD rotate: false - xy: 436, 490 + xy: 436, 592 size: 83, 65 orig: 83, 65 offset: 0, 0 index: -1 OtherIcons/Wait rotate: false - xy: 436, 995 + xy: 328, 17 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Wonders rotate: false - xy: 436, 563 + xy: 436, 665 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -1028,224 +1014,224 @@ ResourceIcons/Cattle index: -1 ResourceIcons/Citrus rotate: false - xy: 4, 153 + xy: 1600, 1931 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Coal rotate: false - xy: 190, 1435 + xy: 1924, 1931 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Copper rotate: false - xy: 190, 1327 + xy: 190, 1435 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Cotton rotate: false - xy: 298, 1484 + xy: 190, 1327 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Crab rotate: false - xy: 298, 1376 + xy: 298, 1484 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Deer rotate: false - xy: 112, 1003 + xy: 119, 1111 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Dyes rotate: false - xy: 112, 247 + xy: 112, 355 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Fish rotate: false - xy: 535, 1685 + xy: 535, 1793 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Furs rotate: false - xy: 751, 1715 + xy: 751, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Gems rotate: false - xy: 859, 1823 + xy: 751, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Gold Ore rotate: false - xy: 967, 1823 + xy: 859, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Horses rotate: false - xy: 1075, 1715 + xy: 1075, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Incense rotate: false - xy: 1183, 1823 + xy: 1075, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Iron rotate: false - xy: 1183, 1715 + xy: 1183, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Ivory rotate: false - xy: 1291, 1823 + xy: 1183, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Jewelry rotate: false - xy: 1291, 1715 + xy: 1291, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Marble rotate: false - xy: 1831, 1715 + xy: 1831, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Oil rotate: false - xy: 1723, 1607 + xy: 1615, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Pearls rotate: false - xy: 406, 1421 + xy: 412, 1529 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Porcelain rotate: false - xy: 967, 1499 + xy: 859, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Salt rotate: false - xy: 1723, 1391 + xy: 1615, 1391 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Sheep rotate: false - xy: 220, 1003 + xy: 227, 1111 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Silk rotate: false - xy: 220, 787 + xy: 220, 895 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Silver rotate: false - xy: 220, 679 + xy: 220, 787 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Spices rotate: false - xy: 220, 247 + xy: 220, 355 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Stone rotate: false - xy: 328, 995 + xy: 335, 1097 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Sugar rotate: false - xy: 328, 887 + xy: 328, 989 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Truffles rotate: false - xy: 328, 347 + xy: 328, 449 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Uranium rotate: false - xy: 328, 23 + xy: 328, 125 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Whales rotate: false - xy: 436, 887 + xy: 436, 989 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Wheat rotate: false - xy: 436, 779 + xy: 436, 881 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 ResourceIcons/Wine rotate: false - xy: 436, 671 + xy: 436, 773 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -1266,77 +1252,77 @@ StatIcons/CityConnection index: -1 StatIcons/Culture rotate: false - xy: 427, 1745 + xy: 298, 1268 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Food rotate: false - xy: 643, 1700 + xy: 643, 1808 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Gold rotate: false - xy: 859, 1715 + xy: 859, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Happiness rotate: false - xy: 967, 1715 + xy: 967, 1823 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/InterceptRange rotate: false - xy: 527, 505 + xy: 494, 244 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/Malcontent rotate: false - xy: 1723, 1823 + xy: 1615, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Population rotate: false - xy: 859, 1499 + xy: 751, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/Worked rotate: false - xy: 859, 1499 + xy: 751, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Range rotate: false - xy: 552, 157 + xy: 552, 549 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/RangedStrength rotate: false - xy: 552, 99 + xy: 552, 491 size: 50, 50 orig: 50, 50 offset: 0, 0 index: -1 StatIcons/ReligiousStrength rotate: false - xy: 1831, 1499 + xy: 1723, 1499 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -1350,14 +1336,14 @@ StatIcons/Resistance index: -1 StatIcons/Specialist rotate: false - xy: 220, 355 + xy: 220, 463 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 StatIcons/Strength rotate: false - xy: 544, 1087 + xy: 552, 375 size: 50, 50 orig: 50, 50 offset: 0, 0 @@ -1378,56 +1364,56 @@ TileIcons/Buy index: -1 TileIcons/CityCenter rotate: false - xy: 1816, 1931 + xy: 4, 45 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/Locked rotate: false - xy: 1615, 1823 + xy: 1507, 1715 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileIcons/NotWorked rotate: false - xy: 1399, 1607 + xy: 1291, 1607 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UniqueIcons/Fallback rotate: false - xy: 427, 1637 + xy: 112, 31 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitTypeIcons/DomainAir rotate: false - xy: 112, 571 + xy: 112, 679 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitTypeIcons/DomainLand rotate: false - xy: 112, 463 + xy: 112, 571 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 OtherIcons/Terrains rotate: false - xy: 112, 463 + xy: 112, 571 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 UnitTypeIcons/DomainWater rotate: false - xy: 112, 355 + xy: 112, 463 size: 100, 100 orig: 100, 100 offset: 0, 0 diff --git a/android/assets/game.png b/android/assets/game.png index 867b2cdc40..50798b569b 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 f0c860cf92..5848d9ce87 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -1411,6 +1411,7 @@ Destroy [civName] = Capture [cityName] = Destroy ? * [civName] = Capture ? * [cityName] = +Majority religion of ? * [civName] = Our status = Global status = Rankings = diff --git a/core/src/com/unciv/models/ruleset/Victory.kt b/core/src/com/unciv/models/ruleset/Victory.kt index 063ad5b37f..f858196c82 100644 --- a/core/src/com/unciv/models/ruleset/Victory.kt +++ b/core/src/com/unciv/models/ruleset/Victory.kt @@ -246,9 +246,11 @@ class Milestone(val uniqueDescription: String, private val parentVictory: Victor } MilestoneType.WorldReligion -> { + val hideCivCount = civInfo.hideCivCount() val majorCivs = civInfo.gameInfo.civilizations.filter { it.isMajorCiv() && it.isAlive() } val civReligion = civInfo.religionManager.religion for (civ in majorCivs) { + if (hideCivCount && !civInfo.knows(civ)) continue val milestoneText = if (civInfo.knows(civ)) "Majority religion of [${civ.civName}]" else "Majority religion of [${Constants.unknownNationName}]" @@ -257,6 +259,7 @@ class Milestone(val uniqueDescription: String, private val parentVictory: Victor && civ.religionManager.isMajorityReligionForCiv(civReligion) buttons.add(getMilestoneButton(milestoneText, milestoneMet)) } + if (hideCivCount) buttons.add(getMilestoneButton("Majority religion of ? * [${Constants.unknownCityName}]", false)) } } return buttons diff --git a/core/src/com/unciv/ui/components/Fonts.kt b/core/src/com/unciv/ui/components/Fonts.kt index 035b0ef2ac..96a654d42f 100644 --- a/core/src/com/unciv/ui/components/Fonts.kt +++ b/core/src/com/unciv/ui/components/Fonts.kt @@ -228,18 +228,22 @@ object Fonts { val charToRulesetImageActor = HashMap() // See https://en.wikipedia.org/wiki/Private_Use_Areas - char encodings 57344 63743 are not assigned private var nextUnusedCharacterNumber = 57344 - fun addRulesetImages(ruleset:Ruleset) { + fun addRulesetImages(ruleset: Ruleset) { rulesetObjectNameToChar.clear() charToRulesetImageActor.clear() nextUnusedCharacterNumber = 57344 - fun addChar(objectName:String, objectActor: Actor){ + fun addChar(objectName: String, objectActor: Actor) { val char = Char(nextUnusedCharacterNumber) nextUnusedCharacterNumber++ rulesetObjectNameToChar[objectName] = char charToRulesetImageActor[char] = objectActor } + // Note: If an image is missing, these will insert a white square in the font - acceptable in + // most cases as these white squares will be visible elsewhere anyway. "Policy branch Complete" + // is an exception, and therefore gets an existence test. + for (resourceName in ruleset.tileResources.keys) addChar(resourceName, ImageGetter.getResourcePortrait(resourceName, ORIGINAL_FONT_SIZE)) @@ -264,6 +268,7 @@ object Fonts { for (policy in ruleset.policies.values) { val fileLocation = if (policy.name in ruleset.policyBranches) "PolicyBranchIcons/" + policy.name else "PolicyIcons/" + policy.name + if (!ImageGetter.imageExists(fileLocation)) continue addChar(policy.name, ImageGetter.getImage(fileLocation).apply { setSize(ORIGINAL_FONT_SIZE) }) } } diff --git a/core/src/com/unciv/ui/components/TabbedPager.kt b/core/src/com/unciv/ui/components/TabbedPager.kt index ac92940410..48a7d60046 100644 --- a/core/src/com/unciv/ui/components/TabbedPager.kt +++ b/core/src/com/unciv/ui/components/TabbedPager.kt @@ -94,6 +94,8 @@ open class TabbedPager( private val deferredSecretPages = ArrayDeque(0) private var askPasswordLock = false + private var onSelectionCallback: ((Int, String, TabbedPager) -> Unit)? = null + //endregion //region Public Interfaces @@ -443,6 +445,7 @@ open class TabbedPager( headerScroll.run { scrollX = scrollX.coerceIn((page.buttonX + page.buttonW - scrollWidth)..page.buttonX) } (page.content as? IPageExtensions)?.activated(index, page.caption, this) + onSelectionCallback?.invoke(index, page.caption, this) } return true } @@ -717,4 +720,9 @@ open class TabbedPager( page.buttonX += addWidth } } + + /** Alternative selection handler to [IPageExtensions.activated] */ + fun onSelection(action: ((index: Int, caption: String, pager: TabbedPager) -> Unit)?) { + onSelectionCallback = action + } } diff --git a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreen.kt b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreen.kt index 5b0f563605..aed752fd30 100644 --- a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreen.kt +++ b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreen.kt @@ -43,32 +43,35 @@ class VictoryScreen( private enum class VictoryTabs( val key: Char, - val iconName: String = "", val caption: String? = null, val allowAsSecret: Boolean = false ) { - OurStatus('O', "StatIcons/Specialist", caption = "Our status") { - override fun getContent(worldScreen: WorldScreen) = VictoryScreenOurVictory(worldScreen) + OurStatus('O', caption = "Our status") { + override fun getContent(parent: VictoryScreen) = VictoryScreenOurVictory(parent.worldScreen) override fun isHidden(playerCiv: Civilization) = playerCiv.isSpectator() }, - Global('G', "OtherIcons/Nations", caption = "Global status") { - override fun getContent(worldScreen: WorldScreen) = VictoryScreenGlobalVictory(worldScreen) + Global('G', caption = "Global status") { + override fun getContent(parent: VictoryScreen) = VictoryScreenGlobalVictory(parent.worldScreen) }, - Demographics('D', "CityStateIcons/Cultured", allowAsSecret = true) { - override fun getContent(worldScreen: WorldScreen) = VictoryScreenDemographics(worldScreen) + Illustration('I', allowAsSecret = true) { + override fun getContent(parent: VictoryScreen) = VictoryScreenIllustrations(parent, parent.worldScreen) + override fun isHidden(playerCiv: Civilization) = !VictoryScreenIllustrations.enablePage(playerCiv.gameInfo) + }, + Demographics('D', allowAsSecret = true) { + override fun getContent(parent: VictoryScreen) = VictoryScreenDemographics(parent.worldScreen) override fun isHidden(playerCiv: Civilization) = !UncivGame.Current.settings.useDemographics }, - Rankings('R', "CityStateIcons/Cultured", allowAsSecret = true) { - override fun getContent(worldScreen: WorldScreen) = VictoryScreenCivRankings(worldScreen) + Rankings('R', allowAsSecret = true) { + override fun getContent(parent: VictoryScreen) = VictoryScreenCivRankings(parent.worldScreen) override fun isHidden(playerCiv: Civilization) = UncivGame.Current.settings.useDemographics }, - Charts('C', "OtherIcons/Charts") { - override fun getContent(worldScreen: WorldScreen) = VictoryScreenCharts(worldScreen) + Charts('C') { + override fun getContent(parent: VictoryScreen) = VictoryScreenCharts(parent.worldScreen) override fun isHidden(playerCiv: Civilization) = !playerCiv.isSpectator() && playerCiv.statsHistory.size < 2 }, - Replay('P', "OtherIcons/Load", allowAsSecret = true) { - override fun getContent(worldScreen: WorldScreen) = VictoryScreenReplay(worldScreen) + Replay('P', allowAsSecret = true) { + override fun getContent(parent: VictoryScreen) = VictoryScreenReplay(parent.worldScreen) override fun isHidden(playerCiv: Civilization) = !playerCiv.isSpectator() && playerCiv.gameInfo.victoryData == null @@ -77,7 +80,7 @@ class VictoryScreen( // slider doesn't look weird. && playerCiv.gameInfo.turns < 5 }; - abstract fun getContent(worldScreen: WorldScreen): Table + abstract fun getContent(parent: VictoryScreen): Table open fun isHidden(playerCiv: Civilization) = false } @@ -90,10 +93,10 @@ class VictoryScreen( val tabHidden = tab.isHidden(playerCiv) if (tabHidden && !(tab.allowAsSecret && Gdx.input.areSecretKeysPressed())) continue - val icon = if (tab.iconName.isEmpty()) null else ImageGetter.getImage(tab.iconName) + val icon = ImageGetter.getImage("VictoryScreenIcons/${tab.name}") tabs.addPage( tab.caption ?: tab.name, - tab.getContent(worldScreen), + tab.getContent(this), icon, iconSize, scrollAlign = Align.topLeft, shortcutKey = KeyCharAndCode(tab.key), diff --git a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt new file mode 100644 index 0000000000..24bc7c234c --- /dev/null +++ b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt @@ -0,0 +1,323 @@ +package com.unciv.ui.screens.victoryscreen + +import com.badlogic.gdx.graphics.Color +import com.badlogic.gdx.graphics.g2d.TextureRegion +import com.badlogic.gdx.math.Interpolation +import com.badlogic.gdx.scenes.scene2d.Actor +import com.badlogic.gdx.scenes.scene2d.Touchable +import com.badlogic.gdx.scenes.scene2d.actions.TemporalAction +import com.badlogic.gdx.scenes.scene2d.ui.Container +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.utils.Drawable +import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable +import com.badlogic.gdx.utils.Align +import com.badlogic.gdx.utils.Disposable +import com.unciv.logic.GameInfo +import com.unciv.logic.civilization.Civilization +import com.unciv.models.ruleset.MilestoneType +import com.unciv.models.ruleset.Victory +import com.unciv.models.translations.tr +import com.unciv.ui.components.TabbedPager +import com.unciv.ui.components.extensions.isNarrowerThan4to3 +import com.unciv.ui.components.extensions.toLabel +import com.unciv.ui.components.input.KeyCharAndCode +import com.unciv.ui.images.ImageGetter +import com.unciv.ui.images.ImageWithCustomSize // Kdoc, not used +import com.unciv.ui.screens.basescreen.BaseScreen +import com.unciv.ui.screens.worldscreen.WorldScreen + +// todo Idea: use victoryCompletePercent to allow "percentage" images - e.g. "Destroy all players" now works all or nothing - boring. +// (requires some rework of the victoryCompletePercent here and similar code in VictoryManager - and likely move stuff to make MilestoneType an intelligent enum) + +class VictoryScreenIllustrations( + parent: VictoryScreen, + worldScreen: WorldScreen +) : Table(BaseScreen.skin), TabbedPager.IPageExtensions { + + companion object { + private const val fadeDuration = 1.2f + private const val basePath = "VictoryIllustrations" + private const val iconPath = "VictoryTypeIcons" + private val enablingImages = listOf("Won", "Lost", "Background") + + /** Check whether the entire "Illustrations" tab in VictoryScreen should display */ + internal fun enablePage(game: GameInfo) = game.getEnabledVictories().values + .any { it.hasIllustrations() } + + /** Check whether a Victory has enough images to display that Victory's sub-tab */ + private fun Victory.hasIllustrations() = enablingImages.any { element -> + ImageGetter.imageExists(getImageName(this, element)) + } + + /** Build a texture atlas path for a [victory] and an "[element]", which can be a Milestone name or other Decoration part name */ + private fun getImageName(victory: Victory, element: String) = + "$basePath/${victory.name}/$element" + + /** Gets an image if it exists as [ImageWithFixedPrefSize] */ + private fun getImageOrNull(name: String) = + if (ImageGetter.imageExists(name)) + // ImageGetter.getImage uses ImageWithCustomSize which interferes incorrectly with our sizing + ImageWithFixedPrefSize(ImageGetter.getDrawable(name)) else null + + /** Gets an image if a texture for [victory] and [element] exists (see [getImageName]) as [ImageWithFixedPrefSize] */ + private fun getImageOrNull(victory: Victory, element: String) = + getImageOrNull(getImageName(victory, element)) + + /** Readability shortcut for [getImages] */ + private fun MutableList.addImageIf(victory: Victory, element: String, test: () -> Boolean) { + if (!test()) return + val image = getImageOrNull(victory, element) + if (image != null) add(image) + } + } + + private val game = worldScreen.gameInfo + private val maxLabelWidth = parent.stage.run { width * (if (isNarrowerThan4to3()) 0.9f else 0.7f) } + private val victories = game.getEnabledVictories().values + .filter { it.hasIllustrations() } + .sortedBy { it.name.tr(hideIcons = true) } + private val selectedCiv = worldScreen.selectedCiv + private val completionPercentages = game.civilizations + .filter { it.isMajorCiv() && it.isAlive() || it == selectedCiv } + .associateWith { civ -> + victories.associateWith { victoryCompletePercent(it, civ) } + } + + private val tabs = TabbedPager(backgroundColor = Color.CLEAR, shortcutScreen = parent, capacity = victories.size) + private val holder = Stack() + + private var selectedVictory = selectVictory() + + init { + top() + holder.touchable = Touchable.disabled + + for (victory in victories) { + val iconName = "$iconPath/${victory.name}" + val icon = getImageOrNull(iconName) + val key = KeyCharAndCode(victory.name.first()) + tabs.addPage(victory.name, holder, icon, 20f, shortcutKey = key) + } + + tabs.selectPage(selectedVictory) + add(tabs).top().grow() + } + + /** Activates content for [selectedVictory]. Images are loaded and [FadeTo] animation started. */ + // Note the little trick - all tabs of our inner per-Victory TabbedPager contain the same holder, + // So we can fade over from one Victory to the next. + private fun select() { + val victory = victories.firstOrNull { it.name == selectedVictory } ?: return + tabs.onSelection(null) // Prevent recursion from replacePage + // todo measure: 265f = PickerPane.bottomTable.height + SplitPane.handle.height + 2* TabbedPager.header.height + separator.height + val maxHeight = stage.height - 265f + val fadeAction = FadeTo(holder, getImages(victory), maxHeight) // side effect: adds images to holder and packs it + tabs.replacePage(tabs.activePage, holder) // Force TabbedPager to measure content + holder.addAction(fadeAction) + tabs.onSelection { _, name, _ -> + selectedVictory = name + select() + } + } + + /** When the outer TabbedPager selects `this` page... */ + override fun activated(index: Int, caption: String, pager: TabbedPager) { + pager.setScrollDisabled(true) + select() + } + + /** When the outer TabbedPager de-selects `this` page... */ + override fun deactivated(index: Int, caption: String, pager: TabbedPager) { + pager.setScrollDisabled(false) + holder.clear() + } + + /** A specialized Gdx.Action for fading over one set (already loaded into [holder]) of images to + * another (from parameter [newActors]). + * + * Initialization has the ***side effects*** of stacking the new images into [holder], + * sizing them preserving aspect ratio (which is why it needs `maxHeight`: taking available + * width from holder.width works, same for height does not), and invalidating ascendants. + */ + private class FadeTo( + private val holder: Stack, + private val newActors: List, + maxHeight: Float + ) : TemporalAction(fadeDuration), Disposable { + private var oldActors: List? = holder.children.toList() // nullable to allow relinquishing the references when done + private val fadeOutFrom = oldActors!!.firstOrNull()?.color?.a ?: 1f + + init { + holder.actions.filterIsInstance().forEach { it.dispose() } + holder.addAndSize(newActors, maxHeight) + holder.invalidateHierarchy() + } + + override fun dispose() { + finish() + end() + } + + override fun update(percent: Float) { + val alpha = Interpolation.fade.apply(percent) + for (actor in newActors) actor.color.a = alpha + if (oldActors == null) return + val oldAlpha = Interpolation.fade.apply(1f - percent) * fadeOutFrom + for (actor in oldActors!!) actor.color.a = oldAlpha + } + + override fun end() { + val toRemove = oldActors ?: return + oldActors = null + for (actor in toRemove) holder.removeActor(actor) + } + + private fun Stack.addAndSize(actors: List, maxHeight: Float) { + // Local and not to be confused with Gdx or awt versions. We need a width/height container only + class Rectangle(var width: Float, var height: Float) { + constructor(region: TextureRegion) : this(region.regionWidth.toFloat(), region.regionHeight.toFloat()) + } + + for (actor in actors) { + actor.color.a = 0f + // actor.width, actor.height are empirically equal to the image's pixel dimensions + // at this moment, before actor has a parent, but I don't trust that happenstance. + val pixelArea = Rectangle(((actor as Image).drawable as TextureRegionDrawable).region) + // Scale max image dimensions into holder space minus padding preserving aspect ratio + val imageArea = Rectangle(this.width - 30f, maxHeight - 30f) + if (pixelArea.width * imageArea.height > imageArea.width * pixelArea.height) + imageArea.height = imageArea.width * pixelArea.height / pixelArea.width + else + imageArea.width = imageArea.height * pixelArea.width / pixelArea.height + actor.setSize(imageArea.width, imageArea.height) + if (actor is ImageWithFixedPrefSize) actor.setPrefSize(imageArea.width, imageArea.height) + add(actor) + } + } + } + + /** Determine the Victory to show initially - try to select the most interesting one for the current game. */ + private fun selectVictory(): String { + if (game.victoryData != null) return game.victoryData!!.victoryType + val victory = victories.asSequence() + .sortedWith( + compareByDescending { victory -> + completionPercentages[selectedCiv]?.get(victory) ?: 0 + }.thenByDescending { victory -> + game.civilizations.filter { it != selectedCiv && it.isMajorCiv() && it.isAlive() } + .maxOfOrNull { victoryCompletePercent(victory, it) } ?: 0 + } + ).firstOrNull() ?: victories.first() + return victory.name + } + + /** Calculate a completion percentage for a [victory] - + * relative weights for individual milestones are not equal in this implementation! + * (weight = number of sub-steps, or 2 if a milestone doesn't have any - very debatable) + */ + private fun victoryCompletePercent(victory: Victory, civ: Civilization): Int { + var points = 0 + var total = 0 + for (milestone in victory.milestoneObjects) { + val completed = milestone.hasBeenCompletedBy(civ) + val milestonePoints = when (milestone.type) { + MilestoneType.AddedSSPartsInCapital -> { + total += victory.requiredSpaceshipParts.size + civ.victoryManager.currentsSpaceshipParts.sumValues() + } + MilestoneType.DestroyAllPlayers -> { + total += if (selectedCiv.hideCivCount()) game.gameParameters.maxNumberOfPlayers + else game.civilizations.count { it.isMajorCiv() } + game.civilizations.count { + it != civ && it.isMajorCiv() && civ.knows(it) && it.isDefeated() + } + } + MilestoneType.CaptureAllCapitals -> { + total += if (selectedCiv.hideCivCount()) game.gameParameters.maxNumberOfPlayers + else game.getCities().count { it.isOriginalCapital } + civ.cities.count { it.isOriginalCapital } + } + MilestoneType.CompletePolicyBranches -> { + total += milestone.params[0].toInt() + civ.policies.completedBranches.size + } + MilestoneType.WorldReligion -> { + total += game.civilizations.count { it.isMajorCiv() && it.isAlive() } + val religion = civ.religionManager.religion?.takeUnless { it.isPantheon() } + game.civilizations.count { + religion != null && + it.isMajorCiv() && it.isAlive() && civ.knows(it) && + it.religionManager.isMajorityReligionForCiv(religion) + } + } + MilestoneType.ScoreAfterTimeOut -> { + total += game.gameParameters.maxTurns + game.turns.coerceAtMost(game.gameParameters.maxTurns) + } + else -> { + total += 2 + if (completed) 2 else 0 + } + } + points += milestonePoints + } + return points * 100 / total + } + + private fun getImages(victory: Victory): List { + game.victoryData?.run { + if (victory.name == victoryType && selectedCiv.civName == winningCiv) { + val image = getImageOrNull(victory, "Won") + return getWonOrLostStack(image, victory.victoryString, Color.GOLD) + } + val image = getImageOrNull(victory, "Lost") + return getWonOrLostStack(image, victory.defeatString.takeIf { victory.name == victoryType }, Color.MAROON) + } + + val result = mutableListOf() + result.addImageIf(victory, "Background") { true } + for (milestone in victory.milestoneObjects) { + val element = milestone.uniqueDescription.replace("[", "").replace("]", "") + result.addImageIf(victory, element) { milestone.hasBeenCompletedBy(selectedCiv) } + if (milestone.type != MilestoneType.AddedSSPartsInCapital) continue + for ((key, required) in victory.requiredSpaceshipPartsAsCounter) { + val built = selectedCiv.victoryManager.currentsSpaceshipParts[key] + result.addImageIf(victory, key) { built > 0 } + for (i in 1..required) + result.addImageIf(victory, "$key $i") { built >= i } + } + } + return result + } + + private fun getWonOrLostStack(image: Image?, text: String?, color: Color): List { + val container = if (text == null) null + else { + val label = text.toLabel(color, 50, Align.bottom) + label.wrap = true + label.width = maxLabelWidth + Container(label).apply { bottom() } + } + return listOfNotNull(image, container) + } + + /** Variant of [ImageWithCustomSize] that avoids certain problems. + * + * Reports a `prefWidth`/`prefHeight` set through [setPrefSize], which cannot be otherwise + * altered, especially not by ascendant layout methods, since they don't know the interface. + * This size defaults to the [drawable]'s minWidth/minHeight - same as what [Image] reports as + * `prefWidth`/`prefHeight` directly without the ability to override. + */ + private class ImageWithFixedPrefSize(drawable: Drawable) : Image(drawable) { + private var prefW: Float = prefWidth + private var prefH: Float = prefHeight + fun setPrefSize(w: Float, h: Float) { + prefW = w + prefH = h + } + override fun getPrefWidth() = prefW + override fun getPrefHeight() = prefH + } +} diff --git a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenOurVictory.kt b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenOurVictory.kt index bd175a901b..5c924b885d 100644 --- a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenOurVictory.kt +++ b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenOurVictory.kt @@ -1,13 +1,17 @@ package com.unciv.ui.screens.victoryscreen import com.badlogic.gdx.graphics.Color +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.utils.Align import com.unciv.logic.civilization.Civilization +import com.unciv.models.ruleset.MilestoneType import com.unciv.models.ruleset.Victory import com.unciv.ui.components.TabbedPager import com.unciv.ui.components.extensions.addSeparator import com.unciv.ui.components.extensions.toLabel +import com.unciv.ui.images.ImageGetter import com.unciv.ui.screens.basescreen.BaseScreen import com.unciv.ui.screens.worldscreen.WorldScreen @@ -15,6 +19,7 @@ class VictoryScreenOurVictory( worldScreen: WorldScreen ) : Table(BaseScreen.skin), TabbedPager.IPageExtensions { private val header = Table() + private val stageWidth = worldScreen.stage.width init { align(Align.top) @@ -25,7 +30,7 @@ class VictoryScreenOurVictory( defaults().pad(10f) for ((victoryName, victory) in victoriesToShow) { header.add("[$victoryName] Victory".toLabel()).pad(10f) - add(getColumn(victory, worldScreen.viewingCiv)) + add(getColumn(victory, worldScreen.viewingCiv)).top() } row() diff --git a/docs/Credits.md b/docs/Credits.md index 8c065e6a2e..eec0931bff 100644 --- a/docs/Credits.md +++ b/docs/Credits.md @@ -729,6 +729,7 @@ Unless otherwise specified, all the following are from [the Noun Project](https: - [Swords](https://thenounproject.com/icon/swords-1580316/) created by Muhajir ila Robbi for Blockaded tile marker - [Keyboard](https://thenounproject.com/icon/keyboard-2685534/) by Twenty Foo Studio for Options Keys - [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 ### Main menu diff --git a/docs/Modders/Images-and-Audio.md b/docs/Modders/Images-and-Audio.md index 4096d2f9f0..dffa938bf9 100644 --- a/docs/Modders/Images-and-Audio.md +++ b/docs/Modders/Images-and-Audio.md @@ -70,6 +70,28 @@ The Unit Types as defined in [UnitTypes.json](Mod-file-structure/4-Unit-related- The individual Beliefs - as opposed to Belief types, as defined in [Beliefs.json](Mod-file-structure/2-Civilization-related-JSON-files.md#beliefsjson) have no icons in the base game, but Civilopedia can decorate their entries if you supply images named 'Images/ReligionIcons/.png'. Civilopedia falls back to the icon for the Belief type - as you can see in the base game, but individual icons have precedence if they exist. +### Adding Victory illustrations + +You can enable pictures for each of the Victories, illustrating their progress. That could be a Spaceship under construction, showing the parts you've added, or cultural progress as you complete Policy branches. They will be shown on a new tab of the Victory Screen. + +For this, you need to create a number of images. In the following, `<>` denote names as they appear in [VictoryTypes.json](../Other/Miscellaneous-JSON-files.md#victorytypes-json), untranslated, and these file names (like any other in Unciv) are case-sensitive. All files are optional, except Background as noted: +* `VictoryIllustrations//Background.png` - this determines overall dimensions, the others must not exceed its size and should ideally have identical size. Mandatory, if this file is missing, no illustrations will be shown for this Victory Type. +* `VictoryIllustrations//Won.png` - shown if _you_ (the viewing player) won this Victory. +* `VictoryIllustrations//Lost.png` - shown if a competitor won this Victory - or you have completed this Victory, but have won a different one before. +* `VictoryIllustrations//.png` - One image for each entry in the `milestones` field without an `[amount]`, name taken verbatim but _without_ square brackets, spaces preserved. +* `VictoryIllustrations// .png` - For entries in the `milestones` field with an `[amount]`, one image per step, starting at index 1. +* `VictoryIllustrations//.png` - One image for each unique entry in the `requiredSpaceshipParts` field, that is, for parts that can only be built once. Spaces in unit names must be preserved. +* `VictoryIllustrations// .png` - For parts in the `requiredSpaceshipParts` field that must be built several times, one per instance. Spaces in unit names must be preserved, and there must be one space between the name and the index. Indexes start at 1. + +Remember - these are logical names as they are indexed in your atlas file, if you let Unciv pack for you, the `VictoryIllustrations` folder should be placed under `/Images` - or maybe `/Images.Victories` if you want these images to occupy a separate `Victories.atlas` (Do not omit the `Images` folder even if left empty, the texture packer needs it as marker to do its task). + +That's almost all there is - no json needed, and works as ['Permanent audiovisual mod'](#permanent-audiovisual-mods). The Background image is the trigger, and if it's present all part images must be present too, or your spaceship crashes before takeoff, taking Unciv along with it. That was a joke, all other images are optional, it could just look boring if you omit the wrong ones. + +As for "almost" - all images are overlaid one by one over the Background one, so they must all be the same size. Except for Won and Lost - those, if their condition is met, _replace_ the entire rest, so they can be different sizes than the background. The part images are overlaid over the background image in no guaranteed order, therefore they should use _transparency_ to avoid hiding parts of each other. + +One way to create a set is to take one final image, select all parts that should be the centerpiece itself not background (use lasso, magic wand or similar tools, use antialiasing and feathering as you see fit), copy and paste as new layer. Then apply desaturation and/or curves to the selection on the background layer to only leave a hint of how the completed victory will look like. Now take apart the centerpiece - do a selection fitting one part name, copy and paste as new layer (in place), then delete the selected part from the original centerpiece layer. Rinse and repeat, then export each layer separately as png with the appropriate filenames. +There's no suggested size, but keep in mind textures are a maximum of 2048x2048 pixels, and if you want your images packed properly, several should fit into one texture. They will be scaled down if needed to no more than 80% screen size, preserving aspect ratio. + ## Sounds Standard values are below. The sounds themselves can be found [here](/sounds).