Commit Graph

134 Commits

Author SHA1 Message Date
yairm210
f764f7c467 Fix tests 2024-08-08 14:16:34 +03:00
Yair Morgenstern
e42e3273fe 4.12.14 2024-07-28 00:36:22 +03:00
yairm210
f03c30ed5c - Desktop: Allow specifying data directory (for "local" files, in GDX terms) separate from installed files directory (What GDX terms "internal").
- Added helper functions for common paths
- Does not include a way to specify said directory - pending tests
2024-07-27 23:13:27 +03:00
Yair Morgenstern
64e2c9aee0
Multiplayer notifications need to be untranslated because it accesses 'current game' (#11963) 2024-07-14 18:36:15 +03:00
Md. Touhidur Rahman
a2574c2831
More Numbers Translations Coverage (#11943)
* `setText()` coverage

* fix suggestions

* fix victory status > our status issues

* `toString()` coverage

* fix build issues

* Update MultiplayerTurnCheckWorker.kt
2024-07-14 09:22:38 +03:00
焕晨HChen
4db4400105
Optimize screen orientation (#11875) 2024-06-29 23:57:11 +03:00
SomeTroglodyte
b5622df92d
Support for languages using Diacritics as multi-codepoint joiners (#11806)
* Diacritics support - achieving 1-Char-Per-Glyph via a fake alphabet

* Diacritics support - Redesign state engine and polishing

* Diacritics support - Unit test

* Diacritics support - Expand unit test to cover more cases

* Diacritics support - Expand unit test to cover more cases

* Clarify a function name

* Change format of diacritic definitions

* Refactor DiacriticSupport to per-language class with statics in Companion

* Update DiacriticSupport to use CharCategory and enable support of surrogate pairs

* Documentation
2024-06-29 23:39:46 +03:00
SomeTroglodyte
a7d40faade
Fix: Android pause/resume cycle not working (#11511)
* Fix Concurrency being zombified but still tasked to run stuff

* Do not tie Android logcat output to whether Gdx was built for debugging

* Simplify GameStartScreen

* Add wiki page on Debugging/Building for Android
2024-04-25 15:44:40 +03:00
Yair Morgenstern
52a9eebe28 Gradle 8.2, remove all IOS references due to robovm bug (which we don't use) 2024-01-28 12:35:29 +02:00
Yair Morgenstern
1cfe9e4076 Returning old function, because LibGDX function is a one-way set
See 0ddf67530f
2023-12-25 22:11:50 +02:00
Yair Morgenstern
0ddf67530f @SomeTroglodyte
initialize() calls useImmersiveMode() internally, which would override the system ui visibility we manually set, leading to setting effectively being ignored on startup

Also, we can use LibGDX's builting function, which is more future-proof :)
2023-12-25 20:04:34 +02:00
SomeTroglodyte
987f67d9cd
[code quality] Reorg, clean up and comment a few things (#10527)
* UncivGame is a pure class file again, GUI split off

* Purify GameSettings step 1 - non-multiplayer nested classes

* Purify GameSettings step 2 - multiplayer nested classes

* Purify GameParameters - BaseRuleset to own file

* Rework WindowState to centralize minimum/maximum treatment

* Rename MultiplayerTurnNotifierDesktop to UncivWindowListener

* Clarifications on what the WindowListener actually does (and now the attention-getting does something on non-Windows too)
2023-11-19 23:52:15 +02:00
SomeTroglodyte
98c3c446c5
Allow controlling Android fullscreen from options (#10518) 2023-11-18 22:38:36 +02:00
SomeTroglodyte
659a01c166
CrashScreen info improved, allow easier testing of CrashScreen (#10485)
* Drop AndroidTvLauncher - unused

* Additional memory info on Android CrashScreen

* Refactor getModsAndBaseRuleset - reduce clones and put base first

* Add Permanent audiovisual Mods to CrashScreen report

* Add a secret Debug option to intentionally crash Unciv

* Make "Secret" debug OptionsPopup page available on Android w/o physical keyboard

* Add AndroidTvLauncher back in

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-11-13 22:26:38 +02:00
SomeTroglodyte
cfeed82800
Whitespace linting for opening curly braces and inheritance colon (#10490) 2023-11-13 22:11:55 +02:00
SomeTroglodyte
eb33b7d513
Custom save/load UI tweaks and blocking saving online MP games locally (#10358)
* Allow typing Y and N in file names in Linux custom save file dialog

* Fix default custom save location suggestion on X11

* Minor linting

* Allow clean reactivation of custom buttons after cancelling the file chooser

* User-Cancel support on Android and non-X11 desktop

* Block custom save for online multiplayer games

* Fix X11 custom save remembering location

* Fix X11 custom save "Save" button enabling, forbid potentially bad names

* Add overwrite confirmation to X11 custom save

* Redefine how local saving of online multiplayer games is blocked
2023-10-29 19:00:45 +02:00
SomeTroglodyte
4b41b5586a
Hack Android NotoSansSymbols font into submission (#10360)
* Linting

* Patch font metrics on Android for weird cases
2023-10-29 18:59:56 +02:00
SomeTroglodyte
13e3baac74
Split Fonts.kt (#10267)
* Fix font "symbols" not showing

* Move Fonts.kt to sub-package

* Re-sort imports

* Move top-level constants to prepare split

* Split Fonts.kt each existing class to its own file

* Split off FontRulesetIcons

* Linting and comments
2023-10-08 22:03:53 +03:00
SomeTroglodyte
49e2979427
Align ruleset icons in text to font metrics (#10233)
* Try to respect actual font layout, so fontSizeMultiplier works for ruleset icons too

* Replace font-based nation symbol in top bar with statically sized actor

* Reuse getReadonlyPixmap in extractPixmapFromTextureRegion

* Tweak topbar selected civ vertical align to be more pleasing to the human eye

* FasterUIDevelopment missing implementation of FontMetricsCommon

* Address hardcoded pixel coordinates comment

* Readability and comment cleanup

* More readability changes
2023-10-07 22:00:30 +03:00
Yair Morgenstern
4ddaf9b2c4 performance: Don't enqueue multiplayer game update for 0 games 2023-09-05 19:07:36 +03:00
Yair Morgenstern
a4cc566a8a performance: Don't autoupdate multiplayer games more than a week old - they're inactive games 2023-09-05 19:00:44 +03:00
Yair Morgenstern
5cc57f9293 performance: Don't calc checksum for non-multiplayer games, no one cares if you hack your own game 2023-09-05 18:52:42 +03:00
SomeTroglodyte
abb0dcbaae
Mod name defense attempt II (#9645)
* Improve Load game error label readability

* Fix threading on load game screen

* Miscellaneous tweaks

* Compatibility with Mods using trailing dashes on Windows
2023-06-25 09:38:18 +03:00
SomeTroglodyte
650a43aa3b
Make UncivGame.isInitialized inaccessible outside of the class hierarchy (#9651)
* Make UncivGame.isInitialized inaccessible outside of the class hierarchy

* Fix JvmName
2023-06-25 09:03:44 +03:00
alexban011
91116f8df3
Fixed more warnings (#9401)
* fix: fix FunctionParameterNaming warnings

* fix: fix InvalidPackageDeclaration warnings

* fix: fix MatchingDeclarationName warnings

* fix: fix WrongEqualsTypeParameter warnings

* fix: fix UnusedPrivateProperty warnings

* fix: fix UseCheckOrError warningsU

* fix: fix UseRequire warningsU

* detekt: disabled SpreadOperator rule

* fix: resolve MemberNameEqualsClassName rule

* detekt: disabled ForbiddenComment rule

* fix: resolved SwallowedException warning

* fix: resolved ThrowingExceptionsWithoutMessageOrCause warning

* fix: resolved EmptyFunctionBlock warning

* fix: resolved EmptyFunctionBlock warning

* fix: resolved InstanceOfCheckForError warning

* detekt: disable TooGenericExceptionCaught warning

* detekt: disable TooGenericExceptionThrown warning

* fix: resolve part of NestedBlockDepth warnings
2023-05-18 10:12:33 +03:00
Yair Morgenstern
48bd416347
Multi-server preparations: Save server info in game, save server functionality in specific class (#9379)
* Save server info in game

* Moved server functionality into server class

* Fix Android multiplayer update
2023-05-13 21:51:44 +03:00
SomeTroglodyte
97769b89b6
Combat java.util.star-import (#9382) 2023-05-13 21:50:55 +03:00
alexban011
f3e80a4021
Fixed a couple warnings reported by code analysis (#9364)
* fix: resolve EmptyCatchBlock warnings

* fix: resolve PrintStackTrace warnings

* fix: resolve SwallowedException warnings

* fix: resolve ThrowingExceptionsWithoutMessageOrCause warnings

* fix: resolve ConstructorParameterNaming warnings

* fix: resolve FunctionParameterNaming warnings

* fix: resolve InvalidPackageDeclaration warnings

* fix: resolve ForEachOnRange warnings

* fix: resolve ImplicitDefaultLocale warnings

* fix: resolve MayBeConst warnings

* fix: resolve NewLineAtEndOfFile warnings

* fix: resolve UnusedParameter warnings

* fix: resolve UtilityClassWithPublicConstructor warnings

* fix: resolve WildcardImport warnings
2023-05-10 11:43:53 +03:00
Gualdimar
ba63f9a62b
Fixed the positioning of popups after changing the screen orientation on Android (#8927) 2023-03-16 20:48:24 +02:00
vegeta1k95
b57232c992
Android: selectable orientation (#8822)
* Android: selectable orientation

* Fix visible rectangle bug, fix auto-rotate behaviour, add translations

* Fix translation

---------

Co-authored-by: vegeta1k95 <vfylfhby>
2023-03-06 10:35:14 +02:00
vegeta1k95
f55e010451
Android: "Screen Mode" option (#8785)
* Android: "Screen Mode" option

* Fix broken tests, code cleanup

* Fix broken tests, code cleanup

* Fix broken tests, code cleanup

---------

Co-authored-by: vegeta1k95 <vfylfhby>
2023-03-04 19:22:09 +02:00
Leonard Günther
50da1ee90a
Fixed wrong implementation of Basic auth (#8779)
* Fixed wrong implementation of Basic auth

+ added min length for passwords

* Fixed basic auth being compressed

+ added function to get auth header from settings
2023-03-01 21:12:12 +02:00
vegeta1k95
494fde53cf
Cleaning: platform specifics and UncivGame (#8773)
* Cleanup: platform specifics + UncivGame

* Fix tests

* Fix requests not clearing

---------

Co-authored-by: vegeta1k95 <vfylfhby>
2023-02-28 18:56:57 +02:00
Leonard Günther
8f7fcb2e3e
Fixed TurnChecker can not authenticate (#8770) 2023-02-27 16:51:27 +02:00
Yair Morgenstern
8e17c9ed98 4.5.0-patch2
Lazy loading of system fonts so startup is fast
2023-02-26 09:33:02 +02:00
vegeta1k95
b5ce086860
Android: use best possible device frame rate (#8728)
* Android: use best possible device frame rate

* Add support for devices with Android 6.0+

---------

Co-authored-by: vegeta1k95 <vfylfhby>
2023-02-23 22:40:58 +02:00
vegeta1k95
c593056e42
Modding: allow mods to supply custom fonts (#8715)
* Modding: allow mods to supply custom fonts

* Cleanup

* Code cleanup

---------

Co-authored-by: vegeta1k95 <vfylfhby>
2023-02-21 23:09:11 +02:00
Yair Morgenstern
c6b888e6ed Fix android build 2023-02-19 16:35:20 +02:00
lishaoxia1985
4b2d4a3877
Gradle update, offerButton.isEnabled = false in initial (#8600) 2023-02-06 14:21:46 +02:00
Yair Morgenstern
a4fde1ae3c Resolved #8158 - Fallback images for all major objects 2023-01-24 23:52:34 +02:00
Yair Morgenstern
04cb4bd2a9 Resolved #7177 - Android custom location save 2023-01-23 23:55:21 +02:00
Yair Morgenstern
211a637e31 Fixed Android build, hopefully 2023-01-18 19:28:16 +02:00
CrispyXYZ
68c6c60f77
Show CrashScreen instead of quit when crash on Android (#8263) 2022-12-29 13:51:53 +02:00
Xander Lenstra
ae5a0221ed
Refactorings & three more unit tests for uniques (#7412) 2022-07-10 23:19:45 +02:00
Yair Morgenstern
6c533d63fb Hopefully resolved ANRs caused by available fonts taking too long to load 2022-07-08 16:54:21 +03:00
Timo T
57ed61af41
Save compatibility handling (#7255)
* Add serialization version to GameInfo

* Add handling of incompatible saves due to a dfiferent save version

* Fix compilation?

* Fix ios compilation

* Refactor: Make it clearer that GameInfo serialization version is only supposed to be incremented when it's guaranteed to cause issues & rename to compatibility version

* Update initial version

* Update initial version

* Fix merge mistake
2022-07-01 09:34:41 +03:00
Timo T
bc9a42e452
Save uncaught exception to file (#7247)
* Refactor: Rename GameSaver to UncivFiles

* Save last uncaught exception to file

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-06-25 22:30:27 +03:00
alexban011
51ba657b75
Added option to select font size (#7238) 2022-06-25 13:46:12 +02:00
Timo T
68cc4303ec
Make popups and text fields nicer to interact with on Android (#7211)
* Make popups and text fields nicer to interact with on Android

* Refactor: Rename createTextField to UncivTextField.create

* Fix multiplayer save delete text
2022-06-22 09:32:20 +03:00
alexban011
564f7b476c
small fixes (#7181)
* fixes

* relaced translations with _

* better displayCutout
2022-06-16 18:56:18 +03:00