diff --git a/godot/Assets/kenney_icons/tile_0051.png b/godot/Assets/kenney_icons/tile_0051.png new file mode 100644 index 0000000..9080177 Binary files /dev/null and b/godot/Assets/kenney_icons/tile_0051.png differ diff --git a/godot/Assets/kenney_icons/tile_0052.png b/godot/Assets/kenney_icons/tile_0052.png new file mode 100644 index 0000000..cb6298b Binary files /dev/null and b/godot/Assets/kenney_icons/tile_0052.png differ diff --git a/godot/Assets/kenney_icons/tile_0053.png b/godot/Assets/kenney_icons/tile_0053.png new file mode 100644 index 0000000..9812e85 Binary files /dev/null and b/godot/Assets/kenney_icons/tile_0053.png differ diff --git a/godot/Assets/kenney_icons/tile_0054.png b/godot/Assets/kenney_icons/tile_0054.png new file mode 100644 index 0000000..6ff7783 Binary files /dev/null and b/godot/Assets/kenney_icons/tile_0054.png differ diff --git a/godot/Assets/kenney_icons/tile_0055.png b/godot/Assets/kenney_icons/tile_0055.png new file mode 100644 index 0000000..ee87662 Binary files /dev/null and b/godot/Assets/kenney_icons/tile_0055.png differ diff --git a/godot/ObservationWindow.gd b/godot/ObservationWindow.gd index 9993949..d16292d 100644 --- a/godot/ObservationWindow.gd +++ b/godot/ObservationWindow.gd @@ -186,3 +186,26 @@ func _on_Button_pressed() -> void: $"%ObservationWindow".hide() $"../Results".show() state_changed_check() + + +func _input(event) -> void: + if event.is_action_pressed("BehaviourOne"): + print("One") + if toggle_observation == true: + _on_BehaviourOne_pressed() + if event.is_action_pressed("BehaviourTwo"): + print("Two") + if toggle_observation == true: + _on_BehaviourTwo_pressed() + if event.is_action_pressed("BehaviourThree"): + print("Three") + if toggle_observation == true: + _on_BehaviourThree_pressed() + if event.is_action_pressed("BehaviourFour"): + print("Four") + if toggle_observation == true: + _on_BehaviourFour_pressed() + if event.is_action_pressed("BehaviourFive"): + print("Five") + if toggle_observation == true: + _on_BehaviourFive_pressed() diff --git a/godot/main_screen.tscn b/godot/main_screen.tscn index 4bd8d37..05b77bc 100644 --- a/godot/main_screen.tscn +++ b/godot/main_screen.tscn @@ -1,14 +1,19 @@ -[gd_scene load_steps=27 format=3 uid="uid://b1pk005at7x26"] +[gd_scene load_steps=32 format=3 uid="uid://b1pk005at7x26"] [ext_resource type="Theme" uid="uid://bki1nuccpiu3o" path="res://wb_theme.tres" id="1"] [ext_resource type="Script" uid="uid://rbmcgn3hetrs" path="res://main_screen.gd" id="2"] [ext_resource type="FontFile" uid="uid://df4eo3bryf8la" path="res://Assets/fonts/noto_sans_display.ttf" id="5"] [ext_resource type="FontFile" uid="uid://darkh8o8rieli" path="res://Assets/fonts/noto_sans_display_bold.ttf" id="6"] [ext_resource type="Script" uid="uid://hff4wu52flpd" path="res://ObservationWindow.gd" id="7"] +[ext_resource type="Texture2D" uid="uid://bodi3735281l4" path="res://Assets/kenney_icons/tile_0051.png" id="7_sqqhh"] [ext_resource type="Script" uid="uid://psov4nxn77wr" path="res://EditScreen.gd" id="8"] +[ext_resource type="Texture2D" uid="uid://doxpjidlik2uj" path="res://Assets/kenney_icons/tile_0052.png" id="8_qx06n"] [ext_resource type="Script" uid="uid://dhhlom5skgqeq" path="res://Results.gd" id="9"] +[ext_resource type="Texture2D" uid="uid://ci8gphiokiks" path="res://Assets/kenney_icons/tile_0053.png" id="9_q556m"] [ext_resource type="Script" uid="uid://dflvmgvxwqrrf" path="res://TimerBar.gd" id="10"] +[ext_resource type="Texture2D" uid="uid://bdyc4eqj77uk6" path="res://Assets/kenney_icons/tile_0054.png" id="10_0dp34"] [ext_resource type="Script" uid="uid://t1pvqg6e78j" path="res://ProgressBar.gd" id="11"] +[ext_resource type="Texture2D" uid="uid://hef804u8xrs" path="res://Assets/kenney_icons/tile_0055.png" id="11_kypv5"] [ext_resource type="Texture2D" uid="uid://yf4ormoh8hes" path="res://Assets/icons/main_icon.png" id="12"] [ext_resource type="Texture2D" uid="uid://bq56uvokwfppt" path="res://Assets/icons/noun-manual-241665.svg" id="12_p3r6q"] [ext_resource type="Texture2D" uid="uid://lafpc8rl5lg0" path="res://Assets/icons/noun-input-field-104354.svg" id="12_vtqql"] @@ -1200,6 +1205,7 @@ unique_name_in_owner = true unique_name_in_owner = true [node name="StartScreen" type="CanvasLayer" parent="."] +visible = false [node name="InstructionPanel" type="Panel" parent="StartScreen"] unique_name_in_owner = true @@ -1479,7 +1485,6 @@ text = "The pupil is otherwise distracted and not on task" [node name="NameChangePanel" type="Panel" parent="StartScreen"] unique_name_in_owner = true -visible = false anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 @@ -1544,6 +1549,20 @@ unique_name_in_owner = true layout_mode = 2 theme = ExtResource("1") +[node name="ObservationType" type="MenuButton" parent="StartScreen/NameChangePanel/NameContainer"] +unique_name_in_owner = true +layout_mode = 2 +text = "Text" +item_count = 4 +popup/item_0/text = "Whole Interval (PI)" +popup/item_0/id = 0 +popup/item_1/text = "Partial Interval (PI)" +popup/item_1/id = 1 +popup/item_2/text = "Momentary Time Sampling (MTS)" +popup/item_2/id = 2 +popup/item_3/text = "Predominant Activity Sampling (PAS)" +popup/item_3/id = 3 + [node name="OkButton" type="Button" parent="StartScreen/NameChangePanel/NameContainer"] layout_mode = 2 theme = ExtResource("1") @@ -1897,6 +1916,44 @@ layout_mode = 2 size_flags_horizontal = 3 text = "Acronym1" +[node name="BehaviourShortcuts" type="HBoxContainer" parent="ObservationWindow/Panel"] +layout_mode = 0 +offset_left = 240.0 +offset_top = 295.0 +offset_right = 1146.0 +offset_bottom = 335.0 +theme_override_constants/separation = 165 + +[node name="KeyOne" type="TextureButton" parent="ObservationWindow/Panel/BehaviourShortcuts"] +layout_mode = 2 +disabled = true +texture_normal = ExtResource("7_sqqhh") +stretch_mode = 5 + +[node name="KeyTwo" type="TextureButton" parent="ObservationWindow/Panel/BehaviourShortcuts"] +layout_mode = 2 +disabled = true +texture_normal = ExtResource("8_qx06n") +stretch_mode = 5 + +[node name="KeyThree" type="TextureButton" parent="ObservationWindow/Panel/BehaviourShortcuts"] +layout_mode = 2 +disabled = true +texture_normal = ExtResource("9_q556m") +stretch_mode = 5 + +[node name="KeyFour" type="TextureButton" parent="ObservationWindow/Panel/BehaviourShortcuts"] +layout_mode = 2 +disabled = true +texture_normal = ExtResource("10_0dp34") +stretch_mode = 5 + +[node name="KeyFive" type="TextureButton" parent="ObservationWindow/Panel/BehaviourShortcuts"] +layout_mode = 2 +disabled = true +texture_normal = ExtResource("11_kypv5") +stretch_mode = 5 + [node name="BehaviourTitles" type="HBoxContainer" parent="ObservationWindow/Panel"] layout_mode = 0 offset_left = 240.0 diff --git a/godot/project.godot b/godot/project.godot index 2a91b57..0122a63 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -43,6 +43,34 @@ import/fbx/enabled=false common/drop_mouse_on_gui_input_disabled=true +[input] + +BehaviourOne={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"location":0,"echo":false,"script":null) +] +} +BehaviourTwo={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"location":0,"echo":false,"script":null) +] +} +BehaviourThree={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":51,"location":0,"echo":false,"script":null) +] +} +BehaviourFour={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":52,"key_label":0,"unicode":52,"location":0,"echo":false,"script":null) +] +} +BehaviourFive={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":53,"key_label":0,"unicode":53,"location":0,"echo":false,"script":null) +] +} + [internationalization] locale/translations=PackedStringArray("res://translation.en.translation", "res://translation.nl.translation")