aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--logic/database.gd11
-rw-r--r--readme.md20
2 files changed, 15 insertions, 16 deletions
diff --git a/logic/database.gd b/logic/database.gd
index 1b9ffdb..3c2d6b7 100644
--- a/logic/database.gd
+++ b/logic/database.gd
@@ -169,13 +169,16 @@ func clear_database(save_changes: bool = false):
func fake_database(save_changes: bool = false):
clear_database()
for idx in range(500):
- var date_year = 1 + int(float(idx) / 365.0)
- var date_month = idx % 12
- var date_day = idx % 365
+ var today := OS.get_date(true)
+ var date_year = today.year + int(float(idx) / 30.0 / 12)
+ var date_month = 1 + int(float(idx) / 30.0) % 12
+ var date_day = 1 + (idx % 30)
var fake_entry = DatabaseEntry.instance_entry({
"process_id": "%06d" % idx,
"surgery_id": "s%05d" % idx,
- "date": "%04d-%02d-%02d" % [date_year, date_month, date_day]
+ "date_year": date_year,
+ "date_month": date_month,
+ "date_day": date_day,
})
db.append(fake_entry)
self.add_item(get_entry_view(fake_entry))
diff --git a/readme.md b/readme.md
index 51d0eff..ad0ec8f 100644
--- a/readme.md
+++ b/readme.md
@@ -24,7 +24,9 @@ Surgery Log
- 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;
-- [ ] check if import_option_sets, store_option_sets, store_database require the parameter save_changes; this requires changes on databse, stage and menu scripts;
+- [ ] add pop-up asking if changes are to be discarded once the stage screen's discard button is pressed;
+- [ ] add pop-up confirming delete-entry action; (pressing back should cancel the action);
+- [ ] edit and delete action buttons should be faded-out when no entry is selected;
- [ ] Implement file access permission check on Android:
```py
if OS.get_name() == "Android":
@@ -39,30 +41,24 @@ Surgery Log
else:
has_permissions = true
```
-- [ ] on stage screen: if a LineEdit is has text, it's "Clear Button Enabled" is set and the auto-entry-button should become smaller to allow more text to be visible;
+- [ ] check if import_option_sets, store_option_sets, store_database require the parameter save_changes; this requires changes on databse, stage and menu scripts;
- [ ] fix back button:
- 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;
-- [ ] main/screen_controller is responsible for whos currently on focus, fade animations, input access (enable/disable), and back_key_notification handling.
+- [ ] Create two themes:
+ - [ ] theme_light
+ - [ ] theme_dark
+ - [ ] 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)
-- [ ] add pop-up asking if changes are to be discarded once the stage screen's discard button is pressed;
-- [ ] add pop-up confirming delete-entry action; (pressing back should cancel the action);
-- [ ] edit and delete action buttons should be faded-out when no entry is selected;
- [ ] Share DB:
- share db via html email with db inserted in encoded downliadable field;
- Use this to send email: https://docs.godotengine.org/en/stable/classes/class_os.html#class-os-method-shell-open
- [ ] Translations:
- 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
-- [ ] Create two themes:
- - [ ] theme_light
- - [ ] theme_dark
-- [ ] on-press:
- - highlight item on lists
- - mark auto buttons as pressed