Skip to content

Commit

Permalink
Some fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cody82 committed May 20, 2017
1 parent 36af8ed commit 1edfab2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 10 additions & 9 deletions grblgui/src/cody/grblgui/ViewWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class ViewWindow extends Window {
public ViewWindow(Skin skin, MainScreen _mainscreen) {
super("View", skin);

setBounds(0, 400, 200, 200);
setBounds(0, 500, 200, 300);
setColor(0, 1, 0, 0.8f);

mainscreen = _mainscreen;
Expand All @@ -33,7 +33,7 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
mainscreen.draw_part = !draw_part.isChecked();
return true;
}});
add(draw_part).fill().expand();
add(draw_part);

row();
final CheckBox ztest = new CheckBox("Z-Test", skin);
Expand All @@ -44,20 +44,21 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
mainscreen.ztest = !ztest.isChecked();
return true;
}});
add(ztest).fill().expand();
add(ztest);

row();

show_console = new CheckBox("Show console", skin);
show_console.setChecked(true);
show_console.setChecked(false);
mainscreen.console.setVisible(show_console.isChecked());
show_console.addListener(
new InputListener() {
@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
mainscreen.console.setVisible(!show_console.isChecked());
return true;
}});
add(show_console).fill().expand();
add(show_console);
row();

final TextField h = new TextField("400", skin);
Expand All @@ -73,10 +74,10 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
add(workspace_size);
row();

Table t = new Table();
t.add(w).fill().expand();
t.add(h).fill().expand();
add(t).fill().expand();
//Table t = new Table();
add(w).width(80);
add(h).width(80);
//add(t).fill().expand();
row();

add(new Label("Camera", skin)).fill().expand();
Expand Down
2 changes: 2 additions & 0 deletions grblgui/src/cody/grblgui/Workspace.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ x2, y1, z1, new Color(1,1,1,1).toFloatBits(),
}

public void setSize(float w, float h) {
w/=2;
h/=2;
float[] verts = new float[]{
-w, -h, 0, new Color(1,1,1,1).toFloatBits(),
-w, h, 0, new Color(1,1,1,1).toFloatBits(),
Expand Down

0 comments on commit 1edfab2

Please sign in to comment.