From 2d7da6bbc23fb917dfe931eaeb5566da0a102ac3 Mon Sep 17 00:00:00 2001 From: dam Date: Sun, 10 Apr 2022 08:32:49 +0000 Subject: Code cleanup. --- date_picker/date_picker.gd | 64 --- date_picker/date_picker.tscn | 189 --------- date_picker/value_picker.gd | 132 ------- dialog/dialog.gd | 79 ---- file_picker.gd | 18 - logic/file_picker.gd | 18 + logic/menu.gd | 121 ++++++ logic/popup.gd | 76 ---- main.tscn | 54 +-- menu/font_b612.txt | 93 ----- menu/godot.txt | 20 - menu/menu.gd | 121 ------ old_native_project/AndroidManifest.xml | 30 -- .../gen/net/redroid/medlog/BuildConfig.java | 6 - old_native_project/gen/net/redroid/medlog/R.java | 145 ------- old_native_project/ic_launcher-web.png | Bin 118840 -> 0 bytes old_native_project/ic_launcher-web.png.import | 35 -- old_native_project/libs/android-support-v4.jar | Bin 627582 -> 0 bytes old_native_project/libs/javacsv.jar | Bin 13582 -> 0 bytes old_native_project/lint.xml | 3 - old_native_project/proguard-project.txt | 20 - old_native_project/project.properties | 14 - .../res/drawable-hdpi/ic_launcher.png | Bin 6369 -> 0 bytes .../res/drawable-hdpi/ic_launcher.png.import | 35 -- .../res/drawable-mdpi/ic_launcher.png | Bin 3108 -> 0 bytes .../res/drawable-mdpi/ic_launcher.png.import | 35 -- .../res/drawable-xhdpi/ic_launcher.png | Bin 9945 -> 0 bytes .../res/drawable-xhdpi/ic_launcher.png.import | 35 -- .../res/drawable-xxhdpi/ic_launcher.png | Bin 18410 -> 0 bytes .../res/drawable-xxhdpi/ic_launcher.png.import | 35 -- old_native_project/res/layout/activity_main.xml | 23 -- .../res/layout/fragment_file_operations.xml | 31 -- .../res/layout/fragment_main_dummy.xml | 16 - .../res/layout/fragment_new_entry.xml | 216 ---------- .../res/layout/fragment_view_data.xml | 24 -- .../res/layout/multiline_spinner_dropdown_item.xml | 28 -- .../res/layout/override_new_entry.xml | 95 ----- old_native_project/res/menu/main.xml | 9 - old_native_project/res/values-sw600dp/dimens.xml | 8 - .../res/values-sw720dp-land/dimens.xml | 9 - old_native_project/res/values-v11/styles.xml | 11 - old_native_project/res/values-v14/styles.xml | 12 - old_native_project/res/values/dimens.xml | 7 - old_native_project/res/values/strings.xml | 38 -- old_native_project/res/values/styles.xml | 20 - .../example/surgerylog/FileOperationsFragment.java | 185 --------- .../com/example/surgerylog/ISpinnerRefresh.java | 9 - .../src/com/example/surgerylog/MainActivity.java | 330 ---------------- .../src/com/example/surgerylog/MedLogInfo.java | 51 --- .../src/com/example/surgerylog/MedLogRoot.java | 142 ------- .../src/com/example/surgerylog/MedLogSubType.java | 87 ---- .../src/com/example/surgerylog/MedLogType.java | 52 --- .../com/example/surgerylog/NewEntryFragment.java | 437 --------------------- .../com/example/surgerylog/ViewDataFragment.java | 173 -------- option_set/option_set.gd | 44 --- option_set/option_set.tscn | 34 -- option_set/option_set_list.gd | 294 -------------- option_set/option_set_list.tscn | 9 - pointer_input_sensor.gd | 117 ------ project.godot | 18 +- readme.md | 8 +- touch_item_list/touch_item_list.gd | 68 ---- touch_item_list/touch_item_list.tscn | 19 - .../touch_vertical_container.gd | 118 ------ .../touch_vertical_container.tscn | 19 - ui/date_picker/date_picker.gd | 64 +++ ui/date_picker/date_picker.tscn | 189 +++++++++ ui/date_picker/value_picker.gd | 132 +++++++ ui/dialog/dialog.gd | 79 ++++ ui/modal_popup/modal_popup.gd | 76 ++++ ui/modal_popup/modal_popup.tscn | 40 ++ ui/option_set/option_set.gd | 44 +++ ui/option_set/option_set.tscn | 34 ++ ui/option_set/option_set_list.gd | 294 ++++++++++++++ ui/option_set/option_set_list.tscn | 9 + ui/pointer_input_sensor.gd | 117 ++++++ ui/touch_item_list/touch_item_list.gd | 68 ++++ ui/touch_item_list/touch_item_list.tscn | 19 + .../touch_vertical_container.gd | 118 ++++++ .../touch_vertical_container.tscn | 19 + 80 files changed, 1464 insertions(+), 3977 deletions(-) delete mode 100644 date_picker/date_picker.gd delete mode 100644 date_picker/date_picker.tscn delete mode 100644 date_picker/value_picker.gd delete mode 100644 dialog/dialog.gd delete mode 100644 file_picker.gd create mode 100644 logic/file_picker.gd create mode 100644 logic/menu.gd delete mode 100644 logic/popup.gd delete mode 100644 menu/font_b612.txt delete mode 100644 menu/godot.txt delete mode 100644 menu/menu.gd delete mode 100755 old_native_project/AndroidManifest.xml delete mode 100755 old_native_project/gen/net/redroid/medlog/BuildConfig.java delete mode 100755 old_native_project/gen/net/redroid/medlog/R.java delete mode 100755 old_native_project/ic_launcher-web.png delete mode 100644 old_native_project/ic_launcher-web.png.import delete mode 100755 old_native_project/libs/android-support-v4.jar delete mode 100755 old_native_project/libs/javacsv.jar delete mode 100755 old_native_project/lint.xml delete mode 100755 old_native_project/proguard-project.txt delete mode 100755 old_native_project/project.properties delete mode 100755 old_native_project/res/drawable-hdpi/ic_launcher.png delete mode 100644 old_native_project/res/drawable-hdpi/ic_launcher.png.import delete mode 100755 old_native_project/res/drawable-mdpi/ic_launcher.png delete mode 100644 old_native_project/res/drawable-mdpi/ic_launcher.png.import delete mode 100755 old_native_project/res/drawable-xhdpi/ic_launcher.png delete mode 100644 old_native_project/res/drawable-xhdpi/ic_launcher.png.import delete mode 100755 old_native_project/res/drawable-xxhdpi/ic_launcher.png delete mode 100644 old_native_project/res/drawable-xxhdpi/ic_launcher.png.import delete mode 100755 old_native_project/res/layout/activity_main.xml delete mode 100755 old_native_project/res/layout/fragment_file_operations.xml delete mode 100755 old_native_project/res/layout/fragment_main_dummy.xml delete mode 100755 old_native_project/res/layout/fragment_new_entry.xml delete mode 100755 old_native_project/res/layout/fragment_view_data.xml delete mode 100755 old_native_project/res/layout/multiline_spinner_dropdown_item.xml delete mode 100755 old_native_project/res/layout/override_new_entry.xml delete mode 100755 old_native_project/res/menu/main.xml delete mode 100755 old_native_project/res/values-sw600dp/dimens.xml delete mode 100755 old_native_project/res/values-sw720dp-land/dimens.xml delete mode 100755 old_native_project/res/values-v11/styles.xml delete mode 100755 old_native_project/res/values-v14/styles.xml delete mode 100755 old_native_project/res/values/dimens.xml delete mode 100755 old_native_project/res/values/strings.xml delete mode 100755 old_native_project/res/values/styles.xml delete mode 100755 old_native_project/src/com/example/surgerylog/FileOperationsFragment.java delete mode 100755 old_native_project/src/com/example/surgerylog/ISpinnerRefresh.java delete mode 100755 old_native_project/src/com/example/surgerylog/MainActivity.java delete mode 100755 old_native_project/src/com/example/surgerylog/MedLogInfo.java delete mode 100755 old_native_project/src/com/example/surgerylog/MedLogRoot.java delete mode 100755 old_native_project/src/com/example/surgerylog/MedLogSubType.java delete mode 100755 old_native_project/src/com/example/surgerylog/MedLogType.java delete mode 100755 old_native_project/src/com/example/surgerylog/NewEntryFragment.java delete mode 100755 old_native_project/src/com/example/surgerylog/ViewDataFragment.java delete mode 100644 option_set/option_set.gd delete mode 100644 option_set/option_set.tscn delete mode 100644 option_set/option_set_list.gd delete mode 100644 option_set/option_set_list.tscn delete mode 100644 pointer_input_sensor.gd delete mode 100644 touch_item_list/touch_item_list.gd delete mode 100644 touch_item_list/touch_item_list.tscn delete mode 100644 touch_vertical_container/touch_vertical_container.gd delete mode 100644 touch_vertical_container/touch_vertical_container.tscn create mode 100644 ui/date_picker/date_picker.gd create mode 100644 ui/date_picker/date_picker.tscn create mode 100644 ui/date_picker/value_picker.gd create mode 100644 ui/dialog/dialog.gd create mode 100644 ui/modal_popup/modal_popup.gd create mode 100644 ui/modal_popup/modal_popup.tscn create mode 100644 ui/option_set/option_set.gd create mode 100644 ui/option_set/option_set.tscn create mode 100644 ui/option_set/option_set_list.gd create mode 100644 ui/option_set/option_set_list.tscn create mode 100644 ui/pointer_input_sensor.gd create mode 100644 ui/touch_item_list/touch_item_list.gd create mode 100644 ui/touch_item_list/touch_item_list.tscn create mode 100644 ui/touch_vertical_container/touch_vertical_container.gd create mode 100644 ui/touch_vertical_container/touch_vertical_container.tscn diff --git a/date_picker/date_picker.gd b/date_picker/date_picker.gd deleted file mode 100644 index e2a793f..0000000 --- a/date_picker/date_picker.gd +++ /dev/null @@ -1,64 +0,0 @@ -extends Control -class_name DatePicker - -const days_per_month: Dictionary = { - 1: 31, - 2: 28, - 3: 31, - 4: 30, - 5: 31, - 6: 30, - 7: 31, - 8: 31, - 9: 30, - 10: 31, - 11: 30, - 12: 31, -} - -onready var year_picker := get_node("year") as ValuePicker -onready var month_picker := get_node("month") as ValuePicker -onready var day_picker := get_node("day") as ValuePicker - - -func _process(delta: float): - var year := year_picker.value - var month := month_picker.value - var day := day_picker.value - var days_on_month: int = days_per_month[month] - - var is_leap_year := (year % 4 == 0 && year % 100 != 0) || year % 400 == 0 - if is_leap_year && month == 2: - days_on_month = 29 - - if day > days_on_month: - day_picker.value = days_on_month - day_picker.max_value = days_on_month - - -func get_day() -> int: - return day_picker.value - - -func get_month() -> int: - return month_picker.value - - -func get_year() -> int: - return year_picker.value - - -func get_date() -> Dictionary: - return { - year = year_picker.value, - month = month_picker.value, - day = day_picker.value, - } - - -func set_date(new_year: int, new_month: int, new_day: int): - year_picker.value = new_year - month_picker.value = new_month - day_picker.value = new_day - - diff --git a/date_picker/date_picker.tscn b/date_picker/date_picker.tscn deleted file mode 100644 index 8b082f2..0000000 --- a/date_picker/date_picker.tscn +++ /dev/null @@ -1,189 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://date_picker/value_picker.gd" type="Script" id=1] -[ext_resource path="res://date_picker/date_picker.gd" type="Script" id=2] - -[node name="date_picker" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 2 ) - -[node name="year" type="Control" parent="."] -anchor_right = 0.333 -anchor_bottom = 1.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} -min_value = 1 -max_value = 9999 - -[node name="previous" type="Label" parent="year"] -anchor_right = 1.0 -anchor_bottom = 0.333 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="current" type="Label" parent="year"] -anchor_top = 0.333 -anchor_right = 1.0 -anchor_bottom = 0.666 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="input" type="LineEdit" parent="year/current"] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -focus_next = NodePath("../../../month/current/input") -custom_constants/minimum_spaces = 0 -align = 1 -max_length = 4 -caret_blink = true - -[node name="next" type="Label" parent="year"] -anchor_top = 0.666 -anchor_right = 1.0 -anchor_bottom = 1.0 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="month" type="Control" parent="."] -anchor_left = 0.333 -anchor_right = 0.666 -anchor_bottom = 1.0 -script = ExtResource( 1 ) -min_value = 1 -max_value = 12 - -[node name="previous" type="Label" parent="month"] -anchor_right = 1.0 -anchor_bottom = 0.333 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="current" type="Label" parent="month"] -anchor_top = 0.333 -anchor_right = 1.0 -anchor_bottom = 0.666 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="input" type="LineEdit" parent="month/current"] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -focus_next = NodePath("../../../day/current/input") -focus_previous = NodePath("../../../year/current/input") -custom_constants/minimum_spaces = 0 -align = 1 -max_length = 2 -caret_blink = true - -[node name="next" type="Label" parent="month"] -anchor_top = 0.666 -anchor_right = 1.0 -anchor_bottom = 1.0 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="day" type="Control" parent="."] -anchor_left = 0.666 -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} -min_value = 1 -max_value = 31 - -[node name="previous" type="Label" parent="day"] -anchor_right = 1.0 -anchor_bottom = 0.333 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="current" type="Label" parent="day"] -anchor_top = 0.333 -anchor_right = 1.0 -anchor_bottom = 0.666 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="input" type="LineEdit" parent="day/current"] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -focus_previous = NodePath("../../../month/current/input") -custom_constants/minimum_spaces = 0 -align = 1 -max_length = 2 -caret_blink = true - -[node name="next" type="Label" parent="day"] -anchor_top = 0.666 -anchor_right = 1.0 -anchor_bottom = 1.0 -mouse_filter = 1 -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="split_upper" type="ColorRect" parent="."] -anchor_top = 0.333 -anchor_right = 1.0 -anchor_bottom = 0.343 -color = Color( 1, 1, 1, 0.25 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="split_lower" type="ColorRect" parent="."] -anchor_top = 0.666 -anchor_right = 1.0 -anchor_bottom = 0.676 -color = Color( 1, 1, 1, 0.25 ) -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/date_picker/value_picker.gd b/date_picker/value_picker.gd deleted file mode 100644 index b70f1aa..0000000 --- a/date_picker/value_picker.gd +++ /dev/null @@ -1,132 +0,0 @@ -extends Control - -class_name ValuePicker - -const VELOCITY_DECAYING_FACTOR: float = 5.5 -const BINNING_THRESHOLD: float = 0.75 -const BINNING_ADJUST_P: float = 5.0 -const DRAG_THRESHOLD_CM: float = 0.250 - -export var min_value: int -export var max_value: int - -var pointer: Dictionary -var anchor: float -var value: int -var offset: float - -var scroll_unit_height: float -var label_previous_base_position: float -var label_current_base_position: float -var label_next_base_position: float - -onready var input := get_node("current/input") as LineEdit -onready var label_previous := get_node("previous") as Label -onready var label_current := get_node("current") as Label -onready var label_next := get_node("next") as Label -onready var screen_dpcm := float(OS.get_screen_dpi()) / 2.54 - - -func _ready(): - pointer = { - index = -1, - initial_position = Vector2.ZERO, - current_position = Vector2.ZERO, - velocity = Vector2.ZERO, - was_dragged = false, - is_active = false, - } - - input.connect("text_entered", self, "input_text_entered") - input.connect("focus_entered", self, "input_focus_entered") - input.connect("focus_exited", self, "input_focus_exited") - - scroll_unit_height = label_current.rect_size.y - label_previous_base_position = label_previous.rect_position.y - label_current_base_position = label_current.rect_position.y - label_next_base_position = label_next.rect_position.y - - value = min_value - offset = 0.0 - - -func _process(delta: float): - - if pointer.is_active: - var dragged_distance: float = - (pointer.current_position.y - pointer.initial_position.y) - offset = anchor + (dragged_distance / scroll_unit_height) - value = int(offset) - offset -= value - else: - pointer.velocity *= clamp((1.0 - VELOCITY_DECAYING_FACTOR * delta), 0.0, 1.0) - offset -= pointer.velocity.y * delta / scroll_unit_height - if abs(pointer.velocity.y) < BINNING_THRESHOLD * scroll_unit_height: - offset -= offset * BINNING_ADJUST_P * delta - - # Using 'offset * 2.0' (equivalent to 'offset / 0.5') rounds the value based on 0.5 units. - var cummulative_displacement := int(offset * 2.0) - value = wrapi(value + cummulative_displacement, min_value, max_value + 1) - offset -= cummulative_displacement - - label_current.text = "%d" % value - label_next.text = "%d" % wrapi(value + 1, min_value, max_value + 1) - label_previous.text = "%d" % wrapi(value - 1, min_value, max_value + 1) - - var offset_position := offset * scroll_unit_height - label_current.rect_position.y = label_current_base_position - offset_position - label_previous.rect_position.y = label_previous_base_position - offset_position - label_next.rect_position.y = label_next_base_position - offset_position - - label_previous.modulate.a = 0.5 - offset - label_next.modulate.a = offset + 0.5 - - -func _gui_input(event: InputEvent): - - # @DAM A bug on GODOT-3.X makes events from non-mouse-emulated pointers (index > 0) unreliable. - if event is InputEventScreenTouch || event is InputEventScreenDrag: - if event.index != 0: - return - - if event is InputEventScreenTouch && (pointer.is_active == false || pointer.index == event.index): - var touch := event as InputEventScreenTouch - pointer.is_active = event.pressed - pointer.current_position = touch.position - if pointer.is_active: - input.release_focus() - pointer.index = touch.index - pointer.initial_position = touch.position - anchor = value + offset - else: - if pointer.was_dragged == false: # Click detected. - input.grab_focus() - pointer.index = -1 - pointer.was_dragged = false - - if event is InputEventScreenDrag && event.index == pointer.index: - var drag := event as InputEventScreenDrag - pointer.current_position = drag.position - pointer.velocity = drag.speed - if pointer.current_position.distance_to(pointer.initial_position) / screen_dpcm > DRAG_THRESHOLD_CM: - pointer.was_dragged = true - - -func input_text_entered(new_text: String): - input.release_focus() - - -func input_focus_entered(): - pointer.velocity = Vector2.ZERO # Avoid changing to other value once entering input. - input.text = "%d" % value - input.visible = true - input.select_all() - label_current.self_modulate.a = 0.0 - - -func input_focus_exited(): - if input.text.is_valid_integer(): - value = wrapi(int(input.text), min_value, max_value + 1) - input.visible = false - label_current.self_modulate.a = 1.0 - - diff --git a/dialog/dialog.gd b/dialog/dialog.gd deleted file mode 100644 index 89fee5c..0000000 --- a/dialog/dialog.gd +++ /dev/null @@ -1,79 +0,0 @@ -extends Control -class_name Dialog - -signal answered # (accepted: bool) -signal accepted # () -signal rejected # () - -export var clear_signals_on_hide := true - -var message : Label -var accept_button : Button -var reject_button : Button - - -func _init(): - self.anchor_right = 1.0 - self.anchor_bottom = 1.0 - self.rect_clip_content = true - self.connect("hide", self, "_clear_signals") - - reject_button = Button.new() - reject_button.anchor_top = 1.0 - reject_button.anchor_left = 0.0 - reject_button.anchor_right = 0.5 - reject_button.margin_right = -5.0 - reject_button.rect_min_size.y = 62.0 - reject_button.grow_vertical = Control.GROW_DIRECTION_BEGIN - reject_button.name = "reject" - reject_button.connect("pressed", self, "_signal_rejected") - add_child(reject_button) - - accept_button = Button.new() - accept_button.anchor_top = 1.0 - accept_button.anchor_left = 0.5 - accept_button.anchor_right = 1.0 - accept_button.margin_left = 5.0 - accept_button.rect_min_size.y = 62.0 - accept_button.grow_vertical = Control.GROW_DIRECTION_BEGIN - accept_button.name = "accept" - accept_button.connect("pressed", self, "_signal_accepted") - add_child(accept_button) - - message = Label.new() - message.autowrap = true - message.align = Label.ALIGN_CENTER - message.anchor_right = 1.0 - message.anchor_bottom = 1.0 - add_child(message) - - -func _clear_signals(): - if clear_signals_on_hide == false: - return - - for signal_name in ["answered", "accepted", "rejected"]: - for it in get_signal_connection_list(signal_name): - disconnect(it.signal, it.target, it.method) - - -func _signal_rejected(): - emit_signal("rejected") - emit_signal("answered", false) - hide() - - -func _signal_accepted(): - emit_signal("accepted") - emit_signal("answered", true) - hide() - - -func setup(message: String, accept_label: String = "Accept", reject_label: String = "Reject"): - self.message.text = message - accept_button.visible = accept_label != "" - accept_button.text = accept_label - reject_button.visible = reject_label != "" - reject_button.text = reject_label - - diff --git a/file_picker.gd b/file_picker.gd deleted file mode 100644 index 9715d0d..0000000 --- a/file_picker.gd +++ /dev/null @@ -1,18 +0,0 @@ -extends FileDialog - -export var clear_signals_on_hide := true - - -func _init(): - self.connect("hide", self, "_clear_signals") - - -func _clear_signals(): - if clear_signals_on_hide == false: - return - - for signal_name in ["file_selected"]: - for it in get_signal_connection_list(signal_name): - disconnect(it.signal, it.target, it.method) - - diff --git a/logic/file_picker.gd b/logic/file_picker.gd new file mode 100644 index 0000000..9715d0d --- /dev/null +++ b/logic/file_picker.gd @@ -0,0 +1,18 @@ +extends FileDialog + +export var clear_signals_on_hide := true + + +func _init(): + self.connect("hide", self, "_clear_signals") + + +func _clear_signals(): + if clear_signals_on_hide == false: + return + + for signal_name in ["file_selected"]: + for it in get_signal_connection_list(signal_name): + disconnect(it.signal, it.target, it.method) + + diff --git a/logic/menu.gd b/logic/menu.gd new file mode 100644 index 0000000..d6e1501 --- /dev/null +++ b/logic/menu.gd @@ -0,0 +1,121 @@ +extends MenuButton + +const menu_items: Array = [ + { label = "Import Option Sets", action = "import_option_sets_action" }, + { label = "Export Option Sets", action = "export_option_sets_action" }, + { label = "Clear Option Sets", action = "clear_option_sets_action" }, + { label = "Import Database", action = "import_database_action" }, + { label = "Export Database", action = "export_database_action" }, + { label = "Clear Database", action = "clear_database_action" }, + { label = "About", action = "about_action" }, +] +const license_font_b612: String = "res://licenses/font_b612.txt" +const license_godot: String = "res://licenses/godot.txt" + +onready var menu := get_popup() as PopupMenu +onready var popup := get_node("/root/main/popup") as ModalPopup +onready var dialog := get_node("/root/main/dialog") as Dialog +onready var file_picker := get_node("/root/main/file_picker") as FileDialog +onready var database := get_node("/root/main/database") as Database +onready var stage := get_node("/root/main/stage") as Stage + + +func _ready(): + for idx in range(menu_items.size()): + menu.add_item(menu_items[idx].label, idx) + menu.connect("id_pressed", self, "id_pressed") + + +func id_pressed(id: int): + self.call_deferred(menu_items[id].action) + + +func import_option_sets_action(): + dialog.setup("All option sets from the dropdown menus will be replaced.", "Continue", "No") + dialog.connect("accepted", self, "import_option_sets_action_accepted") + popup.open_popup("Replace option sets?", dialog) + + +func import_option_sets_action_accepted(): + file_picker.mode = FileDialog.MODE_OPEN_FILE + file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) + file_picker.filters = ["*.json", "*.csv"] + file_picker.current_file = "" + file_picker.connect("file_selected", self, "import_option_sets") + file_picker.show_modal(true) + file_picker.invalidate() + + +func import_option_sets(file_path: String): + stage.load_option_sets(file_path) + stage.save_option_sets() + + +func export_option_sets_action(): + file_picker.mode = FileDialog.MODE_SAVE_FILE + file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) + file_picker.filters = ["*.json"] + file_picker.current_file = "" + file_picker.connect("file_selected", stage, "save_option_sets") + file_picker.show_modal(true) + file_picker.invalidate() + + +func clear_option_sets_action(): + dialog.setup("All option sets from the dropdown menus will be deleted.", "Delete all", "No") + dialog.connect("accepted", self, "clear_option_sets") + popup.open_popup("Clear option sets?", dialog) + + +func clear_option_sets(): + stage.clear_option_sets() + stage.save_option_sets() + + +func import_database_action(): + dialog.setup("All entries from the database will be replaced.", "Continue", "No") + dialog.connect("accepted", self, "import_database_action_accepted") + popup.open_popup("Replace database?", dialog) + + +func import_database_action_accepted(): + file_picker.mode = FileDialog.MODE_OPEN_FILE + file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) + file_picker.filters = ["*.json", "*.csv"] + file_picker.current_file = "" + file_picker.connect("file_selected", self, "import_database") + file_picker.show_modal(true) + file_picker.invalidate() + + +func import_database(file_path: String): + database.load_database(file_path) + database.save_database() + + +func export_database_action(): + file_picker.mode = FileDialog.MODE_SAVE_FILE + file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) + file_picker.filters = ["*.csv"] + file_picker.current_file = "" + file_picker.connect("file_selected", database, "save_database") + file_picker.show_modal(true) + file_picker.invalidate() + + +func clear_database_action(): + dialog.setup("All entries from the database will be deleted.", "Delete all", "No") + dialog.connect("accepted", self, "clear_database") + popup.open_popup("Clear database?", dialog) + + +func clear_database(): + database.clear_database() + database.save_database() + + +func about_action(): + dialog.setup("Surgery Log\nversion 0.1", "", "") + popup.open_popup("About", dialog) + + diff --git a/logic/popup.gd b/logic/popup.gd deleted file mode 100644 index 95fc2c3..0000000 --- a/logic/popup.gd +++ /dev/null @@ -1,76 +0,0 @@ -extends Control -class_name ModalPopup - -signal dismissed # () - -export var clear_signals_on_hide := true - -var control : Control -var control_parent : Node - -onready var title := get_node("title") as Label -onready var background := get_node("background") as Panel -onready var dismiss_button := get_node("dismiss") as Button - - -func _init(): - self.anchor_right = 1.0 - self.anchor_bottom = 1.0 - self.rect_clip_content = true - self.connect("hide", self, "_clear_signals") - - -func _ready(): - dismiss_button.connect("pressed", self, "dismiss") - - -func _clear_signals(): - if clear_signals_on_hide == false: - return - - for signal_name in ["dismissed"]: - for it in get_signal_connection_list(signal_name): - disconnect(it.signal, it.target, it.method) - - -func dismiss(): - emit_signal("dismissed") - close_popup() - - -func open_popup(title: String, item: Control): - if visible == true: - return - - self.title.text = title - - control = item - control.connect("hide", self, "close_popup") - control_parent = control.get_parent() - control_parent.remove_child(control) - self.add_child(control) - - control.anchor_left = background.anchor_left - control.anchor_top = background.anchor_top - control.anchor_right = background.anchor_right - control.anchor_bottom = background.anchor_bottom - control.margin_left = 20 - control.margin_top = 20 - control.margin_right = -20 - control.margin_bottom = -20 - - self.show() - control.show() - - -func close_popup(): - if visible == false: - return - - control.disconnect("hide", self, "close_popup") - control.hide() - self.hide() - remove_child(control) - control_parent.add_child(control) - control_parent = null - diff --git a/main.tscn b/main.tscn index 4a99142..9fce789 100644 --- a/main.tscn +++ b/main.tscn @@ -1,19 +1,19 @@ [gd_scene load_steps=15 format=2] [ext_resource path="res://main.gd" type="Script" id=1] -[ext_resource path="res://date_picker/date_picker.tscn" type="PackedScene" id=2] +[ext_resource path="res://ui/date_picker/date_picker.tscn" type="PackedScene" id=2] [ext_resource path="res://themes/dark.tres" type="Theme" id=3] -[ext_resource path="res://menu/menu.gd" type="Script" id=4] +[ext_resource path="res://logic/menu.gd" type="Script" id=4] [ext_resource path="res://logic/database.gd" type="Script" id=5] [ext_resource path="res://fonts/font_icons.tres" type="DynamicFont" id=6] -[ext_resource path="res://option_set/option_set.tscn" type="PackedScene" id=7] -[ext_resource path="res://option_set/option_set_list.gd" type="Script" id=8] +[ext_resource path="res://ui/option_set/option_set.tscn" type="PackedScene" id=7] +[ext_resource path="res://ui/option_set/option_set_list.gd" type="Script" id=8] [ext_resource path="res://logic/stage.gd" type="Script" id=9] -[ext_resource path="res://logic/popup.gd" type="Script" id=10] -[ext_resource path="res://touch_item_list/touch_item_list.tscn" type="PackedScene" id=11] -[ext_resource path="res://touch_vertical_container/touch_vertical_container.tscn" type="PackedScene" id=12] -[ext_resource path="res://dialog/dialog.gd" type="Script" id=14] -[ext_resource path="res://file_picker.gd" type="Script" id=15] +[ext_resource path="res://ui/modal_popup/modal_popup.tscn" type="PackedScene" id=10] +[ext_resource path="res://ui/touch_item_list/touch_item_list.tscn" type="PackedScene" id=11] +[ext_resource path="res://ui/touch_vertical_container/touch_vertical_container.tscn" type="PackedScene" id=12] +[ext_resource path="res://ui/dialog/dialog.gd" type="Script" id=14] +[ext_resource path="res://logic/file_picker.gd" type="Script" id=15] [node name="main" type="Control"] anchor_right = 1.0 @@ -258,41 +258,7 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="popup" type="ColorRect" parent="."] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -color = Color( 0, 0, 0, 0.870588 ) -script = ExtResource( 10 ) - -[node name="background" type="Panel" parent="popup"] -anchor_left = 0.05 -anchor_top = 0.1 -anchor_right = 0.95 -anchor_bottom = 0.975 - -[node name="title" type="Label" parent="popup"] -anchor_left = 0.124 -anchor_top = 0.025 -anchor_right = 0.95 -anchor_bottom = 0.1 -margin_left = 0.0799866 -margin_right = -80.0 -margin_bottom = -20.0 -align = 1 -valign = 1 -autowrap = true - -[node name="dismiss" type="Button" parent="popup"] -anchor_left = 0.05 -anchor_top = 0.025 -anchor_right = 0.124 -anchor_bottom = 0.1 -margin_right = 0.0799866 -margin_bottom = -20.0 -custom_fonts/font = ExtResource( 6 ) -text = "" -flat = true +[node name="popup" parent="." instance=ExtResource( 10 )] [node name="option_set_list" type="Control" parent="."] visible = false diff --git a/menu/font_b612.txt b/menu/font_b612.txt deleted file mode 100644 index 2826948..0000000 --- a/menu/font_b612.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2012 The B612 Project Authors (https://github.com/polarsys/b612) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/menu/godot.txt b/menu/godot.txt deleted file mode 100644 index bee83fb..0000000 --- a/menu/godot.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. -Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/menu/menu.gd b/menu/menu.gd deleted file mode 100644 index d6e1501..0000000 --- a/menu/menu.gd +++ /dev/null @@ -1,121 +0,0 @@ -extends MenuButton - -const menu_items: Array = [ - { label = "Import Option Sets", action = "import_option_sets_action" }, - { label = "Export Option Sets", action = "export_option_sets_action" }, - { label = "Clear Option Sets", action = "clear_option_sets_action" }, - { label = "Import Database", action = "import_database_action" }, - { label = "Export Database", action = "export_database_action" }, - { label = "Clear Database", action = "clear_database_action" }, - { label = "About", action = "about_action" }, -] -const license_font_b612: String = "res://licenses/font_b612.txt" -const license_godot: String = "res://licenses/godot.txt" - -onready var menu := get_popup() as PopupMenu -onready var popup := get_node("/root/main/popup") as ModalPopup -onready var dialog := get_node("/root/main/dialog") as Dialog -onready var file_picker := get_node("/root/main/file_picker") as FileDialog -onready var database := get_node("/root/main/database") as Database -onready var stage := get_node("/root/main/stage") as Stage - - -func _ready(): - for idx in range(menu_items.size()): - menu.add_item(menu_items[idx].label, idx) - menu.connect("id_pressed", self, "id_pressed") - - -func id_pressed(id: int): - self.call_deferred(menu_items[id].action) - - -func import_option_sets_action(): - dialog.setup("All option sets from the dropdown menus will be replaced.", "Continue", "No") - dialog.connect("accepted", self, "import_option_sets_action_accepted") - popup.open_popup("Replace option sets?", dialog) - - -func import_option_sets_action_accepted(): - file_picker.mode = FileDialog.MODE_OPEN_FILE - file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) - file_picker.filters = ["*.json", "*.csv"] - file_picker.current_file = "" - file_picker.connect("file_selected", self, "import_option_sets") - file_picker.show_modal(true) - file_picker.invalidate() - - -func import_option_sets(file_path: String): - stage.load_option_sets(file_path) - stage.save_option_sets() - - -func export_option_sets_action(): - file_picker.mode = FileDialog.MODE_SAVE_FILE - file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) - file_picker.filters = ["*.json"] - file_picker.current_file = "" - file_picker.connect("file_selected", stage, "save_option_sets") - file_picker.show_modal(true) - file_picker.invalidate() - - -func clear_option_sets_action(): - dialog.setup("All option sets from the dropdown menus will be deleted.", "Delete all", "No") - dialog.connect("accepted", self, "clear_option_sets") - popup.open_popup("Clear option sets?", dialog) - - -func clear_option_sets(): - stage.clear_option_sets() - stage.save_option_sets() - - -func import_database_action(): - dialog.setup("All entries from the database will be replaced.", "Continue", "No") - dialog.connect("accepted", self, "import_database_action_accepted") - popup.open_popup("Replace database?", dialog) - - -func import_database_action_accepted(): - file_picker.mode = FileDialog.MODE_OPEN_FILE - file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) - file_picker.filters = ["*.json", "*.csv"] - file_picker.current_file = "" - file_picker.connect("file_selected", self, "import_database") - file_picker.show_modal(true) - file_picker.invalidate() - - -func import_database(file_path: String): - database.load_database(file_path) - database.save_database() - - -func export_database_action(): - file_picker.mode = FileDialog.MODE_SAVE_FILE - file_picker.current_dir = OS.get_system_dir(OS.SYSTEM_DIR_DOWNLOADS) - file_picker.filters = ["*.csv"] - file_picker.current_file = "" - file_picker.connect("file_selected", database, "save_database") - file_picker.show_modal(true) - file_picker.invalidate() - - -func clear_database_action(): - dialog.setup("All entries from the database will be deleted.", "Delete all", "No") - dialog.connect("accepted", self, "clear_database") - popup.open_popup("Clear database?", dialog) - - -func clear_database(): - database.clear_database() - database.save_database() - - -func about_action(): - dialog.setup("Surgery Log\nversion 0.1", "", "") - popup.open_popup("About", dialog) - - diff --git a/old_native_project/AndroidManifest.xml b/old_native_project/AndroidManifest.xml deleted file mode 100755 index fd4ec79..0000000 --- a/old_native_project/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/old_native_project/gen/net/redroid/medlog/BuildConfig.java b/old_native_project/gen/net/redroid/medlog/BuildConfig.java deleted file mode 100755 index c27f499..0000000 --- a/old_native_project/gen/net/redroid/medlog/BuildConfig.java +++ /dev/null @@ -1,6 +0,0 @@ -/** Automatically generated file. DO NOT MODIFY */ -package net.redroid.medlog; - -public final class BuildConfig { - public final static boolean DEBUG = true; -} \ No newline at end of file diff --git a/old_native_project/gen/net/redroid/medlog/R.java b/old_native_project/gen/net/redroid/medlog/R.java deleted file mode 100755 index 59722b1..0000000 --- a/old_native_project/gen/net/redroid/medlog/R.java +++ /dev/null @@ -1,145 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package net.redroid.medlog; - -public final class R { - public static final class attr { - } - public static final class dimen { - /** Default screen margins, per the Android Design guidelines. - - Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. - - */ - public static final int activity_horizontal_margin=0x7f040000; - public static final int activity_vertical_margin=0x7f040001; - } - public static final class drawable { - public static final int ic_launcher=0x7f020000; - } - public static final class id { - public static final int FileOperationsView=0x7f080002; - public static final int NewEntryView=0x7f080006; - public static final int OverrideNewEntry=0x7f080022; - public static final int RelativeLayout1=0x7f08001f; - public static final int action_settings=0x7f08002b; - public static final int anesthesiaOverride=0x7f08000d; - public static final int anesthesiaSpinner=0x7f08000c; - public static final int dataBaseListView=0x7f080021; - public static final int datePicker=0x7f080008; - public static final int exportDataBase=0x7f080004; - public static final int fillOverrideButton=0x7f08001d; - public static final int firstAiderOverride=0x7f08000f; - public static final int firstAiderSpinner=0x7f08000e; - public static final int importButton=0x7f080003; - public static final int interventionOverride=0x7f080019; - public static final int interventionSpinner=0x7f080018; - public static final int medSubSubTypeOverride=0x7f080015; - public static final int medSubSubTypeSpinner=0x7f080014; - public static final int medSubTypeOverride=0x7f080013; - public static final int medSubTypeSpinner=0x7f080012; - public static final int medTypeOverride=0x7f080011; - public static final int medTypeSpinner=0x7f080010; - public static final int nProcess=0x7f080007; - public static final int nSurgery=0x7f080009; - public static final int notesText=0x7f08001b; - public static final int overrideAnesthesia=0x7f08002a; - public static final int overrideCheckBox=0x7f08001c; - public static final int overrideFirstAider=0x7f080028; - public static final int overrideIntervention=0x7f080027; - public static final int overridePatholoty=0x7f080026; - public static final int overridePlace=0x7f080029; - public static final int overrideSubSubType=0x7f080025; - public static final int overrideSubType=0x7f080024; - public static final int overrideType=0x7f080023; - public static final int pager=0x7f080000; - public static final int pager_title_strip=0x7f080001; - public static final int pathologyOverride=0x7f080017; - public static final int pathologySpinner=0x7f080016; - public static final int placeOverride=0x7f08000b; - public static final int placeSpinner=0x7f08000a; - public static final int refreshBtn=0x7f080020; - public static final int saveButton=0x7f08001e; - public static final int section_label=0x7f080005; - public static final int urgencyCheckBox=0x7f08001a; - } - public static final class layout { - public static final int activity_main=0x7f030000; - public static final int fragment_file_operations=0x7f030001; - public static final int fragment_main_dummy=0x7f030002; - public static final int fragment_new_entry=0x7f030003; - public static final int fragment_view_data=0x7f030004; - public static final int multiline_spinner_dropdown_item=0x7f030005; - public static final int override_new_entry=0x7f030006; - } - public static final class menu { - public static final int main=0x7f070000; - } - public static final class string { - public static final int action_settings=0x7f050001; - public static final int anesthesia_str=0x7f05001c; - public static final int app_name=0x7f050000; - public static final int delete_str=0x7f05000c; - public static final int errorMissingProcessNumber_str=0x7f050010; - public static final int exportDataBase_str=0x7f050009; - public static final int exportMessageError_str=0x7f05000f; - public static final int exportMessage_str=0x7f05000e; - public static final int filloverride_str=0x7f050015; - public static final int firstaider_str=0x7f05001b; - public static final int importConfigs_str=0x7f050008; - public static final int intervention_str=0x7f05001a; - public static final int nProcess_str=0x7f050005; - public static final int nSurgery_str=0x7f050006; - public static final int no_str=0x7f050013; - public static final int notes_str=0x7f05001e; - public static final int ok_str=0x7f05000b; - public static final int override_str=0x7f050014; - public static final int pathology_str=0x7f050019; - public static final int place_str=0x7f05001d; - public static final int refresh_str=0x7f05000d; - public static final int save_str=0x7f05000a; - public static final int subsubtype_str=0x7f050018; - public static final int subtype_str=0x7f050017; - public static final int successSavingEntry_str=0x7f050011; - public static final int title_section1=0x7f050002; - public static final int title_section2=0x7f050003; - public static final int title_section3=0x7f050004; - public static final int type_str=0x7f050016; - public static final int urgency_str=0x7f050007; - public static final int yes_str=0x7f050012; - } - public static final class style { - /** - Base application theme, dependent on API level. This theme is replaced - by AppBaseTheme from res/values-vXX/styles.xml on newer devices. - - - Theme customizations available in newer API levels can go in - res/values-vXX/styles.xml, while customizations related to - backward-compatibility can go here. - - - Base application theme for API 11+. This theme completely replaces - AppBaseTheme from res/values/styles.xml on API 11+ devices. - - API 11 theme customizations can go here. - - Base application theme for API 14+. This theme completely replaces - AppBaseTheme from BOTH res/values/styles.xml and - res/values-v11/styles.xml on API 14+ devices. - - API 14 theme customizations can go here. - */ - public static final int AppBaseTheme=0x7f060000; - /** Application theme. - All customizations that are NOT specific to a particular API-level can go here. - */ - public static final int AppTheme=0x7f060001; - } -} diff --git a/old_native_project/ic_launcher-web.png b/old_native_project/ic_launcher-web.png deleted file mode 100755 index e4d20ec..0000000 Binary files a/old_native_project/ic_launcher-web.png and /dev/null differ diff --git a/old_native_project/ic_launcher-web.png.import b/old_native_project/ic_launcher-web.png.import deleted file mode 100644 index f462da2..0000000 --- a/old_native_project/ic_launcher-web.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher-web.png-244ffa8897e9eebe71336a23a9033c01.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/ic_launcher-web.png" -dest_files=[ "res://.import/ic_launcher-web.png-244ffa8897e9eebe71336a23a9033c01.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/libs/android-support-v4.jar b/old_native_project/libs/android-support-v4.jar deleted file mode 100755 index 96644ed..0000000 Binary files a/old_native_project/libs/android-support-v4.jar and /dev/null differ diff --git a/old_native_project/libs/javacsv.jar b/old_native_project/libs/javacsv.jar deleted file mode 100755 index ceb59eb..0000000 Binary files a/old_native_project/libs/javacsv.jar and /dev/null differ diff --git a/old_native_project/lint.xml b/old_native_project/lint.xml deleted file mode 100755 index ee0eead..0000000 --- a/old_native_project/lint.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/old_native_project/proguard-project.txt b/old_native_project/proguard-project.txt deleted file mode 100755 index f2fe155..0000000 --- a/old_native_project/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/old_native_project/project.properties b/old_native_project/project.properties deleted file mode 100755 index 4ab1256..0000000 --- a/old_native_project/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 diff --git a/old_native_project/res/drawable-hdpi/ic_launcher.png b/old_native_project/res/drawable-hdpi/ic_launcher.png deleted file mode 100755 index 9ef6cfb..0000000 Binary files a/old_native_project/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/old_native_project/res/drawable-hdpi/ic_launcher.png.import b/old_native_project/res/drawable-hdpi/ic_launcher.png.import deleted file mode 100644 index fb44ccd..0000000 --- a/old_native_project/res/drawable-hdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-7b75c07f16537d4d1276f02b2da8f046.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-hdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-7b75c07f16537d4d1276f02b2da8f046.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/drawable-mdpi/ic_launcher.png b/old_native_project/res/drawable-mdpi/ic_launcher.png deleted file mode 100755 index 330d0a4..0000000 Binary files a/old_native_project/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/old_native_project/res/drawable-mdpi/ic_launcher.png.import b/old_native_project/res/drawable-mdpi/ic_launcher.png.import deleted file mode 100644 index 3e22a92..0000000 --- a/old_native_project/res/drawable-mdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-60911ba4a7bacee1ef18c90549959e99.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-mdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-60911ba4a7bacee1ef18c90549959e99.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/drawable-xhdpi/ic_launcher.png b/old_native_project/res/drawable-xhdpi/ic_launcher.png deleted file mode 100755 index e6341a6..0000000 Binary files a/old_native_project/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/old_native_project/res/drawable-xhdpi/ic_launcher.png.import b/old_native_project/res/drawable-xhdpi/ic_launcher.png.import deleted file mode 100644 index 03ba604..0000000 --- a/old_native_project/res/drawable-xhdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-392be394da50ded53954d6a34405ccd0.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-xhdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-392be394da50ded53954d6a34405ccd0.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/drawable-xxhdpi/ic_launcher.png b/old_native_project/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100755 index 590a40f..0000000 Binary files a/old_native_project/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/old_native_project/res/drawable-xxhdpi/ic_launcher.png.import b/old_native_project/res/drawable-xxhdpi/ic_launcher.png.import deleted file mode 100644 index 562f414..0000000 --- a/old_native_project/res/drawable-xxhdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-d4038f1f519c934c855a1e1587c8d21b.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-xxhdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-d4038f1f519c934c855a1e1587c8d21b.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/layout/activity_main.xml b/old_native_project/res/layout/activity_main.xml deleted file mode 100755 index 6cfef6f..0000000 --- a/old_native_project/res/layout/activity_main.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/old_native_project/res/layout/fragment_file_operations.xml b/old_native_project/res/layout/fragment_file_operations.xml deleted file mode 100755 index 2703afb..0000000 --- a/old_native_project/res/layout/fragment_file_operations.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - -