X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=MooGUI.java;h=490026440350483e48b0f7bfd0aac2a4ab8afeba;hb=e7289eb46e09ee6ed3bc5bb4a814f59902d885cb;hp=77883c9c2b3d271e602a96d27f7a5337ce709da9;hpb=a8b0b5e27d120df964c5b6d8554a6207951b00d0;p=moosique.git diff --git a/MooGUI.java b/MooGUI.java index 77883c9..4900264 100644 --- a/MooGUI.java +++ b/MooGUI.java @@ -76,8 +76,8 @@ public class MooGUI extends JFrame { } }}; am.put("Play", playAction); - am.put("Change octave up", createOctaveAction(1)); - am.put("Change octave down", createOctaveAction(-1)); + am.put("Change octave up", createOctaveAction(true)); + am.put("Change octave down", createOctaveAction(false)); InputMap im = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); KeyStroke playKey = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0); @@ -93,7 +93,7 @@ public class MooGUI extends JFrame { pack(); setIconImage(logo); Dimension bounds = Toolkit.getDefaultToolkit().getScreenSize(); - setSize(bounds.width,bounds.height - 40); + setSize(bounds.width,bounds.height - 28); setLocation(0, 0); setBackground(Color.white); advanceStatus(); @@ -143,12 +143,12 @@ public class MooGUI extends JFrame { /** * Creates an action for a specific octave. - * @param octave The octave we want an action for. + * @param increase true for increase, false for decrease */ - private Action createOctaveAction(final int octave) { + private Action createOctaveAction(final boolean increase) { Action octaveAction = new AbstractAction() { public void actionPerformed(ActionEvent ae) { - MooKeyboard.setOctave(octave); + MooKeyboard.setRelativeOctave(increase); }}; return octaveAction; }