Add keypress for some GUI buttons + fix prompt text
This commit is contained in:
@@ -163,6 +163,10 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski
|
||||
characterSelect.lastPlayedText.text = `Last Played: ${lastPlayed}`;
|
||||
characterSelect.skinImage = characterSelect.window.image(310, 32, 100, 90, "files/images/skins/none.png");
|
||||
characterSelect.window.shown = true;
|
||||
|
||||
guiSubmitKey = selectThisCharacter;
|
||||
guiLeftKey = selectPreviousCharacter;
|
||||
guiRightKey = selectNextCharacter;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -211,6 +215,7 @@ function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, s
|
||||
characterSelect.skinImage = (getGame() == VRR_GAME_GTA_III) ? characterSelect.window.image(310, 32, 100, 90, `files/images/skins/gta3/${getSkinImage(skinId)}.png`) : characterSelect.window.image(310, 32, 100, 90, "files/images/skins/none.png");
|
||||
|
||||
characterSelect.window.shown = true;
|
||||
|
||||
guiSubmitKey = selectThisCharacter;
|
||||
guiLeftKey = selectPreviousCharacter;
|
||||
guiRightKey = selectNextCharacter;
|
||||
|
||||
@@ -63,12 +63,14 @@ function initErrorDialogGUI() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showErrorGUI(errorMessage, errorTitle) {
|
||||
function showErrorGUI(errorMessage, errorTitle, buttonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
errorDialog.messageLabel.text = errorMessage;
|
||||
errorDialog.okayButton.text = buttonText;
|
||||
errprDialog.window.title = errorTitle;
|
||||
errorDialog.window.shown = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,11 +70,13 @@ function closeInfoDialog() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showInfo(infoMessage, infoTitle) {
|
||||
function showInfo(infoMessage, infoTitle, buttonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
|
||||
mexui.setInput(true);
|
||||
infoDialog.messageLabel.text = infoMessage;
|
||||
infoDialog.okayButton.text = buttonText;
|
||||
infoDialog.window.title = infoTitle;
|
||||
infoDialog.window.shown = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,11 +78,14 @@ function initYesNoDialogGUI() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showYesNoPromptGUI(promptMessage, promptTitle) {
|
||||
function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
|
||||
mexui.setInput(true);
|
||||
yesNoDialog.messageLabel.text = promptMessage;
|
||||
yesNoDialog.yesButton.text = yesButtonText;
|
||||
yesNoDialog.noButton.text = noButtonText;
|
||||
yesNoDialog.window.title = promptTitle;
|
||||
yesNoDialog.window.shown = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user