blob: be3578549a298b72fd4178a92f1c3b5616514179 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package NET.worlds.scape;
import NET.worlds.console.SnapTool;
class VTransWidget extends WidgetButton {
public VTransWidget(ToolBar toolbar) {
super(toolbar, "vtrans.gif", "Move vertically");
}
@Override
public String drag(boolean initialDrag, float deltax, float deltay) {
Transform t = Transform.make();
this.applyWorldTransform(
initialDrag, t.moveBy(SnapTool.snapTool().snapTo(this.getWorldAxis(1, 0, 0).times(deltax).plus(this.getWorldAxis(0, 0, 1).times(deltay))))
);
t.recycle();
return "" + this.getWObject().getPosition();
}
}
|