Skip to content

Commit

Permalink
Start making suggested QoL changes.
Browse files Browse the repository at this point in the history
There's the iOS MinimumOSVersion change to 11.0 . There's the start to having default values in each of the most common fields, to match the fast usage of gdx-setup. There's also includes a safeguard against loading VisUI twice.
  • Loading branch information
tommyettinger committed Mar 3, 2024
1 parent 02c03f2 commit 78c1494
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/kotlin/gdx/liftoff/config/Configuration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class Configuration {
@Initiate(priority = AutumnActionPriority.TOP_PRIORITY)
fun initiate(skinService: SkinService, interfaceService: InterfaceService, localeService: LocaleService) {
VisUI.setSkipGdxVersionCheck(true)
VisUI.load(Gdx.files.internal("skin/tinted.json"))
if(!VisUI.isLoaded())
VisUI.load(Gdx.files.internal("skin/tinted.json"))
skinService.addSkin("default", VisUI.getSkin())
FileChooser.setDefaultPrefsName(PREFERENCES_PATH)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ import com.github.czyzby.autumn.mvc.stereotype.preference.Property
*/
@Property("MainClass")
@Suppress("unused") // Referenced via reflection.
class MainClassPreference : AbstractStringPreference()
class MainClassPreference : AbstractStringPreference(){
override fun getDefault(): String {
return "Main"
}
}
7 changes: 6 additions & 1 deletion src/main/kotlin/gdx/liftoff/preferences/NamePreference.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ import com.github.czyzby.autumn.mvc.stereotype.preference.Property
*/
@Property("Name")
@Suppress("unused") // Referenced via reflection.
class NamePreference : AbstractStringPreference()
class NamePreference : AbstractStringPreference(){
override fun getDefault(): String {
return "ExampleGame"
}
}

9 changes: 7 additions & 2 deletions src/main/kotlin/gdx/liftoff/preferences/PackagePreference.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ package gdx.liftoff.preferences
import com.github.czyzby.autumn.mvc.stereotype.preference.Property

/**
* Saves package name. Package name is usually company-dependant and often shared (at least partially) across multiple projects.
* Saves package name. Package name is usually company-dependent and often shared (at least partially) across
* multiple projects.
*/
@Property("Package")
@Suppress("unused") // Referenced via reflection.
class PackagePreference : AbstractStringPreference()
class PackagePreference : AbstractStringPreference() {
override fun getDefault(): String {
return "com.libgdx.example"
}
}
2 changes: 1 addition & 1 deletion src/main/resources/generator/ios/Info.plist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<key>UIStatusBarHidden</key>
<true/>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>11.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
Expand Down

0 comments on commit 78c1494

Please sign in to comment.