-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding PROPDIMENSIONS Iptscrae command.
- Loading branch information
1 parent
311d7d3
commit 546ad4d
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
PalaceClient/src/net/codecomposer/palace/iptscrae/command/PROPDIMENSIONSCommand.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.codecomposer.palace.iptscrae.command | ||
{ | ||
import net.codecomposer.palace.model.PalaceProp; | ||
import net.codecomposer.palace.model.PalacePropStore; | ||
|
||
import org.openpalace.iptscrae.IptCommand; | ||
import org.openpalace.iptscrae.IptExecutionContext; | ||
import org.openpalace.iptscrae.token.IntegerToken; | ||
|
||
public class PROPDIMENSIONSCommand extends IptCommand | ||
{ | ||
override public function execute(context:IptExecutionContext) : void { | ||
var propId:IntegerToken = context.stack.popType(IntegerToken); | ||
var prop:PalaceProp = PalacePropStore.getInstance().getProp(null, propId.data); | ||
context.stack.push(new IntegerToken(prop.width)); | ||
context.stack.push(new IntegerToken(prop.height)); | ||
} | ||
} | ||
} |