* update dependencies * Update lint exceptions for colors --------- Co-authored-by: iBicha <iBicha@users.noreply.github.com> Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
function DialogShowError(message as object, bulletText as object, bottomMessage as object)
|
|
' Note: dialog can be null since StandardMessageDialog is only available on 10.0 and later
|
|
msgDialog = CreateObject("roSGNode", "StandardMessageDialog")
|
|
DialogSetPalette(msgDialog)
|
|
msgDialog.message = message
|
|
msgDialog.bulletText = bulletText
|
|
msgDialog.bottomMessage = bottomMessage
|
|
msgDialog.title = "Error loading Playlet"
|
|
msgDialog.buttons = ["Exit"]
|
|
|
|
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
|
msgDialog.observeField("buttonSelected", "DialogOnButtonSelected")
|
|
' bs:disable-next-line NO_OBSERVE_STRING_CALLBACK
|
|
msgDialog.observeField("wasClosed", "DialogOnClosed")
|
|
|
|
m.top.getScene().dialog = msgDialog
|
|
end function
|
|
|
|
function DialogSetPalette(msgDialog as object)
|
|
palette = createObject("roSGNode", "RSGPalette")
|
|
palette.colors = {
|
|
DialogBackgroundColor: "#242424FF"
|
|
DialogFocusColor: "#CECECEFF"
|
|
DialogFocusItemColor: "#202020FF"
|
|
DialogSecondaryTextColor: "#EBEBEBFF"
|
|
DialogSecondaryItemColor: "#FF1C30FF"
|
|
DialogTextColor: "#EBEBEBFF"
|
|
}
|
|
msgDialog.palette = palette
|
|
end function
|
|
|
|
function DialogOnButtonSelected()
|
|
m.top.getScene().dialog.close = true
|
|
end function
|
|
|
|
function DialogOnClosed()
|
|
m.top.getScene().exitChannel = true
|
|
end function
|