From 82cb4f95cc757aa53d80d79bad59ca84f36abdb6 Mon Sep 17 00:00:00 2001 From: dam Date: Fri, 31 May 2024 13:03:17 +0100 Subject: Store readme from itch.io --- NOTES.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 46 +++++++++++++++++++++++++++++++++ readme.md | 86 ------------------------------------------------------------- 3 files changed, 134 insertions(+), 86 deletions(-) create mode 100644 NOTES.md create mode 100644 README.md delete mode 100644 readme.md diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..cca4480 --- /dev/null +++ b/NOTES.md @@ -0,0 +1,88 @@ +notes +===== + +# misc + +- Location of `user://`: `~/.local/share/godot/app_userdata/`. + +# todo + +- [x] Datepicker: On click (without drag) reset velocity to 0; show and focus 'input' to allow introducing value. +- [x] Selecting last (year?)/month/day and de-selecting it, moves value to next; +- [x] Solve how entries are shared across db_screen and stage_screen; +- [x] Remove db_entry; +- [x] Rename db script/node to database; +- [x] scrolling down on the database screen jumps to the end of the list immediatelly; +- [x] edited entry does not show updated once saved; +- [x] edited entry shows updated when selected then press back button; +- [x] load/store database CSV file; +- [x] export database to CSV file; +- [x] allow to reset database; +- [x] split touch logic from database (create TouchItemList); +- [x] split touch logic from stage (create TouchVerticalContainer); +- [x] load/store filters JSON file; +- [x] import/export filters to CSV file; +- [x] add option_sets buttons on stage screen: + - should show a pop-up with multiple options filtered according to current filters; + - allow options to be scrolled by dragging; + - selecting option puts that text on the associated LineEdit; +- [x] add pop-up asking if changes are to be discarded once the stage screen's discard button is pressed; +- [x] add pop-up confirming delete-entry action; +- [x] edit and delete action buttons should be faded-out when no entry is selected; +- [x] Sort option sets alphabetically; +- [x] Check and request file access permissions on Android: + ```py + if OS.get_name() == "Android": + var has_permissions := false + while not has_permissions: + var permissions := Array(OS.get_granted_permissions()) + if not permissions.has("android.permission.READ_EXTERNAL_STORAGE") \ + or not permissions.has("android.permission.WRITE_EXTERNAL_STORAGE"): + OS.request_permissions() + # await get_tree().create_timer(1).timeout + yield(get_tree().create_timer(1), "timeout") # - for Godot 3 branch + else: + has_permissions = true + ``` +- [x] Fix the show option sets buttons; they are drawn over the input fields and hide inserted text; +- [x] The stage control must be set to ignore the mouse, otherwise the touch-sensor conflicts with the built-in scroll; +- [x] On database, selecting an entry and removing it will leave the action buttons visible while no entry is selected; +- [x] Tweak 'POINTER_VELOCITY_DECAYING_FACTOR' and 'POINTER_VELOCITY_BOOST_FACTOR' on database and stage screens; +- [x] Allow to parse option sets from database file; +- [x] Check if import_option_sets, store_option_sets, store_database require the parameter save_changes; this requires changes on databse, stage and menu scripts; +- [x] Maybe replace fonts with non-mono version; +- [x] Fix option sets GUI element to provide word-wrap, otherwise long texts will be hidden; +- [x] After save and load, entries opened on stage always detect changes (even when no change occurs); +- [x] Add to popup: + - [x] title; + - [x] dismiss button; +- [x] Hide dialogs title bar (appear in the top with 1 or 2 pixels height); +- [x] Fix automation to automatically disconnect acceptance signal handlers when reject is chosen on file_picker/confirm_action; +- [x] Use popup to display confirmation messages; +- [x] Improve option sets: selecting outside optionset entry should select none; if no options are available, show nothing instead of "--"; +- [x] Set stage discard/save buttons side by side; +- [x] Implement back button logic; + - on stage screen should show pop-up asking it changes are to be discarded; + - on file-pickers screen should close them; + - on about screen should close it; + - on auto-fill pop-up, should close it; + - on database screen, should deselect selected item, otherwise should quit the app; +- [x] db entry should be printed as "%9s | %4s | %yyyy-%MM"; +- [x] Cleanup code: + - [x] Search by tags @DAM and TODO; + - [x] Rename dialog and popup classes; + - [x] Reorganize code files; +- [x] Create day/night themes: + - [x] Store configuration on settings file; + - [x] fix ui on modal_popup; + - [x] use logo's red as key-color on the ui; low saturation on normal buttons; increase a bit of saturation and alpha for hover; boost on selected/pressed; + - [ ] fix ui of file-picker +- [x] fix access on android 11; Try using [MANAGE_EXTERNAL_STORAGE](https://github.com/godotengine/godot/pull/49435) or wait for v4.0? +- [x] main/screen_controller is responsible for whos currently on focus, fade animations, input access (enable/disable), and back_key_notification handling. + For input use: + node.set_process_input(!pause) + node.set_process_unhandled_input(!pause) + node.set_process_unhandled_key_input(!pause) +- [x] Translations: Will not do! + - https://docs.godotengine.org/en/stable/getting_started/workflow/assets/importing_translations.html + - https://docs.godotengine.org/en/stable/tutorials/i18n/internationalizing_games.html#introduction diff --git a/README.md b/README.md new file mode 100644 index 0000000..d0e95b4 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +Surgery Log +=========== + +Surgery oriented database insertion tool. + +--- + +This is a very simple tool to help input surgery oriented records on a +database using the mobile phone. + +# Why use it? + +Because! Also, most of the input fields haveĀ a drop-down list that helps +you fill in the data. As new entries get created on the database, the +field values are used to populate the drop-down option sets to help fill +in the subsequent records. + +To avoid cluttering the drop-down lists, the fields "Type" and +"Sub-type" are used to filter which options appear on the fields +"Sub-sub-type", "Pathology", and "Intervention". + +From the main screen, where the database entries are listed, you are +able to create new entries, edit or delete existing ones. + +From the menu (cogwheel) you are able to import, export and clear both +the option sets present on the drop-down menus and the database entries +(to CSV and JSON). There's also an option to toggle between the +day/night visual themes. + +# Why create such tool? + +This tool came into existence after being asked to insert several +hundreds of paper records into a database. As you can imagine, after +inserting the first dozen I thought what every programmer thinks when +performing repetitive tasks "let's automate this". Since I could not +easily automate the task, I decided to avoid it completely by providing +a convenient tool that allowed people to create the entries via mobile +phone instead of creating more paper records. + +# Why use Godot? + +Tired of spending time setting up project dependencies and whatnot (yes +I'm looking at you Android Studio & Friends), I decided to give Godot a +go. Oh boy, did I spend time creating UI features... Nevertheless, I +still don't regret the decision. I'd rather write UI components than +setup SDKs and stuff. diff --git a/readme.md b/readme.md deleted file mode 100644 index dbbd45f..0000000 --- a/readme.md +++ /dev/null @@ -1,86 +0,0 @@ -Surgery Log -=========== - -# Notes -- Location of `user://`: `~/.local/share/godot/app_userdata/`. - -# ToDo -- [x] Datepicker: On click (without drag) reset velocity to 0; show and focus 'input' to allow introducing value. -- [x] Selecting last (year?)/month/day and de-selecting it, moves value to next; -- [x] Solve how entries are shared across db_screen and stage_screen; -- [x] Remove db_entry; -- [x] Rename db script/node to database; -- [x] scrolling down on the database screen jumps to the end of the list immediatelly; -- [x] edited entry does not show updated once saved; -- [x] edited entry shows updated when selected then press back button; -- [x] load/store database CSV file; -- [x] export database to CSV file; -- [x] allow to reset database; -- [x] split touch logic from database (create TouchItemList); -- [x] split touch logic from stage (create TouchVerticalContainer); -- [x] load/store filters JSON file; -- [x] import/export filters to CSV file; -- [x] add option_sets buttons on stage screen: - - should show a pop-up with multiple options filtered according to current filters; - - allow options to be scrolled by dragging; - - selecting option puts that text on the associated LineEdit; -- [x] add pop-up asking if changes are to be discarded once the stage screen's discard button is pressed; -- [x] add pop-up confirming delete-entry action; -- [x] edit and delete action buttons should be faded-out when no entry is selected; -- [x] Sort option sets alphabetically; -- [x] Check and request file access permissions on Android: - ```py - if OS.get_name() == "Android": - var has_permissions := false - while not has_permissions: - var permissions := Array(OS.get_granted_permissions()) - if not permissions.has("android.permission.READ_EXTERNAL_STORAGE") \ - or not permissions.has("android.permission.WRITE_EXTERNAL_STORAGE"): - OS.request_permissions() - # await get_tree().create_timer(1).timeout - yield(get_tree().create_timer(1), "timeout") # - for Godot 3 branch - else: - has_permissions = true - ``` -- [x] Fix the show option sets buttons; they are drawn over the input fields and hide inserted text; -- [x] The stage control must be set to ignore the mouse, otherwise the touch-sensor conflicts with the built-in scroll; -- [x] On database, selecting an entry and removing it will leave the action buttons visible while no entry is selected; -- [x] Tweak 'POINTER_VELOCITY_DECAYING_FACTOR' and 'POINTER_VELOCITY_BOOST_FACTOR' on database and stage screens; -- [x] Allow to parse option sets from database file; -- [x] Check if import_option_sets, store_option_sets, store_database require the parameter save_changes; this requires changes on databse, stage and menu scripts; -- [x] Maybe replace fonts with non-mono version; -- [x] Fix option sets GUI element to provide word-wrap, otherwise long texts will be hidden; -- [x] After save and load, entries opened on stage always detect changes (even when no change occurs); -- [x] Add to popup: - - [x] title; - - [x] dismiss button; -- [x] Hide dialogs title bar (appear in the top with 1 or 2 pixels height); -- [x] Fix automation to automatically disconnect acceptance signal handlers when reject is chosen on file_picker/confirm_action; -- [x] Use popup to display confirmation messages; -- [x] Improve option sets: selecting outside optionset entry should select none; if no options are available, show nothing instead of "--"; -- [x] Set stage discard/save buttons side by side; -- [x] Implement back button logic; - - on stage screen should show pop-up asking it changes are to be discarded; - - on file-pickers screen should close them; - - on about screen should close it; - - on auto-fill pop-up, should close it; - - on database screen, should deselect selected item, otherwise should quit the app; -- [x] db entry should be printed as "%9s | %4s | %yyyy-%MM"; -- [x] Cleanup code: - - [x] Search by tags @DAM and TODO; - - [x] Rename dialog and popup classes; - - [x] Reorganize code files; -- [x] Create day/night themes: - - [x] Store configuration on settings file; - - [x] fix ui on modal_popup; - - [x] use logo's red as key-color on the ui; low saturation on normal buttons; increase a bit of saturation and alpha for hover; boost on selected/pressed; - - [ ] fix ui of file-picker -- [x] fix access on android 11; Try using [MANAGE_EXTERNAL_STORAGE](https://github.com/godotengine/godot/pull/49435) or wait for v4.0? -- [x] main/screen_controller is responsible for whos currently on focus, fade animations, input access (enable/disable), and back_key_notification handling. - For input use: - node.set_process_input(!pause) - node.set_process_unhandled_input(!pause) - node.set_process_unhandled_key_input(!pause) -- [x] Translations: Will not do! - - https://docs.godotengine.org/en/stable/getting_started/workflow/assets/importing_translations.html - - https://docs.godotengine.org/en/stable/tutorials/i18n/internationalizing_games.html#introduction -- cgit v1.2.3