Make use of parallelProjection
This commit is contained in:
@@ -27,12 +27,12 @@ public abstract class ClickButton extends AbstractButton {
|
|||||||
|
|
||||||
instance = new Button(label);
|
instance = new Button(label);
|
||||||
|
|
||||||
instance.addClickCommands((_) -> action.run());
|
instance.addClickCommands((button) -> action.run());
|
||||||
instance.setTextHAlignment(HAlignment.Center);
|
instance.setTextHAlignment(HAlignment.Center);
|
||||||
instance.setTextVAlignment(VAlignment.Center);
|
instance.setTextVAlignment(VAlignment.Center);
|
||||||
|
|
||||||
instance.addCommands(Button.ButtonAction.HighlightOn, (_) -> click());
|
instance.addCommands(Button.ButtonAction.HighlightOn, (button) -> click());
|
||||||
instance.addCommands(Button.ButtonAction.HighlightOff, (_) -> release());
|
instance.addCommands(Button.ButtonAction.HighlightOff, (button) -> release());
|
||||||
|
|
||||||
instance.setFont(font);
|
instance.setFont(font);
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,11 @@ public LobbyView(MdgaApp app) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnter() {
|
public void onEnter() {
|
||||||
|
app.getCamera().setParallelProjection(true);
|
||||||
|
float aspect = (float) app.getCamera().getWidth() / app.getCamera().getHeight();
|
||||||
|
float size = 1.65f;
|
||||||
|
app.getCamera().setFrustum(-1000, 1000, -aspect * size, aspect * size, size, -size);
|
||||||
|
|
||||||
settingsButton.show();
|
settingsButton.show();
|
||||||
|
|
||||||
leaveButton.show();
|
leaveButton.show();
|
||||||
|
|||||||
Reference in New Issue
Block a user