Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
5d0f158c0c | |||
cbd60ebf9c | |||
00f21dbc60 |
6 changed files with 57 additions and 25 deletions
19
.gitlab-ci.yml
Normal file
19
.gitlab-ci.yml
Normal 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'
|
32
README.md
32
README.md
|
@ -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).
|
||||
|
||||

|
||||

|
||||
|
||||
## Quick Usage
|
||||
Add the Maven repository and the modImplementation to your `build.gradle`
|
||||
|
||||
```
|
||||
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:
|
||||
```java
|
||||
ImGuiQuilt.renderstack.add(new Renderable() {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Profiling Name";
|
||||
}
|
||||
ImGuiQuilt.renderstack.add(new Renderable() {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Profiling Name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Theme getTheme() {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Theme getTheme() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
ImGui.text("Example Text Element");
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void render() {
|
||||
ImGui.text("Example Text Element");
|
||||
}
|
||||
});
|
||||
```
|
||||
|
|
12
build.gradle
12
build.gradle
|
@ -114,10 +114,14 @@ publishing {
|
|||
// The repositories here will be used for publishing your artifact, not for
|
||||
// retrieving dependencies.
|
||||
maven {
|
||||
url "https://maven.eviee.gay/imgui-quilt"
|
||||
credentials {
|
||||
username = System.getenv('publishUser')
|
||||
password = System.getenv('publishToken')
|
||||
url "https://git.gaycatgirl.sex/api/v4/projects/21/packages/maven"
|
||||
name "GitLab"
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Job-Token"
|
||||
value = System.getenv('CI_JOB_TOKEN')
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
|
|||
org.gradle.parallel = true
|
||||
|
||||
# Mod Properties
|
||||
version = 1.0.2+1.19
|
||||
version = 1.0.3+1.19
|
||||
maven_group = gay.eviee
|
||||
archives_base_name = imguiquilt
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import imgui.flag.ImGuiConfigFlags;
|
|||
import imgui.gl3.ImGuiImplGl3;
|
||||
import imgui.glfw.ImGuiImplGlfw;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static org.lwjgl.glfw.GLFW.*;
|
||||
|
||||
public class ImguiLoader {
|
||||
|
@ -20,7 +22,14 @@ public class ImguiLoader {
|
|||
public static void onGlfwInit(long handle) {
|
||||
initializeImGui(handle);
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
"Evie Viau": "Author"
|
||||
},
|
||||
"contact": {
|
||||
"homepage": "https://sr.ht/~eviee/imgui-quilt/",
|
||||
"issues": "https://todo.sr.ht/~eviee/imgui-quilt",
|
||||
"sources": "https://git.sr.ht/~eviee/imgui-quilt"
|
||||
"homepage": "https://git.gaycatgirl.sex/evie/imgui-quilt",
|
||||
"issues": "https://git.gaycatgirl.sex/evie/imgui-quilt/-/issues",
|
||||
"sources": "https://git.gaycatgirl.sex/evie/imgui-quilt"
|
||||
},
|
||||
"icon": "assets/imguiquilt/icon.png"
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue