worked on overall variables and results screen

This commit is contained in:
Jaap Marsman 2022-10-26 20:27:50 +08:00
parent 72749e2ed7
commit 283aba4dd3
4 changed files with 51 additions and 3 deletions

View File

@ -26,6 +26,7 @@ func _on_TwentySecondTimer_timeout():
print("We're completely done - no intervals remain")
# So I should end the observation and move to the Results window.
$"TwentySecondTimer".stop()
$"../Results".visible = true
if global_ints.locked_observations_intervals_remaining > 1:
on_interval_moment()

17
godot/Results.gd Normal file
View File

@ -0,0 +1,17 @@
extends CanvasLayer
func _ready():
pass # Replace with function body.
#func _process(delta):
# pass
func _on_SaveReport_pressed():
pass # Replace with function body.
func _on_BackMainMenu_pressed():
pass # Replace with function body.

View File

@ -4,7 +4,7 @@ extends Node
var timer_duration : int = 4
var observation_minutes : int = 15
var observation_minutes : int = 1
var observed_person_name : String
@ -32,3 +32,11 @@ var three_explanation = "The pupil is distracting other pupils or talking to the
var four_explanation = "The pupil is walking through the class"
var five_explanation = "The pupil is otherwise distracted and not on task"
var six_explanation = "No answer was selected for this round"
var total_behaviours : int
var one_behaviour_score : int
var two_behaviour_score : int
var three_behaviour_score : int
var four_behaviour_score: int
var five_behaviour_score : int
var six_behaviour_score : int

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2]
[gd_scene load_steps=17 format=2]
[ext_resource path="res://wb_theme.tres" type="Theme" id=1]
[ext_resource path="res://main_screen.gd" type="Script" id=2]
@ -8,6 +8,7 @@
[ext_resource path="res://Assets/fonts/NotoSansDisplay-Bold.ttf" type="DynamicFontData" id=6]
[ext_resource path="res://ObservationWindow.gd" type="Script" id=7]
[ext_resource path="res://EditScreen.gd" type="Script" id=8]
[ext_resource path="res://Results.gd" type="Script" id=9]
[sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0.952941, 0.933333, 0.847059, 1 )
@ -34,6 +35,9 @@ bg_color = Color( 1, 1, 1, 1 )
corner_radius_top_left = 50
corner_radius_top_right = 50
[sub_resource type="StyleBoxFlat" id=8]
bg_color = Color( 1, 1, 1, 1 )
[node name="AppWindow" type="CanvasLayer"]
script = ExtResource( 2 )
@ -669,7 +673,6 @@ margin_bottom = 679.0
text = "OK"
[node name="ObservationWindow" type="CanvasLayer" parent="."]
visible = false
script = ExtResource( 7 )
[node name="Panel" type="Panel" parent="ObservationWindow"]
@ -769,11 +772,28 @@ text = "ObservationsTotal"
[node name="Results" type="CanvasLayer" parent="."]
visible = false
script = ExtResource( 9 )
[node name="Panel" type="Panel" parent="Results"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -157.0
theme = ExtResource( 1 )
custom_styles/panel = SubResource( 8 )
[node name="SaveReport" type="Button" parent="Results/Panel"]
margin_left = 1045.0
margin_top = 835.0
margin_right = 1274.0
margin_bottom = 869.0
text = "Save Report as PNG"
[node name="BackMainMenu" type="Button" parent="Results/Panel"]
margin_left = 14.0
margin_top = 828.0
margin_right = 158.0
margin_bottom = 862.0
text = "Restart"
[connection signal="pressed" from="StartScreen/InstructionPanel/MinuteBox/MinuteMinus" to="." method="_on_MinuteMinus_pressed"]
[connection signal="pressed" from="StartScreen/InstructionPanel/MinuteBox/MinutePlus" to="." method="_on_MinutePlus_pressed"]
@ -785,3 +805,5 @@ theme = ExtResource( 1 )
[connection signal="pressed" from="EditScreen/Panel/CancelButton" to="EditScreen" method="_on_CancelButton_pressed"]
[connection signal="pressed" from="EditScreen/Panel/OKButton" to="EditScreen" method="_on_OKButton_pressed"]
[connection signal="timeout" from="ObservationWindow/TwentySecondTimer" to="ObservationWindow" method="_on_TwentySecondTimer_timeout"]
[connection signal="pressed" from="Results/Panel/SaveReport" to="Results" method="_on_SaveReport_pressed"]
[connection signal="pressed" from="Results/Panel/BackMainMenu" to="Results" method="_on_BackMainMenu_pressed"]