mirror of
https://gitlab.com/lunovox/computing.git
synced 2025-03-21 17:11:25 +00:00
This commit is contained in:
parent
c5b1272dd5
commit
1d1a91d9df
2 changed files with 23 additions and 4 deletions
2
init.lua
2
init.lua
|
@ -9,6 +9,6 @@ dofile(modComputing.modpath.."/functions.lua")
|
||||||
dofile(modComputing.modpath.."/item_smartphone.lua")
|
dofile(modComputing.modpath.."/item_smartphone.lua")
|
||||||
|
|
||||||
|
|
||||||
modComputing.add_test_apps()
|
--modComputing.add_test_apps()
|
||||||
|
|
||||||
core.log('action',"[MOD] "..modComputing.modname.." loaded!")
|
core.log('action',"[MOD] "..modComputing.modname.." loaded!")
|
||||||
|
|
|
@ -57,7 +57,7 @@ modComputing.getFormSmartphone = function(player)
|
||||||
|
|
||||||
--SAMPLE: image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>;<noclip>;<drawborder>;<pressed texture name>]
|
--SAMPLE: image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>;<noclip>;<drawborder>;<pressed texture name>]
|
||||||
--SAMPLE: image_button_exit[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]
|
--SAMPLE: image_button_exit[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]
|
||||||
local newToolTip = "tooltip["..core.formspec_escape("btn_"..icon_name)..";"
|
local newToolTip = "tooltip["..core.formspec_escape(icon_name)..";"
|
||||||
..core.formspec_escape(
|
..core.formspec_escape(
|
||||||
core.colorize("#00FF00", icon_title).."\n"
|
core.colorize("#00FF00", icon_title).."\n"
|
||||||
.."* "..icon_descryption
|
.."* "..icon_descryption
|
||||||
|
@ -70,7 +70,7 @@ modComputing.getFormSmartphone = function(player)
|
||||||
..(offSetY + (iconRow * sizeButtonY))
|
..(offSetY + (iconRow * sizeButtonY))
|
||||||
..";1.5,1.5;"
|
..";1.5,1.5;"
|
||||||
..core.formspec_escape(icon_image)..";" --texture name
|
..core.formspec_escape(icon_image)..";" --texture name
|
||||||
..core.formspec_escape("btn_"..icon_name)..";" --button name
|
..core.formspec_escape(icon_name)..";" --button name
|
||||||
--..";" --label empty
|
--..";" --label empty
|
||||||
--..core.formspec_escape(appname).." "..iconRow.."/"..iconCol.."\n"..core.formspec_escape("page:"..page.."\ninpg:"..iconInPage)..";" --label
|
--..core.formspec_escape(appname).." "..iconRow.."/"..iconCol.."\n"..core.formspec_escape("page:"..page.."\ninpg:"..iconInPage)..";" --label
|
||||||
..core.formspec_escape(icon_title)..";" --label
|
..core.formspec_escape(icon_title)..";" --label
|
||||||
|
@ -82,7 +82,26 @@ modComputing.getFormSmartphone = function(player)
|
||||||
--modComputing.debug("newButton = "..dump(newButton) --[[, playername--]])
|
--modComputing.debug("newButton = "..dump(newButton) --[[, playername--]])
|
||||||
|
|
||||||
formspec = formspec..newToolTip..newButton
|
formspec = formspec..newToolTip..newButton
|
||||||
end
|
|
||||||
|
core.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
--[[
|
||||||
|
local playername = player:get_player_name()
|
||||||
|
modComputing.debug(
|
||||||
|
"modComputing.debug()\n"
|
||||||
|
.." > playername ="..dump(playername)
|
||||||
|
.." > formname ="..dump(formname)
|
||||||
|
.." > fields ="..dump(fields)
|
||||||
|
)
|
||||||
|
--[[ ]]
|
||||||
|
if type(formname)=="string" and formname=="frmSmartphone" then
|
||||||
|
if type(fields)=="table" and type(fields[icon_name])=="string" then
|
||||||
|
on_iconclick(player)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
end --FONAL OF: for k,v in pairs(appnames) do
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue