1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add button_url[] and hypertext element to allow mods to open web pages (#13825)

Fixes #12500
This commit is contained in:
rubenwardy 2024-03-24 17:19:23 +00:00 committed by GitHub
parent 6c4a110679
commit 24cc33e704
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 530 additions and 37 deletions

View file

@ -50,6 +50,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "gui/guiFormSpecMenu.h"
#include "gui/guiKeyChangeMenu.h"
#include "gui/guiPasswordChange.h"
#include "gui/guiOpenURL.h"
#include "gui/guiVolumeChange.h"
#include "gui/mainmenumanager.h"
#include "gui/profilergraph.h"
@ -1815,6 +1816,12 @@ inline bool Game::handleCallbacks()
g_gamecallback->keyconfig_requested = false;
}
if (!g_gamecallback->show_open_url_dialog.empty()) {
(new GUIOpenURLMenu(guienv, guiroot, -1,
&g_menumgr, texture_src, g_gamecallback->show_open_url_dialog))->drop();
g_gamecallback->show_open_url_dialog.clear();
}
if (g_gamecallback->keyconfig_changed) {
input->keycache.populate(); // update the cache with new settings
g_gamecallback->keyconfig_changed = false;