Skip to content

Commit

Permalink
Add change texture option to right-click menu (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmickle66666666 authored and Interrupt committed Dec 14, 2018
1 parent c208b96 commit 2277b84
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,30 @@ public void actionPerformed (ActionEvent event) {

// surface editing stuff
MenuItem surfacePaint = new MenuItem("Paint Surface", skin);
MenuItem surfacePickTexture = new MenuItem("Pick Texture", skin);
MenuItem surfaceGrabTexture = new MenuItem("Grab Texture", skin);
MenuItem surfaceChangeTexture = new MenuItem("Change Texture", skin);

surfacePaint.addActionListener(new ActionListener() {
public void actionPerformed (ActionEvent event) {
editor.paintSurfaceAtCursor();
}
});

surfacePickTexture.addActionListener(new ActionListener() {
surfaceGrabTexture.addActionListener(new ActionListener() {
public void actionPerformed (ActionEvent event) {
editor.pickTextureAtSurface();
}
});

surfaceChangeTexture.addActionListener(new ActionListener() {
public void actionPerformed (ActionEvent event) {
editor.pickNewSurfaceTexture();
}
});

surfaceMenu.addItem(surfacePaint);
surfaceMenu.addItem(surfacePickTexture);
surfaceMenu.addItem(surfaceGrabTexture);
surfaceMenu.addItem(surfaceChangeTexture);

addItem(surfaceMenu);
}
Expand Down

0 comments on commit 2277b84

Please sign in to comment.