Working on cmd bind
This commit is contained in:
35
src/console/cmd/cmdbind.h
Normal file
35
src/console/cmd/cmdbind.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "console/console.h"
|
||||
#include "input/input.h"
|
||||
|
||||
void cmdBind(const consolecmdexec_t *exec) {
|
||||
if(exec->argc < 1) {
|
||||
consolePrint("Expected 1 argument: <key> <command]");
|
||||
return;
|
||||
}
|
||||
|
||||
if(exec->argc == 1) {
|
||||
consolePrint("TODO: Show binds");
|
||||
// consolePrint("Current binds:");
|
||||
// inputbinddata_t *data = INPUT.binds;
|
||||
// do {
|
||||
|
||||
// } while(data < INPUT.binds + INPUT_BIND_COUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
inputbind_t bind = inputBindGetByName(exec->argv[1]);
|
||||
if(bind == INPUT_BIND_COUNT) {
|
||||
consolePrint("Unknown bind \"%s\"", exec->argv[1]);
|
||||
return;
|
||||
}
|
||||
|
||||
consolePrint("test");
|
||||
}
|
Reference in New Issue
Block a user