diff --git a/.idea/artifacts/texel_jar.xml b/.idea/artifacts/texel_jar.xml index d5e4bff..b4583e2 100644 --- a/.idea/artifacts/texel_jar.xml +++ b/.idea/artifacts/texel_jar.xml @@ -3,7 +3,6 @@ $PROJECT_DIR$/out/artifacts/texel - diff --git a/build.xml b/build.xml index 5d26b9f..fa1fd45 100644 --- a/build.xml +++ b/build.xml @@ -213,28 +213,23 @@ - - - - - @@ -256,7 +251,7 @@ - + diff --git a/core/src/br/nullexcept/mux/app/ApplicationRuntime.java b/core/src/br/nullexcept/mux/app/ApplicationRuntime.java index fa5b7ad..a916ca4 100644 --- a/core/src/br/nullexcept/mux/app/ApplicationRuntime.java +++ b/core/src/br/nullexcept/mux/app/ApplicationRuntime.java @@ -84,7 +84,7 @@ void start() { } void boot(Window window, Activity activity) { - window.destroy(); + window.reset(); activity.appRuntime = this; activity.mWindow = window; window.setWindowObserver(buildObserver(activity)); diff --git a/core/src/br/nullexcept/mux/graphics/Canvas.java b/core/src/br/nullexcept/mux/graphics/Canvas.java index 35f1db1..0511c69 100644 --- a/core/src/br/nullexcept/mux/graphics/Canvas.java +++ b/core/src/br/nullexcept/mux/graphics/Canvas.java @@ -31,6 +31,12 @@ default void drawEllipse(Rect rect, Paint paint){ default void drawRoundRect(Rect rect, int radius, Paint paint){ drawRoundRect(rect.left, rect.top, rect.right, rect.bottom, radius, paint); } + + /* + left ------------- right + | | + top ------------- bottom + */ default void drawRoundRect(Rect rect, Rect radius, Paint paint){ drawRoundRect(rect.left, rect.top, rect.right, rect.bottom, radius.left, radius.top, radius.right, radius.bottom, paint); } diff --git a/core/src/br/nullexcept/mux/view/Window.java b/core/src/br/nullexcept/mux/view/Window.java index 1706445..a08cf46 100644 --- a/core/src/br/nullexcept/mux/view/Window.java +++ b/core/src/br/nullexcept/mux/view/Window.java @@ -16,13 +16,14 @@ public abstract class Window { public abstract void setVisible(boolean visible); public abstract void setWindowObserver(WindowObserver observer); public abstract WindowObserver getWindowObserver(); + + public abstract void reset(); public abstract void create(); public abstract void destroy(); public abstract void setIcon(Drawable icon); public abstract CharSequence getTitle(); public abstract Size getSize(); - public interface WindowObserver { void onCreated(); void onVisibilityChanged(boolean visible); diff --git a/texel/src/br/nullexcept/mux/core/texel/GlfwWindow.java b/texel/src/br/nullexcept/mux/core/texel/GlfwWindow.java index 2ff11a8..31f743d 100644 --- a/texel/src/br/nullexcept/mux/core/texel/GlfwWindow.java +++ b/texel/src/br/nullexcept/mux/core/texel/GlfwWindow.java @@ -239,6 +239,12 @@ public WindowObserver getWindowObserver() { return observer; } + + @Override + public void reset() { + destroy(); + } + @Override public void create() { if(!destroyed){