Merge branch 'develop'

This commit is contained in:
Fingercomp 2025-08-19 21:01:27 +03:00
commit 9db2416d23
No known key found for this signature in database
GPG Key ID: BBC71CEE45D86E37
5 changed files with 17 additions and 6 deletions

View File

@ -1,5 +1,5 @@
name := "ocelot-desktop"
version := "1.14.0"
version := "1.14.1"
scalaVersion := "2.13.10"
lazy val root = project.in(file("."))

View File

@ -9,7 +9,7 @@ Let's assume you want to release a new version, say, `1.33.7`.
3. Update the version of Ocelot Desktop in `build.sbt`; commit the changes.
The commit message should just say "Version 1.33.7".
4. Switch to `master` and merge `develop` into it.
5. Create an annotated tag: `git -a v1.33.7`.
5. Create an annotated tag: `git tag -a v1.33.7`.
On the first line, write "Version 1.33.7", followed by a blank line.
Then describe the changes in Markdown.
Make sure not to use `#` in the text, since git will treat it as a comment.

View File

@ -42,7 +42,9 @@ class Settings(val config: Config) extends SettingsData {
windowSize.y -= 16
}
if (config.hasPath("ocelot.keymap")) {
keymap.load(config.getConfig("ocelot.keymap"))
}
recentWorkspace = config.getOptionalString("ocelot.workspace.recent")
pinNewWindows = config.getBooleanOrElse("ocelot.workspace.pinNewWindows", default = true)
@ -147,7 +149,7 @@ object Settings extends Logging {
}
logger.info(s"Using default Ocelot Desktop configuration...")
settings = new Settings(ConfigFactory.parseResources("/ocelot/desktop/ocelot.conf"))
settings = new Settings(ConfigFactory.parseResources(OcelotDesktop.getClass, "/ocelot/desktop/ocelot.conf"))
}
def save(path: Path): Unit = {

View File

@ -14,6 +14,11 @@ import ocelot.desktop.util.Logging
class ScrollView(val inner: Widget) extends Widget with Logging with HoverHandler {
override protected val layout: Layout = new Layout(this) {
override def recalculateBounds(): Unit = {
super.recalculateBounds()
maximumSize = inner.maximumSize
}
override def relayout(): Unit = {
inner.rawSetPosition(position - Vector2D(xOffset, yOffset))
inner.relayout()

View File

@ -11,7 +11,7 @@ import scala.collection.mutable
import scala.jdk.CollectionConverters._
class Keymap {
class Keymap extends Logging {
// default mappings
val map: mutable.Map[Keybind.Value, Int] = mutable.Map(
// OpenComputers
@ -84,7 +84,11 @@ class Keymap {
Keybind.values.foreach(keybind => {
val path = keybind.toString.toLowerCase
if (config.hasPath(path)) {
try {
set(keybind, config.getInt(path))
} catch {
case e: Throwable => logger.error(s"Skipping keymap config for '$path'...", e)
}
}
})
}