mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Migrate existing keycode-based keybindings (#16049)
Co-authored-by: grorp <gregor.parzefall@posteo.de> Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
600763dffc
commit
57c1ab905c
13 changed files with 140 additions and 13 deletions
|
@ -9,3 +9,7 @@ mt_color_green = "#72FF63"
|
|||
mt_color_dark_green = "#25C191"
|
||||
mt_color_orange = "#FF8800"
|
||||
mt_color_red = "#FF3300"
|
||||
|
||||
function core.are_keycodes_equal(k1, k2)
|
||||
return core.normalize_keycode(k1) == core.normalize_keycode(k2)
|
||||
end
|
||||
|
|
|
@ -634,6 +634,10 @@ if core.gettext then -- for client and mainmenu
|
|||
function fgettext(text, ...)
|
||||
return core.formspec_escape(fgettext_ne(text, ...))
|
||||
end
|
||||
|
||||
function hgettext(text, ...)
|
||||
return core.hypertext_escape(fgettext_ne(text, ...))
|
||||
end
|
||||
end
|
||||
|
||||
local ESCAPE_CHAR = string.char(0x1b)
|
||||
|
|
|
@ -778,11 +778,11 @@ end
|
|||
|
||||
|
||||
if INIT == "mainmenu" then
|
||||
function create_settings_dlg()
|
||||
function create_settings_dlg(page_id)
|
||||
load()
|
||||
local dlg = dialog_create("dlg_settings", get_formspec, buttonhandler, eventhandler)
|
||||
|
||||
dlg.data.page_id = update_filtered_pages("")
|
||||
dlg.data.page_id = page_id or update_filtered_pages("")
|
||||
|
||||
return dlg
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue