输入框细节调整
This commit is contained in:
@@ -264,6 +264,8 @@ function love.textinput(text)
|
|||||||
if not W.regex or text:match(W.regex)then
|
if not W.regex or text:match(W.regex)then
|
||||||
WIDGET.sel.value=WIDGET.sel.value..text
|
WIDGET.sel.value=WIDGET.sel.value..text
|
||||||
SFX.play("move")
|
SFX.play("move")
|
||||||
|
else
|
||||||
|
SFX.play("finesseError",.3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -625,20 +625,20 @@ function textBox:draw()
|
|||||||
|
|
||||||
--Text
|
--Text
|
||||||
setFont(self.font)
|
setFont(self.font)
|
||||||
|
t=self.text
|
||||||
|
if t then
|
||||||
|
gc.printf(t,x-412,y+h*.5-self.font*.7,400,"right")
|
||||||
|
end
|
||||||
if self.secret then
|
if self.secret then
|
||||||
for i=1,#self.value do
|
for i=1,#self.value do
|
||||||
gc.print("*",x-5+self.font*.5*i,y+h*.5-self.font*.7)
|
gc.print("*",x-5+self.font*.5*i,y+h*.5-self.font*.7)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
gc.print(self.value,x+10,y+h*.5-self.font*.7)
|
gc.print(self.value,x+10,y+h*.5-self.font*.7)
|
||||||
end
|
|
||||||
t=self.text
|
|
||||||
if t then
|
|
||||||
gc.printf(t,x-412,y+h*.5-self.font*.7,400,"right")
|
|
||||||
end
|
|
||||||
setFont(self.font-10)
|
setFont(self.font-10)
|
||||||
if WIDGET.sel==self then
|
if WIDGET.sel==self then
|
||||||
gc.print(EDITING,x+10,y+5-self.font*1.4)
|
gc.print(EDITING,x+10,y+12-self.font*1.4)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function textBox:getInfo()
|
function textBox:getInfo()
|
||||||
|
|||||||
Reference in New Issue
Block a user