|
|
|
@ -89,22 +89,24 @@ function Button:init()
|
|
|
|
|
-- set FrameContainer content
|
|
|
|
|
self[1] = FrameContainer:new{
|
|
|
|
|
margin = 0,
|
|
|
|
|
bordersize = 4,
|
|
|
|
|
bordersize = 3,
|
|
|
|
|
background = 0,
|
|
|
|
|
radius = 15,
|
|
|
|
|
padding = 2,
|
|
|
|
|
|
|
|
|
|
HorizontalGroup:new{
|
|
|
|
|
Widget:new{ dimen = { w = 10, h = 0 } },
|
|
|
|
|
HorizontalSpan:new{ width = 8 },
|
|
|
|
|
TextWidget:new{
|
|
|
|
|
text = self.text,
|
|
|
|
|
face = Font:getFace("cfont", 20)
|
|
|
|
|
},
|
|
|
|
|
Widget:new{ dimen = { w = 10, h = 0 } }
|
|
|
|
|
HorizontalSpan:new{ width = 8 },
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if self.preselect then
|
|
|
|
|
self[1].color = 15
|
|
|
|
|
else
|
|
|
|
|
self[1].color = 0
|
|
|
|
|
self[1].color = 5
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -114,7 +116,7 @@ function Button:onFocus()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function Button:onUnfocus()
|
|
|
|
|
self[1].color = 0
|
|
|
|
|
self[1].color = 5
|
|
|
|
|
return true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -156,6 +158,7 @@ function ConfirmBox:init()
|
|
|
|
|
FrameContainer:new{
|
|
|
|
|
margin = 2,
|
|
|
|
|
background = 0,
|
|
|
|
|
padding = 10,
|
|
|
|
|
HorizontalGroup:new{
|
|
|
|
|
ImageWidget:new{
|
|
|
|
|
file = "resources/info-i.png"
|
|
|
|
@ -168,7 +171,7 @@ function ConfirmBox:init()
|
|
|
|
|
face = Font:getFace("cfont", 30),
|
|
|
|
|
width = self.width,
|
|
|
|
|
},
|
|
|
|
|
VerticalSpan:new{ width = 10 },
|
|
|
|
|
VerticalSpan:new{ width = 20 },
|
|
|
|
|
HorizontalGroup:new{
|
|
|
|
|
ok_button,
|
|
|
|
|
HorizontalSpan:new{ width = 10 },
|
|
|
|
|