Skip to content

Commit 6415110

Browse files
committed
Update code docs
1 parent 4971fef commit 6415110

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

docs/components_data_SceneManager.bs.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@
7272

7373
' Remove the current group and load the last group from the stack
7474
sub popScene()
75+
' If this is the last scene on the stack, show exit confirmation instead of immediately exiting
76+
if m.groups.count() <= 1
77+
optionDialog(tr("Exit JellyRock"), [tr("Are you sure you want to exit JellyRock?")], [tr("Cancel"), tr("Exit")])
78+
m.top.pendingExitConfirmation = true
79+
return
80+
end if
81+
7582
group = m.groups.pop()
7683
if isValid(group)
7784
if group.isSubType("JRGroup")

docs/source_Main.bs.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,15 @@
949949
stopLoadingSpinner()
950950
if isValid(popupNode) and isValid(popupNode.returnData)
951951
print "popupNode.returnData = ", popupNode.returnData
952-
' Handle delete confirmation dialog
953-
if isValid(m.pendingDeleteItemId)
952+
' Handle exit confirmation dialog
953+
if m.global.sceneManager.pendingExitConfirmation = true
954+
m.global.sceneManager.pendingExitConfirmation = false
955+
if popupNode.returnData.indexSelected = 1 and popupNode.returnData.buttonSelected = tr("Exit")
956+
' User confirmed exit
957+
m.scene.exit = true
958+
end if
959+
' Handle delete confirmation dialog
960+
else if isValid(m.pendingDeleteItemId)
954961
if popupNode.returnData.indexSelected = 1 and popupNode.returnData.buttonSelected = tr("Delete")
955962
' User confirmed deletion
956963
api.items.DeleteByID(m.pendingDeleteItemId)

0 commit comments

Comments
 (0)