galo 1 년 전
부모
커밋
4cacbddfcc
4개의 변경된 파일94개의 추가작업 그리고 1개의 파일을 삭제
  1. 50 1
      Client.tscn
  2. 1 0
      main.tscn
  3. 32 0
      opts.gd
  4. 11 0
      project.godot

+ 50 - 1
Client.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=10 format=2]
+[gd_scene load_steps=14 format=2]
 
 [ext_resource path="res://Debug.tscn" type="PackedScene" id=1]
 [ext_resource path="res://PowerMenu.tscn" type="PackedScene" id=2]
@@ -8,6 +8,9 @@
 [ext_resource path="res://projectiles.gd" type="Script" id=6]
 [ext_resource path="res://enemiessprite.gd" type="Script" id=7]
 [ext_resource path="res://font/tiny.tres" type="DynamicFont" id=8]
+[ext_resource path="res://font/8bit.tres" type="DynamicFont" id=9]
+[ext_resource path="res://art/player/emote/esclamation.png" type="Texture" id=10]
+[ext_resource path="res://opts.gd" type="Script" id=11]
 
 [sub_resource type="GDScript" id=1]
 script/source = "extends Label
@@ -22,6 +25,9 @@ func _input(event):
 			print('sending spawn request...')
 "
 
+[sub_resource type="StyleBoxFlat" id=2]
+bg_color = Color( 0, 0, 0, 0.415686 )
+
 [node name="Client" type="Node" groups=["client"]]
 script = ExtResource( 3 )
 
@@ -125,5 +131,48 @@ anchor_right = 1.0
 anchor_bottom = 1.0
 color = Color( 0, 0, 0, 0.333333 )
 
+[node name="Options" type="CanvasLayer" parent="."]
+
+[node name="VBoxContainer" type="VBoxContainer" parent="Options"]
+visible = false
+anchor_left = 0.5
+anchor_right = 0.5
+anchor_bottom = 1.0
+margin_left = -64.5
+margin_right = 64.5
+alignment = 1
+script = ExtResource( 11 )
+
+[node name="Label" type="Label" parent="Options/VBoxContainer"]
+margin_top = 156.0
+margin_right = 129.0
+margin_bottom = 168.0
+custom_fonts/font = ExtResource( 9 )
+text = "volume:"
+align = 1
+
+[node name="HSlider" type="HSlider" parent="Options/VBoxContainer"]
+margin_top = 172.0
+margin_right = 129.0
+margin_bottom = 188.0
+custom_icons/tick = ExtResource( 10 )
+custom_icons/grabber_disabled = ExtResource( 10 )
+custom_icons/grabber_highlight = ExtResource( 10 )
+custom_icons/grabber = ExtResource( 10 )
+
+[node name="OptionButton" type="OptionButton" parent="Options/VBoxContainer"]
+margin_top = 192.0
+margin_right = 129.0
+margin_bottom = 204.0
+custom_fonts/font = ExtResource( 9 )
+custom_styles/hover = SubResource( 2 )
+custom_styles/pressed = SubResource( 2 )
+custom_styles/focus = SubResource( 2 )
+custom_styles/disabled = SubResource( 2 )
+custom_styles/normal = SubResource( 2 )
+text = "window option"
+
 [connection signal="timeout" from="Debug/ping/Timer" to="Debug/ping" method="_on_Timer_timeout"]
 [connection signal="text_entered" from="Chat/LineEdit" to="." method="chat_messages"]
+[connection signal="value_changed" from="Options/VBoxContainer/HSlider" to="Options/VBoxContainer" method="_on_HSlider_value_changed"]
+[connection signal="item_selected" from="Options/VBoxContainer/OptionButton" to="Options/VBoxContainer" method="_on_OptionButton_item_selected"]

+ 1 - 0
main.tscn

@@ -579,6 +579,7 @@ script = ExtResource( 4 )
 script = ExtResource( 5 )
 
 [node name="PanelContainer" type="PanelContainer" parent="BrowserListClient"]
+visible = false
 anchor_right = 1.0
 anchor_bottom = 1.0
 margin_left = 64.0

+ 32 - 0
opts.gd

@@ -0,0 +1,32 @@
+extends VBoxContainer
+
+func _ready():
+	$OptionButton.add_item('windowned')
+	$OptionButton.add_item('borderless')
+	$OptionButton.add_item('fullscreen')
+	
+
+func _input(event):
+	if Input.is_action_just_pressed("opts"):
+		visible = !visible
+	if Input.is_action_just_pressed("f12"):
+		OS.window_fullscreen = !OS.window_fullscreen
+
+
+func _on_HSlider_value_changed(value):
+	AudioServer.set_bus_volume_db(0,linear2db(value))
+	pass # Replace with function body.
+
+
+func _on_OptionButton_item_selected(index):
+	match index:
+		0:
+			OS.window_fullscreen = false
+			OS.window_borderless = false
+		1:
+			OS.window_fullscreen = false
+			OS.window_borderless = true
+		2:
+			OS.window_fullscreen = true
+			OS.window_borderless = false
+	pass # Replace with function body.

+ 11 - 0
project.godot

@@ -81,6 +81,17 @@ ui_jump={
 , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
  ]
 }
+opts={
+"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":0,"physical_scancode":16777217,"unicode":0,"echo":false,"script":null)
+, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
+ ]
+}
+f12={
+"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":0,"physical_scancode":16777255,"unicode":0,"echo":false,"script":null)
+ ]
+}
 
 [layer_names]