Premium time colored red <= 7 days #205

master
Samuel 11 years ago
parent ddaff8a46a
commit 806f543302

@ -222,11 +222,17 @@ function CharacterList.create(characters, account, otui)
-- account -- account
if account.premDays > 0 and account.premDays < 65535 then if account.premDays > 0 and account.premDays < 65535 then
accountStatusLabel:setText(tr("Account Status:\nPremium Account (%s) days left", account.premDays)) accountStatusLabel:setText(tr("Premium Account (%s) days left", account.premDays))
elseif account.premDays >= 65535 then elseif account.premDays >= 65535 then
accountStatusLabel:setText(tr("Account Status:\nLifetime Premium Account")) accountStatusLabel:setText(tr("Lifetime Premium Account"))
else else
accountStatusLabel:setText(tr('Account Status:\nFree Account')) accountStatusLabel:setText(tr('Free Account'))
end
if account.premDays > 0 and account.premDays <= 7 then
accountStatusLabel:setOn(true)
else
accountStatusLabel:setOn(false)
end end
end end

@ -56,7 +56,7 @@ MainWindow
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: characterListScrollBar.left anchors.right: characterListScrollBar.left
anchors.bottom: accountStatusLabel.top anchors.bottom: accountStatusCaption.top
margin-bottom: 5 margin-bottom: 5
padding: 1 padding: 1
focusable: false focusable: false
@ -65,21 +65,32 @@ MainWindow
VerticalScrollBar VerticalScrollBar
id: characterListScrollBar id: characterListScrollBar
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: accountStatusLabel.top anchors.bottom: accountStatusCaption.top
anchors.right: parent.right anchors.right: parent.right
margin-bottom: 5 margin-bottom: 5
step: 14 step: 14
pixels-scroll: true pixels-scroll: true
Label
id: accountStatusCaption
!text: tr('Account Status:')
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: next.top
margin-bottom: 1
Label Label
id: accountStatusLabel id: accountStatusLabel
!text: tr('Account Status:\nFree Account') !text: tr('Free Account')
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: separator.top anchors.bottom: separator.top
margin-bottom: 5 margin-bottom: 5
text-auto-resize: true text-auto-resize: true
$on:
color: #FF0000
HorizontalSeparator HorizontalSeparator
id: separator id: separator
anchors.left: parent.left anchors.left: parent.left

Loading…
Cancel
Save