blob: e9e71b48a9393bb065c9f3fbb76f2bb575b56f8a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package NET.worlds.scape;
import NET.worlds.console.Console;
class RollWidget extends WidgetButton {
public RollWidget(ToolBar toolbar) {
super(toolbar, "roll.gif", Console.message("Roll"));
}
@Override
public String drag(boolean initialDrag, float deltax, float deltay) {
if (Math.abs(deltay) > Math.abs(deltax)) {
deltax = 0.0F;
}
Transform t = Transform.make();
this.applyWorldTransform(initialDrag, t.spin(this.getWorldAxis(0, 1, 0), deltax));
t.recycle();
return "Roll";
}
}
|