Use macro to register ccmds
This commit is contained in:
@@ -15,9 +15,10 @@ class Mode
|
||||
public static function setVideoMode(width:Int, height:Int, fs:Int = null){
|
||||
getWindow().resize(width,height);
|
||||
}
|
||||
public static var cvMatSetVideoMode:CCmd = ConVar.registerCCmd("mat_setvideomode",(args:Array<String>)->{
|
||||
setVideoMode(Std.parseInt(args[0]), Std.parseInt(args[1]), Std.parseInt(args[2]));
|
||||
});
|
||||
@:command("mat_setvideomode")
|
||||
public static function cCmdMatSetVideoMode(args:Array<String>){
|
||||
Mode.setVideoMode(Std.parseInt(args[0]), Std.parseInt(args[1]), Std.parseInt(args[2]));
|
||||
}
|
||||
public static function switchFsMode(toState:Int = 0){
|
||||
if(toState == 0){
|
||||
if(Lib.current.stage.displayState != StageDisplayState.FULL_SCREEN_INTERACTIVE){
|
||||
|
||||
Reference in New Issue
Block a user