Skip to content

Releases: LazyWizard/lazylib

NOT AN UPDATE - normal players should skip to 2.8b below

25 Sep 15:48
Compare
Choose a tag to compare

This is a preview of the upcoming LazyLib release, adding support for Java 17 and Kotlin 2.0. I am uploading it here so modders using Kotlin and Mikohime's Starsector can double check that these changes won't break anything in their own code when the next version of Starsector lands.

The list of changes in this pre-release can be found here (git diff).

This is not a normal update and will not work with Starsector running Java 7 (the default) or 8. The current LazyLib release (2.8b) for Starsector 0.97a can be found here.

2.8b

03 Feb 01:59
Compare
Choose a tag to compare

Updated to be compatible with Starsector 0.97a

Changes to LazyFont:

  • Changed default blendSrc back to GL_SRC_ALPHA (was GL_ONE since 2.4c)

Deprecated org.lazywizard.lazylib.campaign.orbits.KeplerOrbit:

  • Deprecated at the request of its contributor

2.8

05 May 17:29
Compare
Choose a tag to compare
2.8

Updated to be compatible with Starsector 0.96a

Updated bundled libraries:

  • kotlin-stdlib: v1.5.31 -> v1.6.21
  • kotlinx-coroutines: v1.5.2 -> v1.6.4 (custom build)
  • These are the last versions that support Java 7

Added org.lazywizard.lazylib.campaign.orbits.KeplerOrbit:

  • Submitted by Liral, this provides more accurate orbits than EllipticalOrbit

Changes to CombatUtils:

  • Updated to use CombatEngineAPI's bin-lattice system where applicable, as requested by several modders since those methods introduction

2.7b

10 Dec 19:49
Compare
Choose a tag to compare

Updated to be compatible with Starsector 0.95.1a

Updated bundled libraries:

  • jetbrains-annotations: v22.0.0 -> 23.0.0

Changes to LazyFont.DrawableString:

  • Center/right-aligned text no longer requires maxWidth to be set
  • setRenderDebugBounds() now shows anchor and max size

2.7

23 Oct 00:38
Compare
Choose a tag to compare
2.7

Fixed links to online Starsector API in javadoc.zip

Updated bundled libraries:

  • kotlin-stdlib: v1.4.31 -> v1.5.31
  • kotlinx-coroutines: v1.4.3 -> v1.5.2
  • jetbrains-annotations: v20.1.0 -> 22.0.0

Changes to CombatUtils:

  • Fixed a bug where ships spawned by spawnShipOrWingDirectly() would
    report the wrong fleet side in some circumstances

Changes to LazyFont:

  • Fixed log spam with some whitespace being considered unsupported characters

Changes to LazyFont.DrawableString:

  • Fixed minor memory leak when dispose() is not called before GC
  • Added TextAlignment, setAlignment(), and getAlignment(). TextAlignment
    controls whether text is drawn left-aligned (the default), right-aligned,
    or centered
  • Added TextAnchor, setAnchor(), and getAnchor(). TextAnchor controls the
    origin when drawing text; for example, TextAnchor.TOP_LEFT (the default)
    will mean draw() will start drawing at the top left, so the text will
    appear below and to the right of the position passed into draw()
  • Added setBaseColor() and getBaseColor() (replace setColor()/getColor())
  • Added isRebuildNeeded() and triggerRebuildIfNeeded() (unnecessary 99% of
    the time as rebuilding happens automatically, but useful in fringe cases)
  • Cleaned up some out-of-date documentation

Deprecated in LazyFont.DrawableString:

  • Deprecated setColor() and getColor(), as users were assuming they set the
    color of the next append. Added setBaseColor() and getBaseColor() as
    replacements that better convey what these methods do (set/get the color of
    all text that doesn't have a color argument passed in)

2.6

26 Mar 18:24
Compare
Choose a tag to compare
2.6

Updated to be compatible with Starsector 0.95a

Updated bundled libraries:

  • kotlin-stdlib: v1.4.21 -> v1.4.31
  • kotlinx-coroutines: v1.4.2 -> v1.4.3

The Javadoc's index is now one single page

Added org.lazywizard.lazylib.IOUtils:

  • Contains methods to help with reading/writing files using the API
  • byte[] readAllBytes(String filePath), an API-safe port of
    java.nio.Files.readAllBytes()

Changes to LazyFont.DrawableString:

  • Added tab support (2x the base vertical height of the text)
  • Added append(String text)
  • Added append(String text, Color color)
  • Added appendIndented(String text, int indent)
  • Added appendIndented(String text, Color color, int indent)
  • Added getBlendSrc(), setBlendSrc(int blendSrc), getBlendDest(), and
    setBlendDest(int blendDest) to control color blending

Deprecated in LazyFont.DrawableString:

  • Deprecated all appendText() methods in favor of new append() equivalents.
    The append() variants take any object and return the DrawableString so that
    calls can be chained together

2.5c

23 Jan 06:44
Compare
Choose a tag to compare

Changes to LazyFont.DrawableString:

  • Fixed rendering issues on some computers (thanks to Dream from the
    Discord server for reporting the bug and testing the fix)
  • Added colored substring support
  • Added appendText(String text, Color color)
  • Added appendText(String text, Color color, int indent)
  • Appending colored text only colors that substring, and all subsequent
    text will return to the base color chosen at DrawableString creation.
    To change the base color, call DrawableString.setColor()

2.5b

20 Jan 23:28
Compare
Choose a tag to compare

Retroactively renamed v2.4g to v2.5

Changes to LazyFont:

  • Added getFontName()

Changes to LazyFont.DrawableString:

  • Fixed a crash with word-wrapped text that includes a hyphenated line break
  • Added setRenderDebugBounds(), which draws a box showing the text's width,
    height, and position

2.5

18 Jan 21:53
Compare
Choose a tag to compare
2.5

Updated bundled libraries:

  • kotlin-stdlib: v1.3.61 -> v1.4.21
  • kotlinx-coroutines: v1.2.0 -> v1.4.2
  • jetbrains-annotations: v13.0 -> v20.1.0
  • removed kotlinx-atomicfu (this was an erroneous dependency added by
    an earlier version of kotlinx-coroutines and wasn't used for anything)

Changes to LazyFont:

  • Rewrote DrawableString to use vertex buffers instead of display lists.
    This should fix a bug that caused text corruption and visual glitches
    when DrawableStrings were rendered in the campaign layer

Deprecated in LazyFont:

  • Deprecated drawText(String text, float x, float y, float fontSize,
    float maxWidth, float maxHeight), use createText() instead

2.4f

31 Jan 07:41
Compare
Choose a tag to compare

Updated bundled Kotlin runtime library to v1.3.61
Javadoc is now available online at https://lazywizard.github.io/lazylib
Moved .version file hosting to GitHub