Compare commits

...
Sign in to create a new pull request.

3 commits
main ... 1.19

Author SHA1 Message Date
5d0f158c0c
Update project id 2023-07-13 22:37:40 -04:00
cbd60ebf9c
Force GLSL version 140 for macOS 2023-06-21 14:03:02 -04:00
00f21dbc60
Implement GitLab CI 2023-06-19 11:38:16 -04:00
6 changed files with 57 additions and 25 deletions

19
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,19 @@
image: gradle:7-jdk17
stages:
- build
- publish
build:
stage: build
script:
- 'gradle assemble'
artifacts:
paths:
- build/libs/*.jar
expire_in: 1 week
publish-maven:
stage: publish
script:
- 'gradle publish'

View file

@ -2,14 +2,14 @@
Quilt interface for [imgui-java](https://github.com/SpaiR/imgui-java), an updated version of [imgui-mc](https://github.com/mjwells2002/imgui-mc). Quilt interface for [imgui-java](https://github.com/SpaiR/imgui-java), an updated version of [imgui-mc](https://github.com/mjwells2002/imgui-mc).
![ImGui Demo Window Running in Minecraft](https://git.sr.ht/~eviee/imgui-quilt/blob/main/assets/demowindowscreenshot.png) ![ImGui Demo Window Running in Minecraft](https://git.gaycatgirl.sex/evie/imgui-quilt/-/raw/main/assets/demowindowscreenshot.png)
## Quick Usage ## Quick Usage
Add the Maven repository and the modImplementation to your `build.gradle` Add the Maven repository and the modImplementation to your `build.gradle`
``` ```
maven { maven {
url "https://maven.eviee.gay/imgui-quilt" url "https://git.gaycatgirl.sex/api/v4/projects/21/packages/maven"
} }
``` ```
@ -23,20 +23,20 @@ Use ImGui methods in `render()` of the `Renderables` interface.
Example: Example:
```java ```java
ImGuiQuilt.renderstack.add(new Renderable() { ImGuiQuilt.renderstack.add(new Renderable() {
@Override @Override
public String getName() { public String getName() {
return "Profiling Name"; return "Profiling Name";
} }
@Override @Override
public Theme getTheme() { public Theme getTheme() {
return null; return null;
} }
@Override @Override
public void render() { public void render() {
ImGui.text("Example Text Element"); ImGui.text("Example Text Element");
} }
}); });
``` ```

View file

@ -114,10 +114,14 @@ publishing {
// The repositories here will be used for publishing your artifact, not for // The repositories here will be used for publishing your artifact, not for
// retrieving dependencies. // retrieving dependencies.
maven { maven {
url "https://maven.eviee.gay/imgui-quilt" url "https://git.gaycatgirl.sex/api/v4/projects/21/packages/maven"
credentials { name "GitLab"
username = System.getenv('publishUser') credentials(HttpHeaderCredentials) {
password = System.getenv('publishToken') name = "Job-Token"
value = System.getenv('CI_JOB_TOKEN')
}
authentication {
header(HttpHeaderAuthentication)
} }
} }
} }

View file

@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true org.gradle.parallel = true
# Mod Properties # Mod Properties
version = 1.0.2+1.19 version = 1.0.3+1.19
maven_group = gay.eviee maven_group = gay.eviee
archives_base_name = imguiquilt archives_base_name = imguiquilt

View file

@ -8,6 +8,8 @@ import imgui.flag.ImGuiConfigFlags;
import imgui.gl3.ImGuiImplGl3; import imgui.gl3.ImGuiImplGl3;
import imgui.glfw.ImGuiImplGlfw; import imgui.glfw.ImGuiImplGlfw;
import java.util.Locale;
import static org.lwjgl.glfw.GLFW.*; import static org.lwjgl.glfw.GLFW.*;
public class ImguiLoader { public class ImguiLoader {
@ -20,7 +22,14 @@ public class ImguiLoader {
public static void onGlfwInit(long handle) { public static void onGlfwInit(long handle) {
initializeImGui(handle); initializeImGui(handle);
imGuiGlfw.init(handle,true); imGuiGlfw.init(handle,true);
imGuiGl3.init();
if (System.getProperty("os.name").toLowerCase(Locale.getDefault()).contains("mac")) {
// force it to use opengl 3.1 instead of 3.0 because Apple
imGuiGl3.init("#version 140");
} else {
imGuiGl3.init("#version 130");
}
windowHandle = handle; windowHandle = handle;
} }

View file

@ -12,9 +12,9 @@
"Evie Viau": "Author" "Evie Viau": "Author"
}, },
"contact": { "contact": {
"homepage": "https://sr.ht/~eviee/imgui-quilt/", "homepage": "https://git.gaycatgirl.sex/evie/imgui-quilt",
"issues": "https://todo.sr.ht/~eviee/imgui-quilt", "issues": "https://git.gaycatgirl.sex/evie/imgui-quilt/-/issues",
"sources": "https://git.sr.ht/~eviee/imgui-quilt" "sources": "https://git.gaycatgirl.sex/evie/imgui-quilt"
}, },
"icon": "assets/imguiquilt/icon.png" "icon": "assets/imguiquilt/icon.png"
}, },