Working on cmd bind

This commit is contained in:
2025-09-07 23:53:21 -05:00
parent e32d1f0900
commit 16a0403fd4
22 changed files with 86 additions and 768 deletions

35
src/console/cmd/cmdbind.h Normal file
View 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");
}