almost there
This commit is contained in:
@@ -97,6 +97,8 @@ public class RenderScope {
|
|||||||
|
|
||||||
this.matrices.translate(x, y, 0);
|
this.matrices.translate(x, y, 0);
|
||||||
|
|
||||||
|
// Top left
|
||||||
|
|
||||||
this.matrices.push();
|
this.matrices.push();
|
||||||
|
|
||||||
this.matrices.scale(0.1f, 0.1f, 1.0f);
|
this.matrices.scale(0.1f, 0.1f, 1.0f);
|
||||||
@@ -105,6 +107,8 @@ public class RenderScope {
|
|||||||
|
|
||||||
this.matrices.pop();
|
this.matrices.pop();
|
||||||
|
|
||||||
|
// Bottom left
|
||||||
|
|
||||||
this.matrices.push();
|
this.matrices.push();
|
||||||
|
|
||||||
this.matrices.translate(cornerWidth, cornerHeight * 2, 0);
|
this.matrices.translate(cornerWidth, cornerHeight * 2, 0);
|
||||||
@@ -119,10 +123,11 @@ public class RenderScope {
|
|||||||
|
|
||||||
this.matrices.pop();
|
this.matrices.pop();
|
||||||
|
|
||||||
|
// Bottom right
|
||||||
|
|
||||||
this.matrices.push();
|
this.matrices.push();
|
||||||
|
|
||||||
this.matrices.translate(cornerWidth * 2, 0, 0);
|
this.matrices.translate(cornerWidth * 2, cornerWidth > cornerHeight ? 0 : cornerHeight, 0);
|
||||||
|
|
||||||
this.matrices.multiply(RotationAxis.NEGATIVE_Z.rotationDegrees(180));
|
this.matrices.multiply(RotationAxis.NEGATIVE_Z.rotationDegrees(180));
|
||||||
|
|
||||||
@@ -146,7 +151,7 @@ public class RenderScope {
|
|||||||
|
|
||||||
this.matrices.scale(0.1f, 0.1f, 1.0f);
|
this.matrices.scale(0.1f, 0.1f, 1.0f);
|
||||||
|
|
||||||
this.drawRoundedCorner(cornerHeight, cornerWidth, radius, color);
|
this.drawRoundedCorner(cornerHeight, cornerWidth, radius, 0xFFFFFFFF);
|
||||||
|
|
||||||
this.matrices.pop();
|
this.matrices.pop();
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class Button extends Element {
|
|||||||
@Override
|
@Override
|
||||||
public void render(RenderScope renderScope) {
|
public void render(RenderScope renderScope) {
|
||||||
int w = 100;
|
int w = 100;
|
||||||
int h = 100;
|
int h = 200;
|
||||||
|
|
||||||
renderScope.drawRoundedRectangle(0, 0, w, h, 80, 0xFF000000);
|
renderScope.drawRoundedRectangle(0, 0, w, h, 80, 0xFF000000);
|
||||||
// renderScope.drawRect(0, h, w, h, color);
|
// renderScope.drawRect(0, h, w, h, color);
|
||||||
|
|||||||
Reference in New Issue
Block a user