Renamed ControllerEvent to CommandEvent.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4281 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -4,7 +4,7 @@ import flash.events.MouseEvent;
|
||||
|
||||
import mx.controls.Button;
|
||||
|
||||
import com.threerings.events.ControllerEvent;
|
||||
import com.threerings.mx.events.CommandEvent;
|
||||
|
||||
/**
|
||||
* A command button simply dispatches a Controller command (with an optional
|
||||
@@ -37,7 +37,7 @@ public class CommandButton extends Button
|
||||
// stop the click event
|
||||
event.stopImmediatePropagation();
|
||||
// dispatch the command event
|
||||
dispatchEvent(new ControllerEvent(_cmd, _arg));
|
||||
dispatchEvent(new CommandEvent(_cmd, _arg));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.threerings.mx.events {
|
||||
|
||||
import flash.events.Event;
|
||||
|
||||
public class CommandEvent extends Event
|
||||
{
|
||||
/** The event type for all controller events. */
|
||||
public static const TYPE :String = "commandEvt";
|
||||
|
||||
public var command :String;
|
||||
public var arg :Object;
|
||||
|
||||
public function CommandEvent (command :String, arg :Object = null)
|
||||
{
|
||||
super(TYPE, true);
|
||||
this.command = command;
|
||||
this.arg = arg;
|
||||
}
|
||||
|
||||
override public function clone () :Event
|
||||
{
|
||||
return new CommandEvent(command, arg);
|
||||
}
|
||||
|
||||
override public function toString () :String
|
||||
{
|
||||
return "CommandEvent[" + command + " (" + arg + ")]";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user