add crosshair for mobile devices
This commit is contained in:
parent
a2626cbbea
commit
2e01d7d81d
1
mods/addcrosshair/depends.txt
Normal file
1
mods/addcrosshair/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
16
mods/addcrosshair/init.lua
Normal file
16
mods/addcrosshair/init.lua
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
local function setflags(player)
|
||||||
|
player:hud_set_flags({crosshair=false})
|
||||||
|
end
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
|
||||||
|
local hud = player:hud_add({
|
||||||
|
hud_elem_type = "image",
|
||||||
|
position = {x = .5, y = .5},
|
||||||
|
offset = {x = 0, y = 0},
|
||||||
|
text = "crosshair.png",
|
||||||
|
scale = { x = 1, y = 1},
|
||||||
|
alignment = { x = 0, y = 0 },
|
||||||
|
})
|
||||||
|
minetest.after(0, setflags, player)
|
||||||
|
|
||||||
|
end)
|
Loading…
x
Reference in New Issue
Block a user