blob: 51aae9efcd7d3aa42efd49e5e7e18feea315916e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package NET.worlds.scape;
import NET.worlds.console.Console;
import NET.worlds.console.SnapTool;
class HTransWidget extends WidgetButton {
public HTransWidget(ToolBar toolbar) {
super(toolbar, "htrans.gif", Console.message("Move-horiz"));
}
@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, 1, 0).times(deltay))))
);
t.recycle();
return "" + this.getWObject().getPosition();
}
}
|