;;; Copyright © 2022 David Thompson ;;; ;;; This program is free software: you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as ;;; published by the Free Software Foundation, either version 3 of the ;;; License, or (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;; General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with this program. If not, see ;;; . (define-module (apple-town-fair menu) #:use-module (apple-town-fair assets) #:use-module (apple-town-fair common) #:use-module (catbird asset) #:use-module (catbird node) #:use-module (catbird node-2d) #:use-module (chickadee graphics color) #:use-module (chickadee graphics path) #:use-module (chickadee graphics text) #:use-module (chickadee math) #:use-module (chickadee math vector) #:use-module (ice-9 match) #:use-module (oop goops) #:use-module (srfi srfi-1) #:export ( down-selection selection up-selection)) (define-class () (items #:accessor items #:init-keyword #:items) (item-nodes #:accessor item-nodes) (selected-item #:accessor selected-item)) (define-method (on-boot (menu )) (let ((nodes (map (lambda (item) (make