Add warning for mobile devices
This commit is contained in:
parent
f854c24f6c
commit
99c628daa8
@ -132,6 +132,16 @@ tutorial.diamonds = 12
|
|||||||
|
|
||||||
|
|
||||||
tutorial.texts = {}
|
tutorial.texts = {}
|
||||||
|
|
||||||
|
tutorial.texts.mobile =
|
||||||
|
NS[[PLEASE NOTE: Luanti can be played both on PC and mobile devices,
|
||||||
|
but this tutorial assumes you have a mouse and keyboard.
|
||||||
|
|
||||||
|
If you don't have those, the keys mentioned in this tutorial won't
|
||||||
|
make a lot of sense to you.
|
||||||
|
|
||||||
|
Do you want to proceed anyway?]]
|
||||||
|
|
||||||
tutorial.texts.intro =
|
tutorial.texts.intro =
|
||||||
NS[[Welcome! This tutorial will teach you the most crucial basics of Luanti.
|
NS[[Welcome! This tutorial will teach you the most crucial basics of Luanti.
|
||||||
This tutorial assumes that you have not changed the default keybindings yet.
|
This tutorial assumes that you have not changed the default keybindings yet.
|
||||||
@ -1334,6 +1344,7 @@ end
|
|||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
local formspec = nil
|
local formspec = nil
|
||||||
|
local playerinfo = minetest.get_player_information(player:get_player_name())
|
||||||
if(minetest.is_singleplayer() == false) then
|
if(minetest.is_singleplayer() == false) then
|
||||||
formspec = "size[12,6]"..
|
formspec = "size[12,6]"..
|
||||||
text_box(NS("Warning: You're not playing in singleplayer mode"), tutorial.texts.notsingleplayer)..
|
text_box(NS("Warning: You're not playing in singleplayer mode"), tutorial.texts.notsingleplayer)..
|
||||||
@ -1344,6 +1355,11 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
text_box(NS("Warning: Creative mode is active"), tutorial.texts.creative)..
|
text_box(NS("Warning: Creative mode is active"), tutorial.texts.creative)..
|
||||||
"button_exit[2.5,5.5;3,1;close;"..minetest.formspec_escape(S("Continue anyways")).."]"..
|
"button_exit[2.5,5.5;3,1;close;"..minetest.formspec_escape(S("Continue anyways")).."]"..
|
||||||
"button_exit[6.5,5.5;3,1;leave;"..minetest.formspec_escape(S("Leave tutorial")).."]"
|
"button_exit[6.5,5.5;3,1;leave;"..minetest.formspec_escape(S("Leave tutorial")).."]"
|
||||||
|
elseif(not map_editing and playerinfo.touch_controls == true) then
|
||||||
|
formspec = "size[12,6]"..
|
||||||
|
text_box(NS("Keyboard and mouse recommended"), tutorial.texts.mobile)..
|
||||||
|
"button_exit[2.5,5.5;3,1;close;"..minetest.formspec_escape(S("Continue anyways")).."]"..
|
||||||
|
"button_exit[6.5,5.5;3,1;leave;"..minetest.formspec_escape(S("Leave tutorial")).."]"
|
||||||
|
|
||||||
elseif(not map_editing and tutorial.state.intro_text == false) then
|
elseif(not map_editing and tutorial.state.intro_text == false) then
|
||||||
formspec = "size[12,6]"..
|
formspec = "size[12,6]"..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user