Fix dialog palette

This commit is contained in:
Brahim Hadriche committed 2023-12-22 15:19:19 -05:00
1 parent 8f1d3778d8
commit 242298911c
6 files changed
+22 -4

No files matched your search

+14
View File
@@ -1,6 +1,7 @@
function ShowErrorDialog(message as object, bulletText as object, bottomMessage as object)
' Note: dialog can be null since StandardMessageDialog is only available on 10.0 and later
dialog = CreateObject("roSGNode", "StandardMessageDialog")
SetPalette(dialog)
dialog.message = message
dialog.bulletText = bulletText
dialog.bottomMessage = bottomMessage
@@ -15,6 +16,19 @@ function ShowErrorDialog(message as object, bulletText as object, bottomMessage
m.top.getScene().dialog = dialog
end function
function SetPalette(dialog as object)
palette = createObject("roSGNode", "RSGPalette")
palette.colors = {
DialogBackgroundColor: "#242424FF",
DialogFocusColor: "#CECECEFF",
DialogFocusItemColor: "#202020FF",
DialogSecondaryTextColor: "#F8F8F8FF",
DialogSecondaryItemColor: "0xFF1C30FF",
DialogTextColor: "#EEEEEEFF"
}
dialog.palette = palette
end function
function OnButtonSelected()
m.top.getScene().dialog.close = true
end function