Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions touchscreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ local function create_element_string(element, values)
end

local function modify_element_string(old, values)
local e = string.match(old, "^(.-)%[")
local e = string.match(old, "^(.-)%[[^[]*%]$")
local element = formspec_elements[e]
if type(element) == "function" then
if type(element) ~= "table" then
return old -- No-op for special elements, as there is no format string
end
local old_values = {string.match(old, element[5])}
Expand Down Expand Up @@ -156,7 +156,10 @@ local function create_formspec(meta, data)
if meta:get_int("no_prepend") == 1 then
fs = fs.."no_prepend[]"
end
if not meta:get("real_coordinates") and not meta:get("realcoordinates") then
if (
meta:contains("real_coordinates") and meta:get_int("real_coordinates")
or meta:get_int("realcoordinates") -- old screen
) == 0 then
Comment thread
a-tour-ist marked this conversation as resolved.
Outdated
fs = fs.."real_coordinates[false]"
end
local focus = meta:get("focus")
Expand Down