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).
|
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
|
## 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");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
12
build.gradle
12
build.gradle
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue