[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
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'io.freefair.lombok' version '6.0.0-m2'
|
||||
id 'checkstyle'
|
||||
id 'maven-publish'
|
||||
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;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Object for color data.
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class Color implements Cloneable {
|
||||
private final float[] data = new float[4];
|
||||
|
||||
public Color() {
|
||||
}
|
||||
|
||||
public Color(final float[] color) {
|
||||
set(color);
|
||||
}
|
||||
@@ -49,6 +49,30 @@ public class Color implements Cloneable {
|
||||
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.
|
||||
*
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package imgui.app;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Data class to provide basic information about the window. Like, the title name etc.
|
||||
*/
|
||||
@Data
|
||||
public class Configuration {
|
||||
/**
|
||||
* Application title.
|
||||
@@ -23,4 +20,36 @@ public class Configuration {
|
||||
* When true, application will be maximized by default.
|
||||
*/
|
||||
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
|
||||
*/
|
||||
protected final void init(final Configuration config) {
|
||||
protected void init(final Configuration config) {
|
||||
initWindow(config);
|
||||
initImGui(config);
|
||||
imGuiGlfw.init(handle, true);
|
||||
@@ -52,7 +52,7 @@ public abstract class Window {
|
||||
/**
|
||||
* Method to dispose all used application resources and destroy its window.
|
||||
*/
|
||||
protected final void dispose() {
|
||||
protected void dispose() {
|
||||
imGuiGl3.dispose();
|
||||
imGuiGlfw.dispose();
|
||||
disposeImGui();
|
||||
@@ -139,7 +139,7 @@ public abstract class Window {
|
||||
/**
|
||||
* Main application loop.
|
||||
*/
|
||||
protected final void run() {
|
||||
protected void run() {
|
||||
while (!GLFW.glfwWindowShouldClose(handle)) {
|
||||
startFrame();
|
||||
preProcess();
|
||||
|
||||
Reference in new issue
Block a user