Skip to content

Commit

Permalink
Upgrade imgui-java to 1.86.12 (macosarm64 build) and lwjgl to 3.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraq committed Aug 13, 2024
1 parent 354678f commit 51921e4
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 21 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ subprojects {

ext {
groovyVersion = '4.0.21'
imguiVersion = '1.86.11'
imguiVersion = '1.86.12'
jomlVersion = '1.10.6'
jomlPrimitivesVersion = '1.10.0'
logbackVersion = '1.5.6'
lwjglVersion = '3.3.3'
lwjglVersion = '3.3.4'
slf4jVersion = '2.0.13'
}
ext.targetPlatform = targetPlatform
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ import static imgui.flag.ImGuiWindowFlags.*
import static org.lwjgl.glfw.GLFW.*

import groovy.transform.TupleConstructor
import java.nio.file.Files
import java.nio.file.StandardCopyOption

/**
* Wrapper around all of the `imgui-java` binding classes, hiding all of the
Expand All @@ -64,20 +62,6 @@ class ImGuiLayer implements AutoCloseable, InputSource {
static ImFont robotoFont
static ImFont robotoMonoFont

static {

// Extract and use the locally built natives for macOS running M processors
if (System.isMacOs() && System.isArm64()) {
ImGuiLayer.classLoader.getResourceAsStream('io/imgui/java/native-bin/libimgui-javaarm64.dylib').withStream { inputStream ->
var tmpDir = File.createTempDir('imgui-java-natives-macos-arm64')
tmpDir.deleteOnExit()
var libFile = new File(tmpDir, 'libimgui-javaarm64.dylib')
Files.copy(inputStream, libFile.toPath(), StandardCopyOption.REPLACE_EXISTING)
System.load(libFile.absolutePath)
}
}
}

final MainMenu mainMenu
final GameWindow gameWindow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ class EntryList implements EventTarget, ImGuiElement {
specialEntry = entries.remove(specialEntryIndex)
}

var sortingColumn = tableSortSpecs.specs.columnIndex
switch (sortingColumn) {
var sortingColumnSpecs = tableSortSpecs.specs[0]
switch (sortingColumnSpecs.columnIndex) {
case 1 -> entries.sort { it.type }
case 2 -> entries.sort { it.size }
case 3 && entries[0] instanceof MixEntry -> entries.sort { it.description }
default -> entries.sort { it.name }
}
if (tableSortSpecs.specs.sortDirection == ImGuiSortDirection.Descending) {
if (sortingColumnSpecs.sortDirection == ImGuiSortDirection.Descending) {
entries.reverse(true)
}

Expand Down

0 comments on commit 51921e4

Please sign in to comment.