From 3b576bd11818b4ded25c0001f6b38888f1836f10 Mon Sep 17 00:00:00 2001 From: Ryan Ward Date: Fri, 16 Feb 2018 18:43:34 -0500 Subject: [PATCH] fixed bugs because im trash --- game/main.lua | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/game/main.lua b/game/main.lua index dad8278..36552cb 100644 --- a/game/main.lua +++ b/game/main.lua @@ -20,6 +20,7 @@ parseManager:define{ inputBox.message.text=msg inputBox.Visible=true go.Visible=false + thread.hold(function() return _inputvar~=nil end) local i=_inputvar _inputvar=nil inputBox.Visible=false @@ -54,6 +55,8 @@ parseManager:define{ end end, sleep=function(self,n) + thread.sleep(n) + end, fadeSong=function(self,item) self.handle:Pause() local handle=self:varExists(item) @@ -214,34 +217,9 @@ go=core.chatFrame.textHolder:newImageButton("images/arrow.png",-25,-25,20,20,1,1 go:OnReleased(function(b,self) ready=true end) -<<<<<<< HEAD multi:newLoop(function() love.timer.sleep(.005) end) -dialogeHandler=multi:newLoop(function(self,ti) - t=test:next() - if t.Type=="text" then - core.chatFrame.textHolder.text=t.text - self:Pause() - elseif t.Type=="choice" then - go.Visible=false - local choiceframe=gui:newFrame("",0,0,300,(#t+1)*40-10) - choiceframe:newTextLabel(t.prompt,0,0,0,40,0,0,1).Color=Color.light_blue - for i=1,#t[1] do - local choice=choiceframe:newTextButton(t[1][i],0,i*40,0,40,0,0,1) - choice.Color=Color.Darken(Color.saddle_brown,.15) - choice.index=i - choice:OnReleased(function(b,self) - choicemade=self.index - end) - end - choiceframe:centerX() - choiceframe:centerY() - self:Pause() - while choicemade==nil do - multi:lManager() -======= ---dialogeHandler=multi:newLoop(function(self,ti) ready=false multi:newThread("TextHandler",function() while true do @@ -270,7 +248,6 @@ multi:newThread("TextHandler",function() local cm=choicemade choicemade=nil t=test:next(nil,cm) ->>>>>>> f21e52b15e277c0c2e38911bef7539d33f4f02d5 end thread.sleep(.001) end