2022-12-21 21:56:39 +00:00
|
|
|
sub init()
|
|
|
|
m.content = m.top.findNode("content")
|
|
|
|
|
|
|
|
setPalette()
|
|
|
|
|
|
|
|
m.top.id = "OKDialog"
|
|
|
|
m.top.height = 900
|
2023-12-06 16:04:22 +00:00
|
|
|
m.top.title = m.global.app.version + " - " + tr("What's New?")
|
2022-12-21 21:56:39 +00:00
|
|
|
m.top.buttons = [tr("OK")]
|
|
|
|
|
|
|
|
dialogStyles = {
|
|
|
|
"default": {
|
|
|
|
"fontSize": 27,
|
|
|
|
"fontUri": "font:SystemFontFile",
|
|
|
|
"color": "#EFEFEFFF"
|
|
|
|
},
|
|
|
|
"author": {
|
|
|
|
"fontSize": 27,
|
|
|
|
"fontUri": "font:SystemFontFile",
|
|
|
|
"color": "#00a4dcFF"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-06 16:15:25 +00:00
|
|
|
whatsNewList = ParseJSON(ReadAsciiFile("pkg:/source/static/whatsNew/" + m.global.app.version.ToStr().trim() + ".json"))
|
2022-12-21 21:56:39 +00:00
|
|
|
|
|
|
|
for each item in whatsNewList
|
|
|
|
textLine = m.content.CreateChild("StdDlgMultiStyleTextItem")
|
|
|
|
textLine.drawingStyles = dialogStyles
|
|
|
|
textLine.text = "• " + item.description + " <author>" + item.author + "</author>"
|
|
|
|
end for
|
|
|
|
|
|
|
|
end sub
|
|
|
|
|
|
|
|
sub setPalette()
|
|
|
|
dlgPalette = createObject("roSGNode", "RSGPalette")
|
|
|
|
dlgPalette.colors = {
|
|
|
|
DialogBackgroundColor: "0x262828FF",
|
|
|
|
DialogFocusColor: "0xcececeFF",
|
|
|
|
DialogFocusItemColor: "0x202020FF",
|
|
|
|
DialogSecondaryTextColor: "0xf8f8f8ff",
|
|
|
|
DialogSecondaryItemColor: "#00a4dcFF",
|
|
|
|
DialogTextColor: "0xeeeeeeFF"
|
|
|
|
}
|
|
|
|
|
|
|
|
m.top.palette = dlgPalette
|
|
|
|
end sub
|