Init chatbox script

This commit is contained in:
Vortrex
2021-03-30 21:45:16 -05:00
parent ed73c260b2
commit 92dc2a7487

View File

@@ -19,8 +19,25 @@ let maxChatBoxLines = 6;
// ===========================================================================
bindKey(SDLK_PAGEUP, KEYSTATE_DOWN, chatBoxScrollUp);
bindKey(SDLK_PAGEDOWN, KEYSTATE_DOWN, chatBoxScrollDown);
function initChatBoxScript() {
logToConsole(LOG_DEBUG, "[Asshat.ChatBox]: Initializing chatbox script ...");
bindChatBoxKeys();
logToConsole(LOG_DEBUG, "[Asshat.ChatBox]: Chatbox script initialized!");
}
// ===========================================================================
function bindChatBoxKeys() {
bindKey(SDLK_PAGEUP, KEYSTATE_DOWN, chatBoxScrollUp);
bindKey(SDLK_PAGEDOWN, KEYSTATE_DOWN, chatBoxScrollDown);
}
// ===========================================================================
function unBindChatBoxKeys() {
unbindKey(SDLK_PAGEUP);
unbindKey(SDLK_PAGEDOWN);
}
// ===========================================================================