aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2021-12-06 01:39:16 +0000
committerdam <dam@gudinoff>2021-12-06 01:39:16 +0000
commit7d9370011834f736d17ebf167701735185f2453a (patch)
tree3d4b581b0c90746d192382555b1b3349c1d8b7a4
parentab3e8de3e1d107d42ba62571ea7d17e741203123 (diff)
downloadsurgery-log-7d9370011834f736d17ebf167701735185f2453a.tar.zst
surgery-log-7d9370011834f736d17ebf167701735185f2453a.zip
Adjust UI to match mockups (WIP).
-rw-r--r--date_picker/value_picker.gd2
-rw-r--r--fonts/B612Mono-Bold.ttfbin0 -> 135908 bytes
-rw-r--r--fonts/B612Mono-BoldItalic.ttfbin0 -> 121736 bytes
-rw-r--r--fonts/B612Mono-Italic.ttfbin0 -> 118892 bytes
-rw-r--r--fonts/B612Mono-Regular.ttfbin0 -> 136716 bytes
-rw-r--r--fonts/font_regular.tres7
-rw-r--r--licenses/font_b612.txt93
-rw-r--r--licenses/godot.txt20
-rw-r--r--licenses/licenses.gd23
-rw-r--r--main.tscn159
-rw-r--r--theme_white.tres6
11 files changed, 242 insertions, 68 deletions
diff --git a/date_picker/value_picker.gd b/date_picker/value_picker.gd
index 98c9755..d25a143 100644
--- a/date_picker/value_picker.gd
+++ b/date_picker/value_picker.gd
@@ -120,7 +120,7 @@ func input_focus_entered():
func input_focus_exited():
if input.text.is_valid_integer():
- value = int(input.text)
+ value = wrapi(int(input.text), min_value, max_value)
input.visible = false
diff --git a/fonts/B612Mono-Bold.ttf b/fonts/B612Mono-Bold.ttf
new file mode 100644
index 0000000..5e7df80
--- /dev/null
+++ b/fonts/B612Mono-Bold.ttf
Binary files differ
diff --git a/fonts/B612Mono-BoldItalic.ttf b/fonts/B612Mono-BoldItalic.ttf
new file mode 100644
index 0000000..8a6cd6c
--- /dev/null
+++ b/fonts/B612Mono-BoldItalic.ttf
Binary files differ
diff --git a/fonts/B612Mono-Italic.ttf b/fonts/B612Mono-Italic.ttf
new file mode 100644
index 0000000..84bbffc
--- /dev/null
+++ b/fonts/B612Mono-Italic.ttf
Binary files differ
diff --git a/fonts/B612Mono-Regular.ttf b/fonts/B612Mono-Regular.ttf
new file mode 100644
index 0000000..ec09c98
--- /dev/null
+++ b/fonts/B612Mono-Regular.ttf
Binary files differ
diff --git a/fonts/font_regular.tres b/fonts/font_regular.tres
new file mode 100644
index 0000000..714269f
--- /dev/null
+++ b/fonts/font_regular.tres
@@ -0,0 +1,7 @@
+[gd_resource type="DynamicFont" load_steps=2 format=2]
+
+[ext_resource path="res://fonts/B612Mono-Regular.ttf" type="DynamicFontData" id=1]
+
+[resource]
+use_filter = true
+font_data = ExtResource( 1 )
diff --git a/licenses/font_b612.txt b/licenses/font_b612.txt
new file mode 100644
index 0000000..2826948
--- /dev/null
+++ b/licenses/font_b612.txt
@@ -0,0 +1,93 @@
+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/licenses/godot.txt b/licenses/godot.txt
new file mode 100644
index 0000000..bee83fb
--- /dev/null
+++ b/licenses/godot.txt
@@ -0,0 +1,20 @@
+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/licenses/licenses.gd b/licenses/licenses.gd
new file mode 100644
index 0000000..87a8d47
--- /dev/null
+++ b/licenses/licenses.gd
@@ -0,0 +1,23 @@
+extends Node
+
+const font_b612: String = "res://licenses/font_b612.txt"
+const godot: String = "res://licenses/godot.txt"
+
+# @DAM For now, it just keeping track of licenses and storing a sample code of how to read the files.
+
+func _ready():
+# load_file(file)
+ pass
+
+func load_file(file: String):
+ var f = File.new()
+ f.open(file, File.READ)
+ var index = 1
+ while not f.eof_reached(): # iterate through all lines until the end of file is reached
+ var line = f.get_line()
+ line += " "
+ print(line + str(index))
+
+ index += 1
+ f.close()
+ return
diff --git a/main.tscn b/main.tscn
index 3ce2d4f..c2cf66a 100644
--- a/main.tscn
+++ b/main.tscn
@@ -1,22 +1,27 @@
-[gd_scene load_steps=3 format=2]
+[gd_scene load_steps=4 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://theme_white.tres" type="Theme" id=3]
-[node name="main" type="Node"]
+[node name="main" type="Control"]
+anchor_right = 1.0
+anchor_bottom = 1.0
+theme = ExtResource( 3 )
[node name="TabContainer" type="TabContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
+tab_align = 0
__meta__ = {
"_edit_use_anchors_": false
}
-[node name="ScrollContainer" type="ScrollContainer" parent="TabContainer"]
+[node name="novo" type="ScrollContainer" parent="TabContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
-margin_top = 32.0
+margin_top = 38.0
margin_right = -4.0
margin_bottom = -4.0
scroll_horizontal_enabled = false
@@ -24,117 +29,136 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/ScrollContainer"]
+[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/novo"]
margin_right = 720.0
-margin_bottom = 548.0
+margin_bottom = 822.0
rect_min_size = Vector2( 720, 0 )
rect_clip_content = true
script = ExtResource( 1 )
-[node name="process_number" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
+[node name="process_number" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
margin_right = 720.0
-margin_bottom = 24.0
+margin_bottom = 30.0
placeholder_text = "Nº Processo"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="surgery_number" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 28.0
+[node name="surgery_number" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 34.0
margin_right = 720.0
-margin_bottom = 52.0
+margin_bottom = 64.0
placeholder_text = "Nº Cirurgia"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="place" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 56.0
+[node name="date_picker" parent="TabContainer/novo/VBoxContainer" instance=ExtResource( 2 )]
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 68.0
margin_right = 720.0
-margin_bottom = 80.0
+margin_bottom = 268.0
+rect_min_size = Vector2( 400, 200 )
+
+[node name="place" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 272.0
+margin_right = 720.0
+margin_bottom = 302.0
placeholder_text = "Local"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="anesthesia" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 84.0
+[node name="anesthesia" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 306.0
margin_right = 720.0
-margin_bottom = 108.0
+margin_bottom = 336.0
placeholder_text = "Anesthesics"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="first_aider" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 112.0
+[node name="first_aider" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 340.0
margin_right = 720.0
-margin_bottom = 136.0
+margin_bottom = 370.0
placeholder_text = "1º Ajudante"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="type" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 140.0
+[node name="type" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 374.0
margin_right = 720.0
-margin_bottom = 164.0
+margin_bottom = 404.0
placeholder_text = "Tipo"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="sub_type" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 168.0
+[node name="sub_type" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 408.0
margin_right = 720.0
-margin_bottom = 192.0
+margin_bottom = 438.0
placeholder_text = "Subtipo"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="sub_sub_type" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 196.0
+[node name="sub_sub_type" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 442.0
margin_right = 720.0
-margin_bottom = 220.0
+margin_bottom = 472.0
placeholder_text = "Sub-Subtipo"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="pathology" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 224.0
+[node name="pathology" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 476.0
margin_right = 720.0
-margin_bottom = 248.0
+margin_bottom = 506.0
placeholder_text = "Patologia"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="intervention" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 252.0
+[node name="intervention" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 510.0
margin_right = 720.0
-margin_bottom = 276.0
+margin_bottom = 540.0
placeholder_text = "Intervenção"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="urgency" type="CheckBox" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 280.0
+[node name="urgency" type="CheckBox" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 544.0
margin_right = 720.0
-margin_bottom = 304.0
+margin_bottom = 572.0
text = "Urgência"
-[node name="notes" type="LineEdit" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 308.0
+[node name="notes" type="LineEdit" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 576.0
margin_right = 720.0
-margin_bottom = 332.0
+margin_bottom = 606.0
placeholder_text = "Notas"
caret_blink = true
+caret_blink_speed = 0.5
-[node name="output" type="RichTextLabel" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 336.0
+[node name="output" type="RichTextLabel" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 610.0
margin_right = 720.0
-margin_bottom = 386.0
+margin_bottom = 660.0
rect_min_size = Vector2( 0, 50 )
__meta__ = {
"_edit_use_anchors_": false
}
-[node name="timer" type="RichTextLabel" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 390.0
+[node name="timer" type="RichTextLabel" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 664.0
margin_right = 720.0
-margin_bottom = 440.0
+margin_bottom = 714.0
rect_min_size = Vector2( 0, 50 )
__meta__ = {
"_edit_use_anchors_": false
}
-[node name="button" type="Button" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 444.0
+[node name="button" type="Button" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 718.0
margin_right = 720.0
-margin_bottom = 494.0
+margin_bottom = 768.0
grow_horizontal = 2
grow_vertical = 2
rect_min_size = Vector2( 0, 50 )
@@ -143,31 +167,32 @@ __meta__ = {
"_edit_use_anchors_": false
}
-[node name="log" type="RichTextLabel" parent="TabContainer/ScrollContainer/VBoxContainer"]
-margin_top = 498.0
+[node name="log" type="RichTextLabel" parent="TabContainer/novo/VBoxContainer"]
+margin_top = 772.0
margin_right = 720.0
-margin_bottom = 548.0
+margin_bottom = 822.0
rect_min_size = Vector2( 0, 50 )
__meta__ = {
"_edit_use_anchors_": false
}
-[node name="ScrollContainer2" type="ScrollContainer" parent="TabContainer"]
+[node name="historico" type="ScrollContainer" parent="TabContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
-margin_left = 4.0
-margin_top = 32.0
-margin_right = -4.0
-margin_bottom = -4.0
+margin_right = -8.0
+margin_bottom = -42.0
-[node name="VBoxContainer" type="VBoxContainer" parent="TabContainer/ScrollContainer2"]
-margin_right = 400.0
-margin_bottom = 200.0
+[node name="ItemList" type="ItemList" parent="TabContainer/historico"]
+visible = false
-[node name="date_picker" parent="TabContainer/ScrollContainer2/VBoxContainer" instance=ExtResource( 2 )]
-anchor_right = 0.0
-anchor_bottom = 0.0
-margin_right = 400.0
-margin_bottom = 200.0
-rect_min_size = Vector2( 400, 200 )
+[node name="MenuButton" type="MenuButton" parent="."]
+anchor_left = 1.0
+anchor_right = 1.0
+margin_left = -32.0
+margin_bottom = 26.0
+text = "#"
+items = [ "Importar filtros", null, 0, false, false, 0, 0, null, "", false, "Exportar filtros", null, 0, false, false, 1, 0, null, "", false, "Apagar filtros", null, 0, false, false, 2, 0, null, "", false, "Sobre", null, 0, false, false, 3, 0, null, "", false ]
+__meta__ = {
+"_edit_use_anchors_": false
+}
diff --git a/theme_white.tres b/theme_white.tres
new file mode 100644
index 0000000..832b226
--- /dev/null
+++ b/theme_white.tres
@@ -0,0 +1,6 @@
+[gd_resource type="Theme" load_steps=2 format=2]
+
+[ext_resource path="res://fonts/font_regular.tres" type="DynamicFont" id=1]
+
+[resource]
+default_font = ExtResource( 1 )