Skip to content

Commit

Permalink
Release 1.10.0.7!
Browse files Browse the repository at this point in the history
This also attempted to get scroll focus to automatically lock on to the main scrollpane in a tab, but I couldn't figure out how to wrangle the LML.
  • Loading branch information
tommyettinger committed Oct 24, 2021
1 parent de9623a commit 3235a7d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
}
}

version = "1.10.0.7-SNAPSHOT"
version = "1.10.0.7"
mainClassName = 'gdx.liftoff.MainKt'
sourceCompatibility = JavaVersion.VERSION_1_8

Expand Down
21 changes: 20 additions & 1 deletion src/main/kotlin/gdx/liftoff/views/MainView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent
import com.badlogic.gdx.scenes.scene2d.InputListener
import com.badlogic.gdx.scenes.scene2d.actions.Actions
import com.badlogic.gdx.scenes.scene2d.ui.Button
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener
import com.badlogic.gdx.utils.Align
import com.github.czyzby.autumn.annotation.Destroy
import com.github.czyzby.autumn.annotation.Inject
Expand All @@ -36,6 +37,7 @@ import gdx.liftoff.config.inject
import gdx.liftoff.config.threadPool
import gdx.liftoff.data.platforms.Android
import gdx.liftoff.data.project.Project
import gdx.liftoff.data.templates.official.ClassicTemplate
import gdx.liftoff.preferences.SdkVersionPreference
import org.lwjgl.BufferUtils
import org.lwjgl.glfw.GLFW
Expand Down Expand Up @@ -227,7 +229,7 @@ class MainView : ActionContainer {
@LmlAction("jvmLanguages") fun getLanguages(): Array<String> = languagesData.languages
@LmlAction("jvmLanguagesVersions") fun getLanguagesVersions(): Array<String> = languagesData.versions
@LmlAction("templates") fun getOfficialTemplates(): Array<String> =
templatesData.officialTemplates.map { it.id }.sortedWith { left, right -> left.compareTo(right) }
templatesData.officialTemplates.map { it.id }.sortedWith { left, right -> if(left == "classic") -1 else if (right == "classic") 1 else left.compareTo(right) }
.toTypedArray()

@LmlAction("thirdPartyTemplates") fun getThirdPartyTemplates(): Array<String> =
Expand Down Expand Up @@ -296,6 +298,23 @@ class MainView : ActionContainer {
})
}

/**
* I have no idea how to register this on an LML Actor. LML docs are no help. Agh.
*/
fun assignScrollFocus(actor: Actor) {
actor.addListener(object : ClickListener() {
override fun enter(event: InputEvent?, x: Float, y: Float, pointer: Int, fromActor: Actor?) {
actor.stage?.scrollFocus = actor
}

override fun exit(event: InputEvent?, x: Float, y: Float, pointer: Int, toActor: Actor?) {
super.exit(event, x, y, pointer, toActor)
if(actor.stage?.scrollFocus == actor)
actor.stage?.scrollFocus = null
}
})
}

/**
* Explicitly forces saving of Android SDK versions. They might not be properly updated as change events are not
* fired on programmatic SDK and tools versions changes.
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/i18n/nls.properties
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,12 @@ templatesTip=Hover over radio buttons for more info.
templatesLink=Missing your favorite setup? Propose a new template!
emptyTemplateTip=Generates no ApplicationListener implementation.
applicationListenerTip=Generates a main class implementing ApplicationListener.
applicationAdapterTip=Generates a main class extending ApplicationListener.
applicationAdapterTip=Generates a main class extending ApplicationAdapter.
inputProcessorTip=Generates a main class with input events handling.
gameTemplateTip=Generates a main class extending Game.
superKoalioTip=A sample self-contained 2D platformer game.
scene2dTemplateTip=A sample project using Scene2D to build GUI.
classicTip=Generates a main class drawing the libGDX logo.
classicTip=Generates a main class drawing the libGDX logo. Start here!
kotlinTemplateTip=A Kotlin project template with Kotlin application launchers.
ktxTemplateTip=A Kotlin project template with KTX utilities.
lmlTemplateTip=Uses LML to build Scene2D GUI.
Expand All @@ -355,7 +355,7 @@ lmlMvcVisTemplateTip=A project using the Autumn MVC framework with VisUI.
lmlMvcBox2dTemplateTip=A project using the Autumn MVC framework with Box2D.
noise4jTemplateTip=Noise4J sample generating random maps after clicking.
squidLibBasicTemplateTip=A sample application using SquidLib framework.
visUiBasicTemplateTip=A project using VisUI to build Scene2D GUI.
visUiBasicTemplateTip=A project using VisUI to build a Scene2D GUI.
visUiShowcaseTemplateTip=The VisUI framework showcase.
visEditorBasicTemplateTip=A sample application using exported VisEditor project.

Expand Down

0 comments on commit 3235a7d

Please sign in to comment.