diff options
Diffstat (limited to 'NET/worlds/scape/ScaleWidget.java')
| -rw-r--r-- | NET/worlds/scape/ScaleWidget.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/NET/worlds/scape/ScaleWidget.java b/NET/worlds/scape/ScaleWidget.java new file mode 100644 index 0000000..2198715 --- /dev/null +++ b/NET/worlds/scape/ScaleWidget.java @@ -0,0 +1,45 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ScaleWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public ScaleWidget(ToolBar toolbar) +/* */ { +/* 24 */ super(toolbar, "scale.gif", Console.message("Scale")); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 29 */ WObject wobj = getWObject(); +/* 30 */ float delta = Math.abs(deltax) > Math.abs(deltay) ? deltax : deltay; +/* 31 */ delta = (float)Math.pow(1.01D, delta); +/* 32 */ if (initialDrag) +/* 33 */ Console.getFrame().getEditTile().addUndoable( +/* 34 */ new UndoablTransform(wobj)); +/* 35 */ wobj.scale(delta); +/* 36 */ wobj.markEdited(); +/* 37 */ return "Scale: " + wobj.getScale(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ScaleWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |