From 6f3fd2e9a6b691262f4ed3e4416e1c0bc54e732a Mon Sep 17 00:00:00 2001 From: Duncan Holmes <dholmes4@huskers.unl.edu> Date: Thu, 10 Apr 2025 15:48:58 -0500 Subject: [PATCH] Upload New File --- lab on ORM/movies.kv | 115 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 lab on ORM/movies.kv diff --git a/lab on ORM/movies.kv b/lab on ORM/movies.kv new file mode 100644 index 0000000..802ae93 --- /dev/null +++ b/lab on ORM/movies.kv @@ -0,0 +1,115 @@ +ScreenManager: + Screen: + name: 'movie_entry' + id: 'movie_entry' + BoxLayout: + orientation: 'vertical' + Label: + text: 'Enter a movie:' + font_size: sp(24) + BoxLayout: + orientation: 'horizontal' + Widget: + Label: + text: 'Movie Title:' + size_hint: (1.0, None) + height: sp(32) + Widget: + TextInput: + id: title + multiline: False + write_tab: False + size_hint: (4.0, None) + height: sp(32) + Widget: + BoxLayout: + orientation: 'horizontal' + Widget: + CheckBox: + id: action + size_hint: (None, None) + size: (sp(32), action_label.height) + Label: + id: action_label + text: 'Action' + size_hint: (None, 1.0) + size: self.texture_size + Widget: + BoxLayout: + orientation: 'horizontal' + Widget: + CheckBox: + id: adventure + size_hint: (None, None) + size: (sp(32), adventure_label.height) + Label: + id: adventure_label + text: 'Adventure' + size_hint: (None, 1.0) + size: self.texture_size + Widget: + BoxLayout: + orientation: 'horizontal' + Widget: + CheckBox: + id: sci_fi + size_hint: (None, None) + size: (sp(32), sci_fi_label.height) + Label: + id: sci_fi_label + text: 'SciFi' + size_hint: (None, 1.0) + size: self.texture_size + Widget: + BoxLayout: + orientation: 'horizontal' + Widget: + Button: + text: 'Create' + size_hint: (4.0, 1.0) + on_press: app.create_movie(title.text, action.active, adventure.active, sci_fi.active) + Button: + text: 'Update' + size_hint: (4.0, 1.0) + on_press: app.update_movie(title.text, action.active, adventure.active, sci_fi.active) + Button: + text: 'Delete' + size_hint: (4.0, 1.0) + on_press: app.delete_movie(title.text) + Widget: + BoxLayout: + orientation: 'horizontal' + Widget: + Label: + id: message + text: '' + size_hint: (None, 1.0) + size: self.texture_size + Widget: + +# All screens are white. +<Screen>: + canvas.before: + Color: + rgba: (1.0, 1.0, 1.0, 1.0) + Rectangle: + pos: self.pos + size: self.size + +# All labels are blue. +<Label>: + color: (0.0, 0.0, 0.75, 1.0) + +# All checkboxes are blue. +<CheckBox>: + canvas: + Color: + rgba: (0.0, 0.0, 0.75, 1.0) + Rectangle: + source: f'atlas://data/images/defaulttheme/checkbox{"_radio" if self.group else ""}{"_disabled" if self.disabled else ""}{"_on" if self.active else "_off"}' + size: sp(32), sp(32) + pos: int(self.center_x - sp(16)), int(self.center_y - sp(16)) + +# All buttons have white text. +<Button>: + color: (1.0, 1.0, 1.0, 1.0) -- GitLab