[Build] Remove lomok from imgui-app
This commit is contained in:
1 parent
423612cdc4
commit
93f8a11aac
6 files changed
+64
-13
No files matched your search
@@ -12,4 +12,5 @@
|
|||||||
<suppress checks="ParameterNumber" files="[\\/]imgui[\\/]"/>
|
<suppress checks="ParameterNumber" files="[\\/]imgui[\\/]"/>
|
||||||
<suppress checks="FileLength" files="[\\/]imgui[\\/]"/>
|
<suppress checks="FileLength" files="[\\/]imgui[\\/]"/>
|
||||||
<suppress checks="FinalParameters" files="ImGui.java"/>
|
<suppress checks="FinalParameters" files="ImGui.java"/>
|
||||||
|
<suppress checks="DesignForExtension" files="[\\/]imgui[\\/]app[\\/]"/>
|
||||||
</suppressions>
|
</suppressions>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java-library'
|
id 'java-library'
|
||||||
id 'io.freefair.lombok' version '6.0.0-m2'
|
|
||||||
id 'checkstyle'
|
id 'checkstyle'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'signing'
|
id 'signing'
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
# This file is generated by the 'io.freefair.lombok' Gradle plugin
|
|
||||||
config.stopBubbling = true
|
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
package imgui.app;
|
package imgui.app;
|
||||||
|
|
||||||
import lombok.Data;
|
import java.util.Arrays;
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object for color data.
|
* Object for color data.
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class Color implements Cloneable {
|
public class Color implements Cloneable {
|
||||||
private final float[] data = new float[4];
|
private final float[] data = new float[4];
|
||||||
|
|
||||||
|
public Color() {
|
||||||
|
}
|
||||||
|
|
||||||
public Color(final float[] color) {
|
public Color(final float[] color) {
|
||||||
set(color);
|
set(color);
|
||||||
}
|
}
|
||||||
@@ -49,6 +49,30 @@ public class Color implements Cloneable {
|
|||||||
return data[3];
|
return data[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final Color color = (Color) o;
|
||||||
|
return Arrays.equals(data, color.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Arrays.hashCode(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Color{"
|
||||||
|
+ "data=" + Arrays.toString(data)
|
||||||
|
+ '}';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to clone Color instance.
|
* Method to clone Color instance.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
package imgui.app;
|
package imgui.app;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data class to provide basic information about the window. Like, the title name etc.
|
* Data class to provide basic information about the window. Like, the title name etc.
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
public class Configuration {
|
public class Configuration {
|
||||||
/**
|
/**
|
||||||
* Application title.
|
* Application title.
|
||||||
@@ -23,4 +20,36 @@ public class Configuration {
|
|||||||
* When true, application will be maximized by default.
|
* When true, application will be maximized by default.
|
||||||
*/
|
*/
|
||||||
private boolean fullScreen = false;
|
private boolean fullScreen = false;
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(final String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWidth() {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWidth(final int width) {
|
||||||
|
this.width = width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(final int height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFullScreen() {
|
||||||
|
return fullScreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFullScreen(final boolean fullScreen) {
|
||||||
|
this.fullScreen = fullScreen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ public abstract class Window {
|
|||||||
*
|
*
|
||||||
* @param config configuration object with basic window information
|
* @param config configuration object with basic window information
|
||||||
*/
|
*/
|
||||||
protected final void init(final Configuration config) {
|
protected void init(final Configuration config) {
|
||||||
initWindow(config);
|
initWindow(config);
|
||||||
initImGui(config);
|
initImGui(config);
|
||||||
imGuiGlfw.init(handle, true);
|
imGuiGlfw.init(handle, true);
|
||||||
@@ -52,7 +52,7 @@ public abstract class Window {
|
|||||||
/**
|
/**
|
||||||
* Method to dispose all used application resources and destroy its window.
|
* Method to dispose all used application resources and destroy its window.
|
||||||
*/
|
*/
|
||||||
protected final void dispose() {
|
protected void dispose() {
|
||||||
imGuiGl3.dispose();
|
imGuiGl3.dispose();
|
||||||
imGuiGlfw.dispose();
|
imGuiGlfw.dispose();
|
||||||
disposeImGui();
|
disposeImGui();
|
||||||
@@ -139,7 +139,7 @@ public abstract class Window {
|
|||||||
/**
|
/**
|
||||||
* Main application loop.
|
* Main application loop.
|
||||||
*/
|
*/
|
||||||
protected final void run() {
|
protected void run() {
|
||||||
while (!GLFW.glfwWindowShouldClose(handle)) {
|
while (!GLFW.glfwWindowShouldClose(handle)) {
|
||||||
startFrame();
|
startFrame();
|
||||||
preProcess();
|
preProcess();
|
||||||
|
|||||||
Reference in new issue
Block a user