Skip to content

Commit

Permalink
add edit loot deck menu item
Browse files Browse the repository at this point in the history
Supports #88
  • Loading branch information
benknoble committed Sep 7, 2024
1 parent 7eef168 commit a9f75ce
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions gui/manager.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
(λ:= (state-@level s)))
(edit-players-menu-item s)
(edit-bestiary-menu-item s)
(edit-loot-deck-menu-item s)
(add-monster-group-menu-item s)
(edit-round-number-menu-item s)
(manage-prompt-menu-item (state-@prompts s)
Expand Down Expand Up @@ -471,3 +472,24 @@
(thunk
;; not setting current renderer, nor using an eventspace: dialog
(render (get-dialog)))))

(define (edit-loot-deck-menu-item s)
(define (get-dialog)
(define-close! close! closing-mixin)
(define (finish!)
(build-loot-deck! s)
(close!))
(dialog
#:mixin closing-mixin
#:title "Build Loot Deck"
#:style '() ;; no close button: need to finish! to build the loot deck
(loot-picker (state-@type->number-of-cards s)
(state-@type->deck s)
#:on-card (update-loot-deck-and-num-loot-cards s)
#:on-deck (λ:= (state-@type->deck s)))
(button "Ok" finish!)))
(menu-item
"Build Loot Deck"
(thunk
;; not setting current renderer, nor using an eventspace: dialog
(render (get-dialog)))))

0 comments on commit a9f75ce

Please sign in to comment.