diff options
Diffstat (limited to 'NET/worlds/scape/PitchWidget.java')
| -rw-r--r-- | NET/worlds/scape/PitchWidget.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/NET/worlds/scape/PitchWidget.java b/NET/worlds/scape/PitchWidget.java new file mode 100644 index 0000000..c6e741a --- /dev/null +++ b/NET/worlds/scape/PitchWidget.java @@ -0,0 +1,19 @@ +package NET.worlds.scape; + +class PitchWidget extends WidgetButton { + public PitchWidget(ToolBar toolbar) { + super(toolbar, "pitch.gif", "Pitch"); + } + + @Override + public String drag(boolean initialDrag, float deltax, float deltay) { + if (Math.abs(deltax) > Math.abs(deltay)) { + deltay = 0.0F; + } + + Transform t = Transform.make(); + this.applyWorldTransform(initialDrag, t.spin(this.getWorldAxis(1, 0, 0), -deltay)); + t.recycle(); + return "Pitch"; + } +} |