aboutsummaryrefslogtreecommitdiffstats
path: root/Gamestates/Multiplayer
diff options
context:
space:
mode:
authorFallstar <fallstar@live.fr>2014-05-25 12:21:51 +0000
committerFallstar <fallstar@live.fr>2014-05-25 12:21:51 +0000
commite572878597eed097eebe44e9259b2fea78cb3022 (patch)
tree363b8f0421f9dc2f2a44e0c96edf92f0f71b2eb8 /Gamestates/Multiplayer
parent8dd2eb88d1af96e7597a27803f3a64177f36321a (diff)
downloadMastermind-e572878597eed097eebe44e9259b2fea78cb3022.tar.gz
Mastermind-e572878597eed097eebe44e9259b2fea78cb3022.tar.bz2
Mastermind-e572878597eed097eebe44e9259b2fea78cb3022.tar.xz
Mastermind-e572878597eed097eebe44e9259b2fea78cb3022.zip
Message when port not specified, but only lasts a few ms. 'll maybe fix that someday, but it avoid crash when port is not specified.HEADmaster
Diffstat (limited to 'Gamestates/Multiplayer')
-rw-r--r--Gamestates/Multiplayer/Local.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/Gamestates/Multiplayer/Local.lua b/Gamestates/Multiplayer/Local.lua
index 7158866..c867464 100644
--- a/Gamestates/Multiplayer/Local.lua
+++ b/Gamestates/Multiplayer/Local.lua
@@ -99,7 +99,11 @@ function Local:update(dt)
Gui.Label{text = "Host", size = {Utils.percentCoordinates(10, 10)}}
Gui.Input{info = Local.server_host, size = {Utils.percentCoordinates(50, 10)}}
if Gui.Button{text = "Connect", size = {Utils.percentCoordinates(60, 10)}} then
- connect = true
+ if string.find(Local.server_host.text, ":") then
+ connect = true
+ else
+ Gui.Label{text = "Please enter port"}
+ end
end
-- End