修复文本框控件new属性在清空后仍保留
This commit is contained in:
@@ -741,7 +741,6 @@ function inputBox:reset()
|
|||||||
end
|
end
|
||||||
function inputBox:clear()
|
function inputBox:clear()
|
||||||
self.value=""
|
self.value=""
|
||||||
self.new=false
|
|
||||||
end
|
end
|
||||||
function inputBox:isAbove(x,y)
|
function inputBox:isAbove(x,y)
|
||||||
return
|
return
|
||||||
@@ -883,6 +882,7 @@ function textBox:press(x,y)
|
|||||||
if not self.fix and x>self.x+self.w-40 and y<self.y+40 then
|
if not self.fix and x>self.x+self.w-40 and y<self.y+40 then
|
||||||
if self.sure>0 then
|
if self.sure>0 then
|
||||||
self:clear()
|
self:clear()
|
||||||
|
self.new=false
|
||||||
self.sure=0
|
self.sure=0
|
||||||
else
|
else
|
||||||
self.sure=60
|
self.sure=60
|
||||||
@@ -908,6 +908,7 @@ end
|
|||||||
function textBox:clear()
|
function textBox:clear()
|
||||||
self.texts={}
|
self.texts={}
|
||||||
self.scrollPos=0
|
self.scrollPos=0
|
||||||
|
self.new=false
|
||||||
SFX.play('fall')
|
SFX.play('fall')
|
||||||
end
|
end
|
||||||
function textBox:draw()
|
function textBox:draw()
|
||||||
|
|||||||
Reference in New Issue
Block a user