massively updated decorator code to support convar and implement
This commit is contained in:
@@ -18,7 +18,19 @@ class Input{
|
||||
public static var keys:Map<Int,Bool> = [];
|
||||
public static var keysLast:Map<Int,Bool> = [];
|
||||
public static var bindMap:Map<String, String> = ["~" => "toggleconsole", "\\" => "toggleconsole", "1" => "echo kak", "2" => "+attack"];
|
||||
public static var cv_debugKeys = ConVar.registerCVar("cl_debuginput", CInt, 0, null, "print debug messages related to input to console", null, false, true, 0, 0, false);
|
||||
@:convar({
|
||||
name: "cl_debuginput",
|
||||
type: CVarType.CInt,
|
||||
value: 0,
|
||||
flags: CVarFlag.None,
|
||||
help: "print debug messages related to input to console",
|
||||
callback: function() {
|
||||
trace("Debug input changed");
|
||||
}
|
||||
})
|
||||
public static var cv_debugKeys:CVar;
|
||||
|
||||
// public static var cv_debugKeys = ConVar.registerCVar("cl_debuginput", CInt, 0, null, "print debug messages related to input to console", null, false, true, 0, 0, false);
|
||||
public static var keyNameMap:Map<Int, String> = [
|
||||
Kb.HOME => "HOME", Kb.END => "END", Kb.INSERT => "INSERT", Kb.DELETE => "DELETE", Kb.PAGE_UP => "PGUP", Kb.PAGE_DOWN => "PGDN",
|
||||
Kb.ESCAPE => "ESC", Kb.F1 => "F1", Kb.F2 => "F2", Kb.F3 => "F3", Kb.F4 => "F4", Kb.F5 => "F5",
|
||||
|
||||
@@ -15,7 +15,7 @@ class Mode
|
||||
public static function setVideoMode(width:Int, height:Int, fs:Int = null){
|
||||
getWindow().resize(width,height);
|
||||
}
|
||||
@:ConCmd("mat_setvideomode")
|
||||
@:concmd("mat_setvideomode")
|
||||
public static function cCmdMatSetVideoMode(args:Array<String>){
|
||||
Mode.setVideoMode(Std.parseInt(args[0]), Std.parseInt(args[1]), Std.parseInt(args[2]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user