From d2ba1218212e5db4d1afcc7c3f513e103ec88399 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 28 Dec 2022 13:38:08 -0500 Subject: Add beginnings of UI widget module. --- Makefile.am | 1 + catbird/ui.scm | 340 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 341 insertions(+) create mode 100644 catbird/ui.scm diff --git a/Makefile.am b/Makefile.am index 1fb5a2b..5351101 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,6 +50,7 @@ SOURCES = \ catbird/camera.scm \ catbird/node.scm \ catbird/node-2d.scm \ + catbird/ui.scm \ catbird/scene.scm \ catbird/region.scm \ catbird/kernel.scm \ diff --git a/catbird/ui.scm b/catbird/ui.scm new file mode 100644 index 0000000..fcd3427 --- /dev/null +++ b/catbird/ui.scm @@ -0,0 +1,340 @@ +;;; Catbird Game Engine +;;; Copyright © 2022 David Thompson +;;; +;;; Catbird 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. +;;; +;;; Catbird 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 Catbird. If not, see . + +;;; Commentary: +;; +;; Graphical user interface widgets. +;; +;;; Code: +(define-module (catbird ui) + #:use-module (catbird input-map) + #:use-module (catbird mixins) + #:use-module (catbird mode) + #:use-module (catbird node) + #:use-module (catbird node-2d) + #:use-module (catbird scene) + #:use-module (chickadee graphics color) + #:use-module (chickadee graphics path) + #:use-module (chickadee graphics text) + #:use-module (chickadee math vector) + #:use-module (ice-9 match) + #:use-module (oop goops) + #:use-module (srfi srfi-1) + #:export (accepts-cursor-focus? + on-cursor-enter + on-cursor-exit + on-primary-press + on-primary-click + + + + + + + margin + margin-left + margin-right + margin-bottom + margin-top + + + padding + + + +