X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FGuiComponent.java;h=4d94136a6a0f0e488349b0c75c3c14a851111f77;hb=a3ff3683bd0a025061667b26b6fcf56fe20f0afc;hp=0fc1f11b0eebb34c104ee7a0e28dcba793e94f89;hpb=316a696bf9db6e8eddf90ef3df5e1119481c0192;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/gui/GuiComponent.java b/src/main/java/eu/svjatoslav/sixth/e3d/gui/GuiComponent.java index 0fc1f11..4d94136 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/gui/GuiComponent.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/gui/GuiComponent.java @@ -1,14 +1,14 @@ /* - * Sixth 3D engine. Author: Svjatoslav Agejenko. + * Sixth 3D engine. Author: Svjatoslav Agejenko. * This project is released under Creative Commons Zero (CC0) license. */ package eu.svjatoslav.sixth.e3d.gui; import eu.svjatoslav.sixth.e3d.geometry.Box; import eu.svjatoslav.sixth.e3d.geometry.Point3D; -import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController; -import eu.svjatoslav.sixth.e3d.gui.humaninput.KeyboardInputHandler; import eu.svjatoslav.sixth.e3d.gui.humaninput.KeyboardHelper; +import eu.svjatoslav.sixth.e3d.gui.humaninput.KeyboardInputHandler; +import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController; import eu.svjatoslav.sixth.e3d.math.Transform; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape; @@ -39,7 +39,7 @@ public class GuiComponent extends AbstractCompositeShape implements final double borderSize = 10; - final Box borderArea = containingBox.clone().addBorder(borderSize); + final Box borderArea = containingBox.clone().enlarge(borderSize); return new WireframeBox(borderArea, appearance); } @@ -94,7 +94,7 @@ public class GuiComponent extends AbstractCompositeShape implements } @Override - public boolean mouseClicked() { + public boolean mouseClicked(int button) { return viewPanel.getKeyboardFocusStack().pushFocusOwner(this); } @@ -109,7 +109,7 @@ public class GuiComponent extends AbstractCompositeShape implements } private void setDimensions(final Point3D size) { - containingBox.setSizeCentered(size); + containingBox.setBoxSize(size); } private void showBorder() {