From 527b90b51eb9e796039f4dd767d0f67653d3299d Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Thu, 18 Nov 2021 01:56:35 +0200 Subject: [PATCH] Added user input --- project.godot | 40 +- .../assets/scripts/server_handlers/global.gd | 6 +- .../shooting/Parabola/Parabolic_Barrel.gd | 14 +- .../scripts/shooting/Sine/Sine_Barrel.gd | 10 +- .../Trajectories}/Trajectory_Control.gd | 14 +- .../shooting/Trajectories}/trajectories.gd | 61 +- .../buttons/SpinBox/spinbox_up_active.svg | 11 + .../buttons/SpinBox/spinbox_up_inactive.svg | 11 + .../GUI/in_game/buttons/SpinBox/updown.svg | 111 ++++ .../sprites/GUI/logo_design/FB-GEO-GAME.svg | 79 +++ .../FUNCit_game_logo_dark_transparent.svg | 163 +++++- source/entities/menu_player/player_node.tscn | 2 +- source/entities/player/player_node.tscn | 85 ++- source/fonts/oxygen/oxygen_bold_formula.tres | 9 + source/scenes/GUI/main_menu.tscn | 3 +- source/scenes/GUI/singleplayer_setup.tscn | 18 +- .../OVERLAY/elements/trajectory_control.tscn | 2 +- .../scenes/OVERLAY/elements/user_input.tscn | 527 ++++++++++-------- 18 files changed, 787 insertions(+), 379 deletions(-) rename source/{scenes/OVERLAY/elements => assets/scripts/shooting/Trajectories}/Trajectory_Control.gd (84%) rename source/{scenes/OVERLAY/elements => assets/scripts/shooting/Trajectories}/trajectories.gd (54%) create mode 100644 source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_active.svg create mode 100644 source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_inactive.svg create mode 100644 source/assets/sprites/GUI/in_game/buttons/SpinBox/updown.svg create mode 100644 source/assets/sprites/GUI/logo_design/FB-GEO-GAME.svg create mode 100644 source/fonts/oxygen/oxygen_bold_formula.tres diff --git a/project.godot b/project.godot index 4d4c3db..d7b7d0b 100644 --- a/project.godot +++ b/project.godot @@ -38,42 +38,42 @@ fps=false input_right={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) ] } input_left={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) ] } input_up={ "deadzone": 0.49, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) ] } input_down={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) ] } input_debug={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":96,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":96,"unicode":0,"echo":false,"script":null) ] } input_enter={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null) ] } input_shift={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"unicode":0,"echo":false,"script":null) ] } input_shoot={ @@ -83,42 +83,42 @@ input_shoot={ } esc={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null) ] } rotation_increase={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null) ] } rotation_decrease={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null) ] } line={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777351,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777351,"unicode":0,"echo":false,"script":null) ] } sine={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777352,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777352,"unicode":0,"echo":false,"script":null) ] } hyper={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777353,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777353,"unicode":0,"echo":false,"script":null) ] } parab={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777354,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777354,"unicode":0,"echo":false,"script":null) ] } fullscreen_toggle={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777254,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777254,"unicode":0,"echo":false,"script":null) ] } diff --git a/source/assets/scripts/server_handlers/global.gd b/source/assets/scripts/server_handlers/global.gd index a417131..53847d5 100644 --- a/source/assets/scripts/server_handlers/global.gd +++ b/source/assets/scripts/server_handlers/global.gd @@ -61,18 +61,16 @@ func phase_update_global(): pass -func start_game(value): +func start_game(value) -> void: gameStart = value - pass func get_current_phase(): return clientPhase -func set_current_phase(phase): +func set_current_phase(phase) -> void: clientPhase = phase - pass func instance_node_at_location(node: Object, parent: Object, location: Vector2) -> Object: diff --git a/source/assets/scripts/shooting/Parabola/Parabolic_Barrel.gd b/source/assets/scripts/shooting/Parabola/Parabolic_Barrel.gd index 20f1121..2edff59 100644 --- a/source/assets/scripts/shooting/Parabola/Parabolic_Barrel.gd +++ b/source/assets/scripts/shooting/Parabola/Parabolic_Barrel.gd @@ -15,20 +15,20 @@ func _ready(): pos = Global.get("player").get_node('weaponHolder/Player-character-theme-gun').position -func trajectory(): +func trajectory(delta): while dot_position.x < 1000: if pos.x > 0: add_point(dot_position) velocity.y = time*(a_parameter * time + b_parameter) velocity.x = 5 - dot_position += velocity * speed_parab * 0.06944 - time += 0.06944 + dot_position += velocity * speed_parab * delta + time += delta if pos.x < 0: add_point(dot_position) velocity.y = -time*(a_parameter * time + b_parameter) velocity.x = 5 - dot_position += velocity * speed_parab * 0.06944 - time += 0.06944 + dot_position += velocity * speed_parab * delta + time += delta func is_flipped(): @@ -38,10 +38,10 @@ func is_flipped(): if pos_diff[1].x/pos_diff[0].x < 0: return true -func _process(_delta): +func _process(delta): #if is_flipped(): #clear_points() - trajectory() + trajectory(delta) update() diff --git a/source/assets/scripts/shooting/Sine/Sine_Barrel.gd b/source/assets/scripts/shooting/Sine/Sine_Barrel.gd index 58c7de8..e30c6ea 100644 --- a/source/assets/scripts/shooting/Sine/Sine_Barrel.gd +++ b/source/assets/scripts/shooting/Sine/Sine_Barrel.gd @@ -18,14 +18,14 @@ var frequency = Global.get('user_input').freq # draw_circle(dot_position, 2, Color(225, 225, 225)) # time += 0.06944 -func trajectory(): +func trajectory(delta): while dot_position.x < 1000: add_point(dot_position) velocity.y = amplitude * cos(time * frequency) velocity.x = 5 - dot_position += velocity * speed * 0.06944 - time += 0.06944 + dot_position += velocity * speed * delta + time += delta -func _process(_delta): - trajectory() +func _process(delta): + trajectory(delta) update() diff --git a/source/scenes/OVERLAY/elements/Trajectory_Control.gd b/source/assets/scripts/shooting/Trajectories/Trajectory_Control.gd similarity index 84% rename from source/scenes/OVERLAY/elements/Trajectory_Control.gd rename to source/assets/scripts/shooting/Trajectories/Trajectory_Control.gd index be75fba..62d19d3 100644 --- a/source/scenes/OVERLAY/elements/Trajectory_Control.gd +++ b/source/assets/scripts/shooting/Trajectories/Trajectory_Control.gd @@ -3,44 +3,40 @@ extends Control func _ready(): Global.set('control', self) - -func _on_line_pressed(): +func _on_line_pressed() -> void: Global.get('user_input').get_node('line').visible = true Global.get('user_input').get_node('parabol').visible = false Global.get('user_input').get_node('hyperbol').visible = false Global.get('user_input').get_node('sin').visible = false Global.get('player').enable_trajectory_line('line') Global.get('player').trajectory = 'line' - pass # Replace with function body. -func _on_parabol_pressed(): +func _on_parabol_pressed() -> void: Global.get('user_input').get_node('parabol').visible = true Global.get('user_input').get_node('line').visible = false Global.get('user_input').get_node('hyperbol').visible = false Global.get('user_input').get_node('sin').visible = false Global.get('player').enable_trajectory_line('parab') Global.get('player').trajectory = 'parab' - pass # Replace with function body. -func _on_hyperbol_pressed(): +func _on_hyperbol_pressed() -> void: Global.get('user_input').get_node('hyperbol').visible = true Global.get('user_input').get_node('sin').visible = false Global.get('user_input').get_node('line').visible = false Global.get('user_input').get_node('parabol').visible = false Global.get('player').enable_trajectory_line('hyper') Global.get('player').trajectory = 'hyper' - pass # Replace with function body. -func _on_sine_pressed(): +func _on_sine_pressed() -> void: Global.get('user_input').get_node('sin').visible = true Global.get('user_input').get_node('line').visible = false Global.get('user_input').get_node('hyperbol').visible = false Global.get('user_input').get_node('parabol').visible = false Global.get('player').enable_trajectory_line('sine') Global.get('player').trajectory = 'sine' - pass # Replace with function body. + diff --git a/source/scenes/OVERLAY/elements/trajectories.gd b/source/assets/scripts/shooting/Trajectories/trajectories.gd similarity index 54% rename from source/scenes/OVERLAY/elements/trajectories.gd rename to source/assets/scripts/shooting/Trajectories/trajectories.gd index f8b4f42..07a00f7 100644 --- a/source/scenes/OVERLAY/elements/trajectories.gd +++ b/source/assets/scripts/shooting/Trajectories/trajectories.gd @@ -14,57 +14,62 @@ var amp = 5 # Called when the node enters the scene tree for the first time. func _ready(): Global.set('user_input', self) - pass # Replace with function body. - - -func _on_LineEdit_text_entered(new_text): - a_param_line = int(new_text) +func _on_line_SpinBox_value_changed(value): + a_param_line = value Global.get('player').enable_trajectory_line('line') Global.get('player').trajectory = 'line' - pass # Replace with function body. -func _on_a_param_LineEdit_text_entered(new_text): - a_param_parab = int(new_text) +func _on_a_param_SpinBox_value_changed(value): + a_param_parab = value Global.get('player').enable_trajectory_line('parab') Global.get('player').trajectory = 'parab' - pass # Replace with function body. -func _on_b_param_LineEdit_text_entered(new_text): - b_param_parab = int(new_text) +func _on_b_param_SpinBox_value_changed(value): + b_param_parab = value Global.get('player').enable_trajectory_line('parab') Global.get('player').trajectory = 'parab' - pass # Replace with function body. -func _on_a_param_h_LineEdit_text_entered(new_text): - a_param_hyper = int(new_text) - Global.get('player').enable_trajectory_line('hyper') - Global.get('player').trajectory = 'hyper' - pass # Replace with function body. - - -func _on_b_param_h_LineEdit_text_entered(new_text): - b_param_hyper = int(new_text) +func _on_b_param_h_SpinBox_value_changed(value): + b_param_hyper = value if b_param_hyper != 0: Global.get('player').enable_trajectory_line('hyper') Global.get('player').trajectory = 'hyper' - pass # Replace with function body. -func _on_amp_text_entered(new_text): - amp = int(new_text) +func _on_a_param_h_SpinBox_value_changed(value): + a_param_hyper = value + Global.get('player').enable_trajectory_line('hyper') + Global.get('player').trajectory = 'hyper' + + +func _on_amp_SpinBox_value_changed(value): + amp = value Global.get('player').enable_trajectory_line('sine') Global.get('player').trajectory = 'sine' - pass # Replace with function body. -func _on_freq_text_entered(new_text): - freq = int(new_text) +func _on_freq_SpinBox_value_changed(value): + freq = value Global.get('player').enable_trajectory_line('sine') Global.get('player').trajectory = 'sine' - pass # Replace with function body. + + + + + + + + + + + + + + + diff --git a/source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_active.svg b/source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_active.svg new file mode 100644 index 0000000..ac633e1 --- /dev/null +++ b/source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_active.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_inactive.svg b/source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_inactive.svg new file mode 100644 index 0000000..eb29692 --- /dev/null +++ b/source/assets/sprites/GUI/in_game/buttons/SpinBox/spinbox_up_inactive.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/source/assets/sprites/GUI/in_game/buttons/SpinBox/updown.svg b/source/assets/sprites/GUI/in_game/buttons/SpinBox/updown.svg new file mode 100644 index 0000000..c37b6cf --- /dev/null +++ b/source/assets/sprites/GUI/in_game/buttons/SpinBox/updown.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/assets/sprites/GUI/logo_design/FB-GEO-GAME.svg b/source/assets/sprites/GUI/logo_design/FB-GEO-GAME.svg new file mode 100644 index 0000000..85ea3a0 --- /dev/null +++ b/source/assets/sprites/GUI/logo_design/FB-GEO-GAME.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + diff --git a/source/assets/sprites/GUI/logo_design/FUNCit_game_logo_dark_transparent.svg b/source/assets/sprites/GUI/logo_design/FUNCit_game_logo_dark_transparent.svg index d638a97..ccb2edf 100644 --- a/source/assets/sprites/GUI/logo_design/FUNCit_game_logo_dark_transparent.svg +++ b/source/assets/sprites/GUI/logo_design/FUNCit_game_logo_dark_transparent.svg @@ -1,35 +1,154 @@ - - - - + + + + + + - - + + - - + + - - - FUNCit - - - + + + FUNCit + + + - - + + - - - + + + - - + + - Prototype + Prototype diff --git a/source/entities/menu_player/player_node.tscn b/source/entities/menu_player/player_node.tscn index 36cb598..e83af56 100644 --- a/source/entities/menu_player/player_node.tscn +++ b/source/entities/menu_player/player_node.tscn @@ -5,7 +5,7 @@ [sub_resource type="CircleShape2D" id=1] radius = 76.0267 -[node name="player" type="KinematicBody2D"] +[node name="player2" type="KinematicBody2D"] [node name="player_collider" type="CollisionShape2D" parent="."] shape = SubResource( 1 ) diff --git a/source/entities/player/player_node.tscn b/source/entities/player/player_node.tscn index a5dd498..12463d3 100644 --- a/source/entities/player/player_node.tscn +++ b/source/entities/player/player_node.tscn @@ -171,9 +171,24 @@ [sub_resource type="SpriteFrames" id=1] animations = [ { -"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ], +"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ], "loop": true, -"name": "move-speed-left-01", +"name": "idle-speed-left-04", +"speed": 25.0 +}, { +"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ], +"loop": true, +"name": "idle-speed-right-02", +"speed": 25.0 +}, { +"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ], +"loop": true, +"name": "move-speed-right-02", +"speed": 35.0 +}, { +"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ], +"loop": true, +"name": "move-speed-left-03", "speed": 35.0 }, { "frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ], @@ -181,21 +196,6 @@ animations = [ { "name": "boost-speed-right-01", "speed": 50.0 }, { -"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ], -"loop": true, -"name": "move-speed-right-01", -"speed": 35.0 -}, { -"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ], -"loop": true, -"name": "move-speed-right-03", -"speed": 35.0 -}, { -"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ], -"loop": true, -"name": "boost-speed-left-01", -"speed": 50.0 -}, { "frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ], "loop": true, "name": "idle-speed-right-04", @@ -206,25 +206,35 @@ animations = [ { "name": "boost-speed-right-04", "speed": 50.0 }, { -"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ], +"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ], "loop": true, -"name": "idle-speed-right-02", -"speed": 25.0 +"name": "move-speed-left-02", +"speed": 35.0 }, { "frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ], "loop": true, -"name": "move-speed-right-02", +"name": "boost-speed-right-02", +"speed": 50.0 +}, { +"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ], +"loop": true, +"name": "move-speed-right-03", "speed": 35.0 }, { -"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ], +"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ], "loop": true, -"name": "move-speed-left-04", +"name": "boost-speed-left-01", +"speed": 50.0 +}, { +"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ], +"loop": true, +"name": "move-speed-left-01", "speed": 35.0 }, { -"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ], +"frames": [ ExtResource( 5 ), ExtResource( 42 ), ExtResource( 35 ), ExtResource( 24 ), ExtResource( 8 ), ExtResource( 31 ), ExtResource( 30 ), ExtResource( 38 ), ExtResource( 10 ), ExtResource( 43 ), ExtResource( 41 ), ExtResource( 33 ), ExtResource( 44 ), ExtResource( 19 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 36 ), ExtResource( 12 ), ExtResource( 45 ), ExtResource( 21 ) ], "loop": true, -"name": "idle-speed-left-04", -"speed": 25.0 +"name": "move-speed-right-01", +"speed": 35.0 }, { "frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ], "loop": true, @@ -236,19 +246,9 @@ animations = [ { "name": "boost-speed-left-03", "speed": 50.0 }, { -"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ], +"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ], "loop": true, -"name": "move-speed-left-02", -"speed": 35.0 -}, { -"frames": [ ExtResource( 167 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 126 ), ExtResource( 90 ), ExtResource( 89 ), ExtResource( 97 ), ExtResource( 88 ), ExtResource( 98 ), ExtResource( 91 ), ExtResource( 125 ), ExtResource( 105 ), ExtResource( 82 ), ExtResource( 84 ), ExtResource( 92 ), ExtResource( 103 ), ExtResource( 122 ), ExtResource( 130 ), ExtResource( 104 ), ExtResource( 116 ) ], -"loop": true, -"name": "boost-speed-right-02", -"speed": 50.0 -}, { -"frames": [ ExtResource( 70 ), ExtResource( 49 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 28 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 55 ), ExtResource( 150 ), ExtResource( 156 ), ExtResource( 138 ), ExtResource( 161 ), ExtResource( 145 ), ExtResource( 148 ), ExtResource( 147 ), ExtResource( 133 ), ExtResource( 164 ), ExtResource( 134 ), ExtResource( 152 ), ExtResource( 160 ) ], -"loop": true, -"name": "move-speed-left-03", +"name": "move-speed-left-04", "speed": 35.0 } ] @@ -284,7 +284,7 @@ radius = 41.5403 animations = [ { "frames": [ ExtResource( 170 ) ], "loop": true, -"name": "03", +"name": "02", "speed": 5.0 }, { "frames": [ ExtResource( 169 ) ], @@ -299,7 +299,7 @@ animations = [ { }, { "frames": [ ExtResource( 170 ) ], "loop": true, -"name": "02", +"name": "03", "speed": 5.0 } ] @@ -317,7 +317,6 @@ z_index = 1 frames = SubResource( 1 ) [node name="player_sprite" type="Sprite" parent="."] -visible = false scale = Vector2( 0.25, 0.25 ) z_index = 1 texture = ExtResource( 1 ) @@ -358,13 +357,13 @@ texture = ExtResource( 26 ) shape = SubResource( 5 ) [node name="Player-character-theme-gun-na3" type="Sprite" parent="weaponHolder"] -scale = Vector2( 0.3, 0.25 ) +scale = Vector2( 0.25, 0.25 ) texture = ExtResource( 171 ) [node name="Player-character-theme-gun" type="AnimatedSprite" parent="weaponHolder"] scale = Vector2( 0.25, 0.25 ) frames = SubResource( 6 ) -animation = "04" +animation = "01" [node name="shoot_point" type="Position2D" parent="weaponHolder/Player-character-theme-gun"] position = Vector2( -120, 0 ) diff --git a/source/fonts/oxygen/oxygen_bold_formula.tres b/source/fonts/oxygen/oxygen_bold_formula.tres new file mode 100644 index 0000000..6d0f1aa --- /dev/null +++ b/source/fonts/oxygen/oxygen_bold_formula.tres @@ -0,0 +1,9 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://source/fonts/oxygen/Oxygen-Bold.ttf" type="DynamicFontData" id=1] + +[resource] +size = 26 +use_mipmaps = true +use_filter = true +font_data = ExtResource( 1 ) diff --git a/source/scenes/GUI/main_menu.tscn b/source/scenes/GUI/main_menu.tscn index 308c53f..a23039a 100644 --- a/source/scenes/GUI/main_menu.tscn +++ b/source/scenes/GUI/main_menu.tscn @@ -56,9 +56,10 @@ margin_right = 150.0 margin_bottom = 36.0 custom_fonts/font = ExtResource( 5 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -text = "PLAY" +text = "playground" align = 1 valign = 1 +uppercase = true __meta__ = { "_edit_lock_": true, "_edit_use_anchors_": false diff --git a/source/scenes/GUI/singleplayer_setup.tscn b/source/scenes/GUI/singleplayer_setup.tscn index b06b1f2..2d87060 100644 --- a/source/scenes/GUI/singleplayer_setup.tscn +++ b/source/scenes/GUI/singleplayer_setup.tscn @@ -12,23 +12,23 @@ use_mipmaps = true use_filter = true font_data = ExtResource( 2 ) +[sub_resource type="StyleBoxEmpty" id=2] + +[sub_resource type="StyleBoxEmpty" id=3] + [sub_resource type="DynamicFont" id=4] size = 36 use_mipmaps = true use_filter = true font_data = ExtResource( 2 ) -[sub_resource type="StyleBoxEmpty" id=2] - -[sub_resource type="StyleBoxEmpty" id=3] - [sub_resource type="DynamicFont" id=5] size = 36 use_mipmaps = true use_filter = true font_data = ExtResource( 2 ) -[node name="network_setup2" type="Control"] +[node name="singleplayer_setup" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 script = ExtResource( 1 ) @@ -61,8 +61,8 @@ margin_left = -225.0 margin_top = -25.0 margin_right = -225.0 margin_bottom = -25.0 -custom_colors/font_color = Color( 0, 0, 0, 1 ) custom_fonts/font = SubResource( 1 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Enter your username" align = 1 valign = 1 @@ -93,10 +93,10 @@ margin_left = -175.0 margin_top = -28.0 margin_right = 175.0 margin_bottom = 28.0 -custom_colors/selection_color = Color( 0.8, 0.8, 0.8, 1 ) -custom_fonts/font = SubResource( 4 ) custom_styles/focus = SubResource( 2 ) custom_styles/normal = SubResource( 3 ) +custom_fonts/font = SubResource( 4 ) +custom_colors/selection_color = Color( 0.8, 0.8, 0.8, 1 ) align = 1 placeholder_text = "username" __meta__ = { @@ -117,8 +117,8 @@ margin_bottom = 97.0 [node name="Label" type="Label" parent="popup_screen/panel/confirm"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_colors/font_color = Color( 0, 0, 0, 1 ) custom_fonts/font = SubResource( 5 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "CONFIRM" align = 1 valign = 1 diff --git a/source/scenes/OVERLAY/elements/trajectory_control.tscn b/source/scenes/OVERLAY/elements/trajectory_control.tscn index 0d11933..79cae9f 100644 --- a/source/scenes/OVERLAY/elements/trajectory_control.tscn +++ b/source/scenes/OVERLAY/elements/trajectory_control.tscn @@ -10,7 +10,7 @@ [ext_resource path="res://source/assets/sprites/GUI/in_game/trajectories/hyperbol_inactive.svg" type="Texture" id=8] [ext_resource path="res://source/assets/sprites/GUI/in_game/trajectories/hyperbol_active.svg" type="Texture" id=9] [ext_resource path="res://source/fonts/oxygen/Oxygen-Regular.ttf" type="DynamicFontData" id=10] -[ext_resource path="res://source/scenes/OVERLAY/elements/Trajectory_Control.gd" type="Script" id=11] +[ext_resource path="res://source/assets/scripts/shooting/Trajectories/Trajectory_Control.gd" type="Script" id=11] [sub_resource type="StyleBoxTexture" id=1] texture = ExtResource( 1 ) diff --git a/source/scenes/OVERLAY/elements/user_input.tscn b/source/scenes/OVERLAY/elements/user_input.tscn index e21bd46..c5985f6 100644 --- a/source/scenes/OVERLAY/elements/user_input.tscn +++ b/source/scenes/OVERLAY/elements/user_input.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=26 format=2] +[gd_scene load_steps=30 format=2] [ext_resource path="res://source/assets/sprites/GUI/in_game/user_input/background_panel.svg" type="Texture" id=1] [ext_resource path="res://source/fonts/oxygen/Oxygen-Regular.ttf" type="DynamicFontData" id=2] @@ -12,25 +12,17 @@ [ext_resource path="res://source/assets/sprites/GUI/in_game/user_input/ready_button/ready_button_pressed.svg" type="Texture" id=10] [ext_resource path="res://source/assets/sprites/GUI/in_game/user_input/ready_button/ready_button_hover.svg" type="Texture" id=11] [ext_resource path="res://source/assets/sprites/GUI/in_game/user_input/skip_button/skip_button.svg" type="Texture" id=12] -[ext_resource path="res://source/scenes/OVERLAY/elements/trajectories.gd" type="Script" id=13] -[ext_resource path="res://icon.png" type="Texture" id=14] +[ext_resource path="res://source/assets/scripts/shooting/Trajectories/trajectories.gd" type="Script" id=13] +[ext_resource path="res://source/fonts/oxygen/Oxygen-Bold.ttf" type="DynamicFontData" id=15] +[ext_resource path="res://source/assets/sprites/GUI/in_game/buttons/SpinBox/updown.svg" type="Texture" id=16] +[ext_resource path="res://source/fonts/oxygen/oxygen_bold_formula.tres" type="DynamicFont" id=17] [sub_resource type="StyleBoxTexture" id=1] texture = ExtResource( 1 ) region_rect = Rect2( 0, 0, 480, 156 ) -[sub_resource type="StyleBoxTexture" id=2] -texture = ExtResource( 3 ) -region_rect = Rect2( 0, 0, 100, 100 ) - -[sub_resource type="DynamicFont" id=3] -size = 14 -use_mipmaps = true -use_filter = true -font_data = ExtResource( 2 ) - [sub_resource type="StyleBoxTexture" id=4] -texture = ExtResource( 5 ) +texture = ExtResource( 3 ) region_rect = Rect2( 0, 0, 100, 100 ) [sub_resource type="DynamicFont" id=5] @@ -39,33 +31,63 @@ use_mipmaps = true use_filter = true font_data = ExtResource( 2 ) -[sub_resource type="StyleBoxTexture" id=6] -texture = ExtResource( 4 ) +[sub_resource type="StyleBoxFlat" id=6] +bg_color = Color( 0.333333, 0.431373, 0.807843, 1 ) +border_color = Color( 1, 1, 1, 0 ) + +[sub_resource type="Theme" id=7] +default_font = ExtResource( 17 ) +LineEdit/colors/clear_button_color = Color( 0.88, 0.88, 0.88, 1 ) +LineEdit/colors/clear_button_color_pressed = Color( 1, 1, 1, 1 ) +LineEdit/colors/cursor_color = Color( 0.94, 0.94, 0.94, 1 ) +LineEdit/colors/font_color = Color( 0.88, 0.88, 0.88, 1 ) +LineEdit/colors/font_color_selected = Color( 0, 0, 0, 1 ) +LineEdit/colors/font_color_uneditable = Color( 0.88, 0.88, 0.88, 0.5 ) +LineEdit/colors/selection_color = Color( 0.49, 0.49, 0.49, 1 ) +LineEdit/constants/minimum_spaces = 12 +LineEdit/fonts/font = null +LineEdit/icons/clear = null +LineEdit/styles/focus = null +LineEdit/styles/normal = SubResource( 6 ) +LineEdit/styles/read_only = null + +[sub_resource type="StyleBoxTexture" id=8] +texture = ExtResource( 5 ) region_rect = Rect2( 0, 0, 100, 100 ) -[sub_resource type="DynamicFont" id=7] +[sub_resource type="DynamicFont" id=9] size = 14 use_mipmaps = true use_filter = true font_data = ExtResource( 2 ) -[sub_resource type="StyleBoxTexture" id=8] +[sub_resource type="StyleBoxTexture" id=10] +texture = ExtResource( 4 ) +region_rect = Rect2( 0, 0, 100, 100 ) + +[sub_resource type="DynamicFont" id=11] +size = 14 +use_mipmaps = true +use_filter = true +font_data = ExtResource( 2 ) + +[sub_resource type="StyleBoxTexture" id=12] texture = ExtResource( 6 ) region_rect = Rect2( 0, 0, 100, 100 ) -[sub_resource type="DynamicFont" id=9] +[sub_resource type="DynamicFont" id=13] +size = 32 +use_mipmaps = true +use_filter = true +font_data = ExtResource( 15 ) + +[sub_resource type="DynamicFont" id=2] size = 22 use_mipmaps = true use_filter = true font_data = ExtResource( 2 ) -[sub_resource type="DynamicFont" id=10] -size = 22 -use_mipmaps = true -use_filter = true -font_data = ExtResource( 2 ) - -[sub_resource type="DynamicFont" id=11] +[sub_resource type="DynamicFont" id=3] size = 22 use_mipmaps = true use_filter = true @@ -81,37 +103,43 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="trajectories" type="Control" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 50.0 -margin_top = 28.0 -margin_right = -330.0 -margin_bottom = -28.0 -mouse_filter = 1 +[node name="controls" type="Control" parent="."] +margin_left = 165.0 +margin_top = 13.0 +margin_right = 465.0 +margin_bottom = 143.0 +mouse_filter = 2 script = ExtResource( 13 ) __meta__ = { -"_edit_use_anchors_": false -} - -[node name="line" type="Panel" parent="trajectories"] -visible = false -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -50.0 -margin_top = -50.0 -margin_right = 50.0 -margin_bottom = 50.0 -mouse_filter = 1 -custom_styles/panel = SubResource( 2 ) -__meta__ = { "_edit_lock_": true, "_edit_use_anchors_": false } -[node name="Label" type="Label" parent="trajectories/line"] +[node name="line" type="Control" parent="controls"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="line_panel" type="Panel" parent="controls/line"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -265.0 +margin_top = -50.0 +margin_right = -165.0 +margin_bottom = 50.0 +mouse_filter = 1 +custom_styles/panel = SubResource( 4 ) +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="controls/line/line_panel"] anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 @@ -119,8 +147,8 @@ anchor_bottom = 1.0 margin_left = -39.0 margin_top = -19.0 margin_right = 39.0 +custom_fonts/font = SubResource( 5 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_fonts/font = SubResource( 3 ) text = "line" align = 1 valign = 1 @@ -130,45 +158,115 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="LineEdit" type="LineEdit" parent="trajectories/line"] -margin_left = 206.0 -margin_top = 12.0 -margin_right = 288.0 -margin_bottom = 78.0 -focus_mode = 1 -mouse_filter = 1 -max_length = 3 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="x_label" type="Label" parent="trajectories/line"] -margin_left = 277.0 -margin_top = 44.0 -margin_right = 317.0 -margin_bottom = 58.0 -text = "x" -align = 1 -valign = 1 - -[node name="parabol" type="Panel" parent="trajectories"] +[node name="fx" type="Label" parent="controls/line"] visible = false anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -50.0 -margin_top = -50.0 -margin_right = 50.0 -margin_bottom = 50.0 -mouse_filter = 1 -custom_styles/panel = SubResource( 4 ) +margin_left = -75.0 +margin_top = -17.0 +margin_right = -5.0 +margin_bottom = 17.0 +custom_fonts/font = ExtResource( 17 ) +text = "f(x) = " +align = 1 +valign = 1 __meta__ = { "_edit_lock_": true, "_edit_use_anchors_": false } -[node name="Label" type="Label" parent="trajectories/parabol"] +[node name="line_SpinBox" type="SpinBox" parent="controls/line"] +use_parent_material = true +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -75.0 +margin_top = -17.0 +margin_right = 75.0 +margin_bottom = 17.0 +theme = SubResource( 7 ) +custom_icons/updown = ExtResource( 16 ) +min_value = -15.0 +max_value = 15.0 +step = 0.5 +align = 1 +prefix = "f(x) =" +suffix = "x" +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="parabol" type="Control" parent="controls"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="a_param_SpinBox" type="SpinBox" parent="controls/parabol"] +use_parent_material = true +anchor_top = 0.5 +anchor_bottom = 0.5 +margin_top = -17.0 +margin_right = 160.0 +margin_bottom = 17.0 +theme = SubResource( 7 ) +custom_icons/updown = ExtResource( 16 ) +min_value = -15.0 +max_value = 15.0 +step = 0.5 +align = 1 +prefix = "f(x) =" +suffix = "x²" +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="b_param_SpinBox" type="SpinBox" parent="controls/parabol"] +use_parent_material = true +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +margin_left = -140.0 +margin_top = -17.0 +margin_bottom = 17.0 +theme = SubResource( 7 ) +custom_icons/updown = ExtResource( 16 ) +min_value = -15.0 +max_value = 15.0 +step = 0.5 +align = 1 +prefix = "+" +suffix = "x + c" +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="parabol_panel" type="Panel" parent="controls/parabol"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -265.0 +margin_top = -50.0 +margin_right = -165.0 +margin_bottom = 50.0 +mouse_filter = 1 +custom_styles/panel = SubResource( 8 ) +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="controls/parabol/parabol_panel"] anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 @@ -176,8 +274,8 @@ anchor_bottom = 1.0 margin_left = -39.0 margin_top = -19.0 margin_right = 39.0 +custom_fonts/font = SubResource( 9 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_fonts/font = SubResource( 5 ) text = "parabol" align = 1 valign = 1 @@ -187,58 +285,71 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="x^2 label" type="Label" parent="trajectories/parabol"] -margin_left = 256.0 -margin_top = 41.0 -margin_right = 296.0 -margin_bottom = 55.0 -text = "x^2 +" - -[node name="a_param_LineEdit" type="LineEdit" parent="trajectories/parabol"] -margin_left = 193.0 -margin_top = 35.0 -margin_right = 251.0 -margin_bottom = 59.0 -focus_mode = 1 -max_length = 3 - -[node name="b_param_LineEdit" type="LineEdit" parent="trajectories/parabol"] -margin_left = 293.0 -margin_top = 36.0 -margin_right = 351.0 -margin_bottom = 60.0 -focus_mode = 1 -max_length = 3 +[node name="hyperbol" type="Control" parent="controls"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 __meta__ = { "_edit_use_anchors_": false } -[node name="x_label" type="Label" parent="trajectories/parabol"] -margin_left = 340.0 -margin_top = 41.0 -margin_right = 380.0 -margin_bottom = 55.0 -text = "x" -align = 1 -valign = 1 - -[node name="hyperbol" type="Panel" parent="trajectories"] -visible = false -anchor_left = 0.5 +[node name="a_param_h_SpinBox" type="SpinBox" parent="controls/hyperbol"] +use_parent_material = true anchor_top = 0.5 -anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -50.0 -margin_top = -50.0 -margin_right = 50.0 -margin_bottom = 50.0 -custom_styles/panel = SubResource( 6 ) +margin_top = -17.0 +margin_right = 150.0 +margin_bottom = 17.0 +theme = SubResource( 7 ) +custom_icons/updown = ExtResource( 16 ) +min_value = -15.0 +max_value = 15.0 +step = 0.5 +align = 1 +prefix = "f(x) =" __meta__ = { "_edit_lock_": true, "_edit_use_anchors_": false } -[node name="Label" type="Label" parent="trajectories/hyperbol"] +[node name="b_param_h_SpinBox" type="SpinBox" parent="controls/hyperbol"] +use_parent_material = true +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +margin_left = -150.0 +margin_top = -17.0 +margin_bottom = 17.0 +theme = SubResource( 7 ) +custom_icons/updown = ExtResource( 16 ) +min_value = -15.0 +max_value = 15.0 +step = 0.5 +align = 1 +prefix = "/" +suffix = "x" +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="hyperbol_panel" type="Panel" parent="controls/hyperbol"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -265.0 +margin_top = -50.0 +margin_right = -165.0 +margin_bottom = 50.0 +custom_styles/panel = SubResource( 10 ) +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="controls/hyperbol/hyperbol_panel"] anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 @@ -246,8 +357,8 @@ anchor_bottom = 1.0 margin_left = -39.0 margin_top = -19.0 margin_right = 39.0 +custom_fonts/font = SubResource( 11 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_fonts/font = SubResource( 7 ) text = "hyperbol" align = 1 valign = 1 @@ -257,52 +368,31 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="a_param_h_LineEdit" type="LineEdit" parent="trajectories/hyperbol"] -margin_left = 225.0 -margin_top = 13.0 -margin_right = 283.0 -margin_bottom = 37.0 -focus_mode = 1 -max_length = 3 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="b_param_h_LineEdit" type="LineEdit" parent="trajectories/hyperbol"] -margin_left = 211.0 -margin_top = 45.0 -margin_right = 269.0 -margin_bottom = 69.0 -focus_mode = 1 -max_length = 3 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Sprite" type="Sprite" parent="trajectories/hyperbol"] -modulate = Color( 0, 0, 0, 1 ) -self_modulate = Color( 0, 0, 0, 1 ) -position = Vector2( 254, 41 ) -scale = Vector2( 0.0401042, 0.00260416 ) -texture = ExtResource( 14 ) - -[node name="sin" type="Panel" parent="trajectories"] +[node name="sin" type="Control" parent="controls"] visible = false -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -50.0 -margin_top = -50.0 -margin_right = 50.0 -margin_bottom = 50.0 -custom_styles/panel = SubResource( 8 ) +anchor_right = 1.0 +anchor_bottom = 1.0 __meta__ = { "_edit_lock_": true, "_edit_use_anchors_": false } -[node name="Label" type="Label" parent="trajectories/sin"] +[node name="sine_panel" type="Panel" parent="controls/sin"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -265.0 +margin_top = -50.0 +margin_right = -165.0 +margin_bottom = 50.0 +custom_styles/panel = SubResource( 12 ) +__meta__ = { +"_edit_lock_": true, +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="controls/sin/sine_panel"] anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 @@ -310,9 +400,9 @@ anchor_bottom = 1.0 margin_left = -39.0 margin_top = -19.0 margin_right = 39.0 +custom_fonts/font = SubResource( 11 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_fonts/font = SubResource( 7 ) -text = "sin" +text = "sine" align = 1 valign = 1 uppercase = true @@ -321,72 +411,51 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="x_label" type="Label" parent="trajectories/sin"] -margin_left = 341.0 -margin_top = 37.0 -margin_right = 381.0 -margin_bottom = 51.0 -text = "x)" +[node name="amp_SpinBox" type="SpinBox" parent="controls/sin"] +use_parent_material = true +anchor_top = 0.5 +anchor_bottom = 0.5 +margin_top = -17.0 +margin_right = 150.0 +margin_bottom = 17.0 +theme = SubResource( 7 ) +custom_icons/updown = ExtResource( 16 ) +min_value = -15.0 +max_value = 15.0 +step = 0.5 align = 1 -valign = 1 - -[node name="amp" type="LineEdit" parent="trajectories/sin"] -margin_left = 204.0 -margin_top = 33.0 -margin_right = 262.0 -margin_bottom = 57.0 -focus_mode = 1 -max_length = 3 - -[node name="freq" type="LineEdit" parent="trajectories/sin"] -margin_left = 291.0 -margin_top = 33.0 -margin_right = 349.0 -margin_bottom = 57.0 -focus_mode = 1 -max_length = 3 +prefix = "f(x) =" __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } -[node name="sin()" type="Label" parent="trajectories/sin"] -margin_left = 255.0 -margin_top = 37.0 -margin_right = 295.0 -margin_bottom = 51.0 -text = "sin(" +[node name="freq_SpinBox" type="SpinBox" parent="controls/sin"] +use_parent_material = true +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +margin_left = -150.0 +margin_top = -17.0 +margin_bottom = 17.0 +theme = SubResource( 7 ) +custom_icons/updown = ExtResource( 16 ) +min_value = -15.0 +max_value = 15.0 +step = 0.5 align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Func_Label" type="Label" parent="trajectories"] -margin_left = 121.0 -margin_top = 28.0 -margin_right = 237.0 -margin_bottom = 65.0 -text = "f(x) = " -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="controls" type="Control" parent="."] -margin_left = 165.0 -margin_top = 13.0 -margin_right = 465.0 -margin_bottom = 143.0 -mouse_filter = 2 +prefix = "sin(" +suffix = "x)" __meta__ = { +"_edit_lock_": true, "_edit_use_anchors_": false } [node name="Label" type="Label" parent="controls"] anchor_right = 1.0 -margin_bottom = 29.0 -custom_fonts/font = SubResource( 9 ) +margin_bottom = 41.0 +custom_fonts/font = SubResource( 13 ) text = "Active formula" align = 1 valign = 1 @@ -410,7 +479,7 @@ __meta__ = { [node name="Label" type="Label" parent="controls/ready_button"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = SubResource( 10 ) +custom_fonts/font = SubResource( 2 ) text = "Ready" align = 1 valign = 1 @@ -434,15 +503,15 @@ __meta__ = { [node name="Label" type="Label" parent="controls/skip_button"] anchor_right = 1.0 anchor_bottom = 1.0 -custom_fonts/font = SubResource( 11 ) +custom_fonts/font = SubResource( 3 ) text = "Skip" align = 1 valign = 1 -[connection signal="text_entered" from="trajectories/line/LineEdit" to="trajectories" method="_on_LineEdit_text_entered"] -[connection signal="text_entered" from="trajectories/parabol/a_param_LineEdit" to="trajectories" method="_on_a_param_LineEdit_text_entered"] -[connection signal="text_entered" from="trajectories/parabol/b_param_LineEdit" to="trajectories" method="_on_b_param_LineEdit_text_entered"] -[connection signal="text_entered" from="trajectories/hyperbol/a_param_h_LineEdit" to="trajectories" method="_on_a_param_h_LineEdit_text_entered"] -[connection signal="text_entered" from="trajectories/hyperbol/b_param_h_LineEdit" to="trajectories" method="_on_b_param_h_LineEdit_text_entered"] -[connection signal="text_entered" from="trajectories/sin/amp" to="trajectories" method="_on_amp_text_entered"] -[connection signal="text_entered" from="trajectories/sin/freq" to="trajectories" method="_on_freq_text_entered"] +[connection signal="value_changed" from="controls/line/line_SpinBox" to="controls" method="_on_line_SpinBox_value_changed"] +[connection signal="value_changed" from="controls/parabol/a_param_SpinBox" to="controls" method="_on_a_param_SpinBox_value_changed"] +[connection signal="value_changed" from="controls/parabol/b_param_SpinBox" to="controls" method="_on_b_param_SpinBox_value_changed"] +[connection signal="value_changed" from="controls/hyperbol/a_param_h_SpinBox" to="controls" method="_on_a_param_h_SpinBox_value_changed"] +[connection signal="value_changed" from="controls/hyperbol/b_param_h_SpinBox" to="controls" method="_on_b_param_h_SpinBox_value_changed"] +[connection signal="value_changed" from="controls/sin/amp_SpinBox" to="controls" method="_on_amp_SpinBox_value_changed"] +[connection signal="value_changed" from="controls/sin/freq_SpinBox" to="controls" method="_on_freq_SpinBox_value_changed"]