diff options
author | cheapie <no-email-for-you@example.com> | 2020-04-28 21:28:26 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2020-04-28 21:28:26 -0500 |
commit | 69a9304751cfdf784696212fcf4834eba584c584 (patch) | |
tree | d3eee2101621ed46ac84c7a01d8e3b24885b8568 /touchscreen.lua | |
parent | 8384563085d187534e2240325c648d1ce91ba8bc (diff) | |
download | digistuff-69a9304751cfdf784696212fcf4834eba584c584.tar digistuff-69a9304751cfdf784696212fcf4834eba584c584.tar.gz digistuff-69a9304751cfdf784696212fcf4834eba584c584.tar.bz2 digistuff-69a9304751cfdf784696212fcf4834eba584c584.tar.xz digistuff-69a9304751cfdf784696212fcf4834eba584c584.zip |
Miscellaneous touchscreen and noteblock work
* Noteblock sound list updated
* Noteblocks now support pitch control
* Touchscreens can now optionally use the "real coordinates" system
Diffstat (limited to 'touchscreen.lua')
-rw-r--r-- | touchscreen.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/touchscreen.lua b/touchscreen.lua index 71191d5..b0f10c2 100644 --- a/touchscreen.lua +++ b/touchscreen.lua @@ -2,6 +2,9 @@ digistuff.update_ts_formspec = function (pos) local meta = minetest.get_meta(pos) local fs = "size[10,8]".. "background[0,0;0,0;digistuff_ts_bg.png;true]" + if meta:get_int("realcoordinates") > 0 then + fs = fs.."real_coordinates[true]" + end if meta:get_int("init") == 0 then fs = fs.."field[3.75,3;3,1;channel;Channel;]".. "button_exit[4,3.75;2,1;save;Save]" @@ -80,6 +83,8 @@ end digistuff.process_command = function (meta, data, msg) if msg.command == "clear" then data = {} + elseif msg.command == "realcoordinates" then + meta:set_int("realcoordinates",msg.enabled and 1 or 0) elseif msg.command == "addimage" then for _,i in pairs({"X","Y","W","H"}) do if not msg[i] or type(msg[i]) ~= "number" then |