diff options
| author | Daniel Weipert <git@mail.dweipert.de> | 2025-04-07 11:45:05 +0200 | 
|---|---|---|
| committer | Daniel Weipert <git@mail.dweipert.de> | 2025-04-07 11:45:05 +0200 | 
| commit | f3d360e022fce829370c7d916abe98083b14818c (patch) | |
| tree | 4ac9f886b45a9482dcd42e991e85ab2e4bea3dbc /ui | |
| parent | bd77c88efc9327805b6f6fd83fa0492ed59d0f9a (diff) | |
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/chat_window.tscn | 12 | ||||
| -rw-r--r-- | ui/login.gd | 103 | ||||
| -rw-r--r-- | ui/login.tscn | 120 | ||||
| -rw-r--r-- | ui/login/character_creation.gd | 134 | ||||
| -rw-r--r-- | ui/login/character_creation.tscn | 304 | ||||
| -rw-r--r-- | ui/login/character_selection_item.tscn | 10 | ||||
| -rw-r--r-- | ui/login/login_character_selection_list.gd | 5 | ||||
| -rw-r--r-- | ui/login/login_character_selection_list.tscn | 22 | ||||
| -rw-r--r-- | ui/login/stat_entry.gd | 18 | ||||
| -rw-r--r-- | ui/login/stat_entry.tscn | 24 | ||||
| -rw-r--r-- | ui/message_window.tscn | 12 | ||||
| -rw-r--r-- | ui/theme.tres | 11 | ||||
| -rw-r--r-- | ui/theme_clear.tres | 2 | ||||
| -rw-r--r-- | ui/window.tscn | 38 | 
14 files changed, 721 insertions, 94 deletions
| diff --git a/ui/chat_window.tscn b/ui/chat_window.tscn index b430fb8..5804fd0 100644 --- a/ui/chat_window.tscn +++ b/ui/chat_window.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=5 format=3 uid="uid://c8uqw08hxfqlu"] +[gd_scene load_steps=4 format=3 uid="uid://c8uqw08hxfqlu"]  [ext_resource type="Script" uid="uid://cy5bwkc4gokw1" path="res://ui/chat_window.gd" id="1_vovuq"] -[ext_resource type="PackedScene" uid="uid://cjcm2mai50thr" path="res://ui/bmp_texture_button.tscn" id="2_2x3wj"] -[ext_resource type="Texture2D" uid="uid://dqq3mtjcrwqnp" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/sys_base_off.bmp" id="3_smgio"] +[ext_resource type="Texture2D" uid="uid://dwv8ca3u5xk3o" path="res://client_data/data/texture/유저인터페이스/basic_interface/sys_base_off.png" id="2_2x3wj"]  [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ku06j"]  bg_color = Color(0.133333, 0.133333, 0.133333, 0.784314) @@ -45,6 +44,7 @@ layout_mode = 2  [node name="ToPlayer" type="LineEdit" parent="VBoxContainer/HBoxContainer"]  unique_name_in_owner = true  layout_mode = 2 +placeholder_text = "Player"  [node name="LineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer"]  unique_name_in_owner = true @@ -52,9 +52,11 @@ layout_mode = 2  size_flags_horizontal = 3  placeholder_text = "Send Messages here" -[node name="Handle" parent="VBoxContainer/HBoxContainer" instance=ExtResource("2_2x3wj")] +[node name="Handle" type="TextureButton" parent="VBoxContainer/HBoxContainer"] +texture_filter = 1  layout_mode = 2 -texture_normal = ExtResource("3_smgio") +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("2_2x3wj")  stretch_mode = 5  [connection signal="text_submitted" from="VBoxContainer/HBoxContainer/LineEdit" to="." method="_on_line_edit_text_submitted"] diff --git a/ui/login.gd b/ui/login.gd index 70cc52e..1c5284e 100644 --- a/ui/login.gd +++ b/ui/login.gd @@ -28,11 +28,16 @@ func switch_screen(screen: Node):  func _on_login_pressed() -> void:  	SoundManager.sound_button_click.play() -	Network.login_server = LoginServer.new("127.0.0.1") +	Network.login_server = LoginServer.new(Network.client_info.get_address(), Network.client_info.get_port())  	Network.login_server.establish_connection()  	if Network.login_server.get_status() == Error.FAILED: -		Client.show_message_window("Couldn't connect to server at 127.0.0.1", "Connection Error", %Login/Window, SIDE_BOTTOM) +		Client.show_message_window( +			"Couldn't connect to server at %s:%s" % [Network.login_server.host, Network.login_server.port], +			"Connection Error", +			%Login/Window, +			SIDE_BOTTOM +		)  		return  	var response = await Network.login_server.login(username.text, password.text) @@ -48,6 +53,30 @@ func _on_login_pressed() -> void:  		Client.show_message_window(message, "Login Error", %Login/Window, SIDE_BOTTOM)  		return +	if response is LoginFailedPacket2: +		var message := "" +		if response.reason == Constants.LoginFailedReason2.UnregisteredId: +			message = "Unregistered ID" +		elif response.reason == Constants.LoginFailedReason2.IncorrectPassword: +			message = "Incorrect Password" +		elif response.reason == Constants.LoginFailedReason2.IdExpired: +			message = "ID expired" +		elif response.reason == Constants.LoginFailedReason2.RejectedFromServer: +			message = "Rejected from Server" +		elif response.reason == Constants.LoginFailedReason2.BlockedByGMTeam: +			message = "Blocked by GM Team" +		elif response.reason == Constants.LoginFailedReason2.GameOutdated: +			message = "Game Outdated" +		elif response.reason == Constants.LoginFailedReason2.LoginProhibitedUntil: +			message = "Login prohibited until %s" % response.unblock_time +		elif response.reason == Constants.LoginFailedReason2.ServerFull: +			message = "Server Full" +		elif response.reason == Constants.LoginFailedReason2.CompanyAccountLimitReached: +			message = "CompanyAccountLimitReached" +		 +		Client.show_message_window(message, "Login Error", %Login/Window, SIDE_BOTTOM) +		return +	  	account_information = response  	character_server_information = account_information.character_server_information @@ -96,10 +125,12 @@ func _on_character_server_login_pressed(character_server_info: CharacterServerIn  		account_information.gender  	) -	if response.login is CharacterSelectionFailedPacket: +	if response.has(CharacterSelectionFailedPacket.HEADER):  		Client.show_message_window( -			"Connection rejected from server \"%s\" at %s" % [ -				character_server_info.server_name, character_server_info.get_server_ip() +			"Connection rejected from server \"%s\" at %s:%s" % [ +				character_server_info.server_name, +				character_server_info.get_server_ip(), +				character_server_info.server_port  			],  			"Connection Error", %CharacterServer/Window, SIDE_BOTTOM  		) @@ -107,7 +138,7 @@ func _on_character_server_login_pressed(character_server_info: CharacterServerIn  	get_tree().root.add_child(Network.character_server.get_keep_alive_timer()) -	var character_list: CharacterServerLoginSuccessCharacterListPacket = response.character_list +	var character_list: CharacterServerLoginSuccessCharacterListPacket = response[CharacterServerLoginSuccessCharacterListPacket.HEADER]  	var login_character_list := LoginCharacterList.from_character_list_login_packet(character_list)  	%CharacterSelectionList.login_character_list = login_character_list @@ -118,11 +149,18 @@ func _on_character_server_login_pressed(character_server_info: CharacterServerIn  		var info = login_character_list.get_info_for_slot(slot_idx)  		if info:  			current_character_information = info +			%CharacterSelectionCreate.visible = false +			%CharacterLogin.visible = true  		else:  			current_character_information = null +			%CharacterSelectionCreate.visible = true +			%CharacterLogin.visible = false  	)  	%CharacterSelectionList.requested_login.connect(func(slot_idx: int): -		_on_character_selected_pressed(slot_idx) +		if current_character_information: +			_on_character_selected_pressed(slot_idx) +		else: +			_on_character_selection_create_pressed()  	)  	# pre-select first character @@ -178,5 +216,56 @@ func _on_character_selection_back_button_pressed() -> void:  	switch_screen(%CharacterServer) +func _on_character_selection_create_pressed() -> void: +	SoundManager.sound_button_click.play() +	switch_screen(%CharacterCreation) +	 +	%CharacterCreationInterface.strength = 5 +	%CharacterCreationInterface.agility = 5 +	%CharacterCreationInterface.vitality = 5 +	%CharacterCreationInterface.intelligence = 5 +	%CharacterCreationInterface.dexterity = 5 +	%CharacterCreationInterface.luck = 5 + +  func _on_character_login_pressed() -> void:  	_on_character_selected_pressed(current_character_slot_idx) + + +func _on_character_creation_cancel_pressed() -> void: +	SoundManager.sound_button_click.play() +	switch_screen(%CharacterSelection) + + +func _on_character_creation_create_pressed() -> void: +	SoundManager.sound_button_click.play() +	 +	var response = await Network.character_server.create_character( +		%CharacterCreationInterface.character_name, +		current_character_slot_idx, +		0, +		%CharacterCreationInterface.head_id, +		Constants.Job.Novice, +		account_information.gender +	) +	 +	if response is CharacterCreationFailedPacket: +		var message := "" +		if response.reason == Constants.CharacterCreationFailedReason.CharacterNameAlreadyInUse: +			message = "Character Name already in use" +		elif response.reason == Constants.CharacterCreationFailedReason.NotOldEnough: +			message = "Not old enough" +		elif response.reason == Constants.CharacterCreationFailedReason.NotAllowedToUseSlot: +			message = "Not allowed to use slot" +		elif response.reason == Constants.CharacterCreationFailedReason.CharacterCreationFailed: +			message = "Character creation failed. Reason unknown" +		 +		Client.show_message_window(message, "Character Creation Error") +		return +	 +	# TODO: create character +	# TODO: reload selection list data +	 +	switch_screen(%CharacterSelection) +	%CharacterSelectionList.login_character_list.add_character_information(response.character_information) +	print(inst_to_dict(response.character_information)) diff --git a/ui/login.tscn b/ui/login.tscn index e889508..04f24b1 100644 --- a/ui/login.tscn +++ b/ui/login.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=24 format=3 uid="uid://dser74lcd3a4g"] +[gd_scene load_steps=25 format=3 uid="uid://dser74lcd3a4g"]  [ext_resource type="Script" uid="uid://dqswsdaamfhbq" path="res://ui/login.gd" id="1_1m5cv"]  [ext_resource type="Texture2D" uid="uid://cxd6dnc7s17vg" path="res://client_data/skin/login_background.jpg" id="2_elmti"] @@ -6,22 +6,23 @@  [ext_resource type="Theme" uid="uid://c5sm3yvuakj3b" path="res://ui/theme.tres" id="3_7ogdv"]  [ext_resource type="PackedScene" uid="uid://cjcm2mai50thr" path="res://ui/bmp_texture_button.tscn" id="3_qemc0"]  [ext_resource type="PackedScene" uid="uid://c8uqw08hxfqlu" path="res://ui/chat_window.tscn" id="4_ah2a1"] -[ext_resource type="Texture2D" uid="uid://bern5mhol3l8y" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/btn_connect.bmp" id="4_wpax4"] -[ext_resource type="Texture2D" uid="uid://c31u8nlyugk3p" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/btn_connect_b.bmp" id="5_7ogdv"] -[ext_resource type="Texture2D" uid="uid://c5kctdb8b2msx" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/btn_connect_a.bmp" id="6_l3yss"] -[ext_resource type="Texture2D" uid="uid://l3c7ssoc4lxq" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/btn_connect.png" id="7_pfdi0"] -[ext_resource type="Texture2D" uid="uid://p7bxfof7gd0t" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/btn_connect_b.png" id="8_38pxr"] -[ext_resource type="Texture2D" uid="uid://ba8j1t53lqxr0" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/btn_connect_a.png" id="9_hqeko"] +[ext_resource type="Texture2D" uid="uid://1vrog6v0c8dd" path="res://client_data/data/texture/유저인터페이스/login_interface/btn_connect.png" id="7_8pgsx"] +[ext_resource type="Texture2D" uid="uid://txbfc4bmwl3o" path="res://client_data/data/texture/유저인터페이스/login_interface/btn_connect_b.png" id="8_dx2ir"] +[ext_resource type="Texture2D" uid="uid://xj061qbyw4mp" path="res://client_data/data/texture/유저인터페이스/login_interface/btn_connect_a.png" id="9_tftjj"]  [ext_resource type="Theme" uid="uid://c6y6r8kcnbb10" path="res://ui/theme_clear.tres" id="9_toei2"]  [ext_resource type="PackedScene" uid="uid://f2urhroq21t0" path="res://ui/login/character_server_button.tscn" id="10_38pxr"] -[ext_resource type="Texture2D" uid="uid://byn26biifjkng" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/btn_cancel.bmp" id="11_tihdy"] -[ext_resource type="Texture2D" uid="uid://wvnt34j5mkvy" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/btn_cancel_b.bmp" id="12_mma3j"] -[ext_resource type="Texture2D" uid="uid://pv886kwtlrq0" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/btn_cancel_a.bmp" id="13_0vsp3"] -[ext_resource type="Texture2D" uid="uid://b13jh48hyjyrt" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/btn_next.bmp" id="14_pfdi0"] -[ext_resource type="Texture2D" uid="uid://bo277gh8uyw1w" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/btn_next_b.bmp" id="15_38pxr"] -[ext_resource type="Texture2D" uid="uid://qvmuk8xa3yej" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/btn_next_a.bmp" id="16_hqeko"] +[ext_resource type="Texture2D" uid="uid://pjerdwsogw84" path="res://client_data/data/texture/유저인터페이스/btn_cancel.png" id="11_60jnu"] +[ext_resource type="Texture2D" uid="uid://ba3g38r086pyk" path="res://client_data/data/texture/유저인터페이스/btn_cancel_b.png" id="12_up3vp"] +[ext_resource type="Texture2D" uid="uid://bw3j7xm53qoqe" path="res://client_data/data/texture/유저인터페이스/btn_cancel_a.png" id="13_swwvu"] +[ext_resource type="Texture2D" uid="uid://brkbxq02xuyw8" path="res://client_data/data/texture/유저인터페이스/btn_next.png" id="14_ohrmw"] +[ext_resource type="Texture2D" uid="uid://dweiqt26hgws2" path="res://client_data/data/texture/유저인터페이스/btn_next_b.png" id="15_c1fiv"] +[ext_resource type="Texture2D" uid="uid://h6r0smppndhq" path="res://client_data/data/texture/유저인터페이스/btn_next_a.png" id="16_14c6s"]  [ext_resource type="PackedScene" uid="uid://bxbprntny8duj" path="res://ui/login/login_character_selection_list.tscn" id="16_tihdy"]  [ext_resource type="PackedScene" uid="uid://swtqlba1wi3o" path="res://ui/window.tscn" id="17_mma3j"] +[ext_resource type="Texture2D" uid="uid://cgsgfo5j5lm2t" path="res://client_data/data/texture/유저인터페이스/btn_make_b.png" id="19_dx2ir"] +[ext_resource type="Texture2D" uid="uid://bvbne1gpgvk08" path="res://client_data/data/texture/유저인터페이스/btn_make_a.png" id="20_tftjj"] +[ext_resource type="Texture2D" uid="uid://cnhrbacvvitjq" path="res://client_data/data/texture/유저인터페이스/btn_make.png" id="22_82qbc"] +[ext_resource type="PackedScene" uid="uid://di8inwptr42fe" path="res://ui/login/character_creation.tscn" id="24_8pgsx"]  [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pfdi0"]  bg_color = Color(0.977834, 0.977834, 0.977834, 1) @@ -119,9 +120,9 @@ secret_character = "*"  layout_mode = 2  size_flags_horizontal = 8  theme = ExtResource("3_7ogdv") -texture_normal = ExtResource("7_pfdi0") -texture_pressed = ExtResource("8_38pxr") -texture_hover = ExtResource("9_hqeko") +texture_normal = ExtResource("7_8pgsx") +texture_pressed = ExtResource("8_dx2ir") +texture_hover = ExtResource("9_tftjj")  [node name="CharacterServer" type="CenterContainer" parent="."]  unique_name_in_owner = true @@ -169,16 +170,16 @@ layout_mode = 2  [node name="CharacterServerBackButton" parent="CharacterServer/Window/VBoxContainer/ButtonBar/ButtonBarElements/HBoxContainer" instance=ExtResource("3_qemc0")]  layout_mode = 2  size_flags_horizontal = 0 -texture_normal = ExtResource("11_tihdy") -texture_pressed = ExtResource("12_mma3j") -texture_hover = ExtResource("13_0vsp3") +texture_normal = ExtResource("11_60jnu") +texture_pressed = ExtResource("12_up3vp") +texture_hover = ExtResource("13_swwvu")  [node name="CharacterServerNextButton" parent="CharacterServer/Window/VBoxContainer/ButtonBar/ButtonBarElements/HBoxContainer" instance=ExtResource("3_qemc0")]  layout_mode = 2  size_flags_horizontal = 10 -texture_normal = ExtResource("14_pfdi0") -texture_pressed = ExtResource("15_38pxr") -texture_hover = ExtResource("16_hqeko") +texture_normal = ExtResource("14_ohrmw") +texture_pressed = ExtResource("15_c1fiv") +texture_hover = ExtResource("16_14c6s")  [node name="CharacterSelection" type="CenterContainer" parent="."]  unique_name_in_owner = true @@ -294,17 +295,72 @@ layout_mode = 2  [node name="CharacterSelectionBackButton" parent="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements" index="0" instance=ExtResource("3_qemc0")]  layout_mode = 2  size_flags_horizontal = 0 -texture_normal = ExtResource("11_tihdy") -texture_pressed = ExtResource("12_mma3j") -texture_hover = ExtResource("13_0vsp3") +texture_normal = ExtResource("11_60jnu") +texture_pressed = ExtResource("12_up3vp") +texture_hover = ExtResource("13_swwvu") -[node name="CharacterLogin" parent="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements" index="1" instance=ExtResource("3_qemc0")] +[node name="HBoxContainer" type="HBoxContainer" parent="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements" index="1"] +layout_mode = 2 +size_flags_horizontal = 8 + +[node name="CharacterSelectionCreate" type="TextureButton" parent="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements/HBoxContainer"] +unique_name_in_owner = true +texture_filter = 1 +layout_mode = 2 +size_flags_horizontal = 8 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("22_82qbc") +texture_pressed = ExtResource("19_dx2ir") +texture_hover = ExtResource("20_tftjj") + +[node name="CharacterLogin" parent="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements/HBoxContainer" instance=ExtResource("3_qemc0")] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 8 +texture_normal = ExtResource("7_8pgsx") +texture_pressed = ExtResource("8_dx2ir") +texture_hover = ExtResource("9_tftjj") + +[node name="CharacterCreation" type="CenterContainer" parent="."] +unique_name_in_owner = true +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Window" parent="CharacterCreation" instance=ExtResource("17_mma3j")] +layout_mode = 2 + +[node name="MarginContainer" type="MarginContainer" parent="CharacterCreation/Window/VBoxContainer/Body" index="0"] +layout_mode = 2 +theme_override_constants/margin_left = 16 +theme_override_constants/margin_top = 16 +theme_override_constants/margin_right = 16 +theme_override_constants/margin_bottom = 16 + +[node name="CharacterCreationInterface" parent="CharacterCreation/Window/VBoxContainer/Body/MarginContainer" instance=ExtResource("24_8pgsx")]  unique_name_in_owner = true  layout_mode = 2 + +[node name="CharacterCreationCancel" type="TextureButton" parent="CharacterCreation/Window/VBoxContainer/ButtonBar/ButtonBarElements" index="0"] +texture_filter = 1 +layout_mode = 2 +size_flags_horizontal = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("11_60jnu") +texture_pressed = ExtResource("12_up3vp") +texture_hover = ExtResource("13_swwvu") + +[node name="CharacterCreationCreate" type="TextureButton" parent="CharacterCreation/Window/VBoxContainer/ButtonBar/ButtonBarElements" index="1"] +texture_filter = 1 +layout_mode = 2  size_flags_horizontal = 8 -texture_normal = ExtResource("4_wpax4") -texture_pressed = ExtResource("5_7ogdv") -texture_hover = ExtResource("6_l3yss") +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("22_82qbc") +texture_pressed = ExtResource("19_dx2ir") +texture_hover = ExtResource("20_tftjj")  [node name="BackgroundMusic" type="AudioStreamPlayer" parent="."]  stream = ExtResource("3_2nukd") @@ -327,8 +383,12 @@ grow_vertical = 0  [connection signal="pressed" from="CharacterServer/Window/VBoxContainer/ButtonBar/ButtonBarElements/HBoxContainer/CharacterServerNextButton" to="." method="_on_character_server_next_button_pressed"]  [connection signal="pressed" from="CharacterSelection/VBoxContainer/CharacterSelectionBackButton" to="." method="_on_character_selection_back_button_pressed"]  [connection signal="pressed" from="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements/CharacterSelectionBackButton" to="." method="_on_character_selection_back_button_pressed"] -[connection signal="pressed" from="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements/CharacterLogin" to="." method="_on_character_login_pressed"] +[connection signal="pressed" from="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements/HBoxContainer/CharacterSelectionCreate" to="." method="_on_character_selection_create_pressed"] +[connection signal="pressed" from="CharacterSelection/Window/VBoxContainer/ButtonBar/ButtonBarElements/HBoxContainer/CharacterLogin" to="." method="_on_character_login_pressed"] +[connection signal="pressed" from="CharacterCreation/Window/VBoxContainer/ButtonBar/ButtonBarElements/CharacterCreationCancel" to="." method="_on_character_creation_cancel_pressed"] +[connection signal="pressed" from="CharacterCreation/Window/VBoxContainer/ButtonBar/ButtonBarElements/CharacterCreationCreate" to="." method="_on_character_creation_create_pressed"]  [editable path="Login/Window"]  [editable path="CharacterServer/Window"]  [editable path="CharacterSelection/Window"] +[editable path="CharacterCreation/Window"] diff --git a/ui/login/character_creation.gd b/ui/login/character_creation.gd new file mode 100644 index 0000000..f3989d1 --- /dev/null +++ b/ui/login/character_creation.gd @@ -0,0 +1,134 @@ +extends HBoxContainer + + +var strength := 5: +	set(value): +		strength = value +		%StatEntryStrength.value = value +		%Polygon.polygon[0] = ( +			Vector2(100, 100) + +			((Vector2(100, 0) - Vector2(100, 100)) / 9.0) * value +		) + +var vitality := 5: +	set(value): +		vitality = value +		%StatEntryVitality.value = value +		%Polygon.polygon[1] = ( +			Vector2(100, 100) + +			((Vector2(200, 50) - Vector2(100, 100)) / 9.0) * value +		) + +var luck := 5: +	set(value): +		luck = value +		%StatEntryLuck.value = value +		%Polygon.polygon[2] = ( +			Vector2(100, 100) + +			((Vector2(200, 150) - Vector2(100, 100)) / 9.0) * value +		) + +var intelligence := 5: +	set(value): +		intelligence = value +		%StatEntryIntelligence.value = value +		%Polygon.polygon[3] = ( +			Vector2(100, 100) + +			((Vector2(100, 200) - Vector2(100, 100)) / 9.0) * value +		) + +var dexterity := 5: +	set(value): +		dexterity = value +		%StatEntryDexterity.value = value +		%Polygon.polygon[4] = ( +			Vector2(100, 100) + +			((Vector2(0, 150) - Vector2(100, 100)) / 9.0) * value +		) + +var agility := 5: +	set(value): +		agility = value +		%StatEntryAgility.value = value +		%Polygon.polygon[5] = ( +			Vector2(100, 100) + +			((Vector2(0, 50) - Vector2(100, 100)) / 9.0) * value +		) + +var head_id := 1: +	set(value): +		head_id = value +		%Head.texture = load( +			"%s/%s/000.png" % [ +				"res://client_data/data/sprite", +				Constants.FilePaths.get_player_head(Constants.Gender.Male, head_id), +			] +		) + +var character_name: String + + +func _on_strength_button_pressed() -> void: +	if strength >= 9: +		return +	 +	strength += 1 +	intelligence -= 1 + + +func _on_vitality_button_pressed() -> void: +	if vitality >= 9: +		return +	 +	vitality += 1 +	dexterity -= 1 + + +func _on_luck_button_pressed() -> void: +	if luck >= 9: +		return +	 +	luck += 1 +	agility -= 1 + + +func _on_intelligence_button_pressed() -> void: +	if intelligence >= 9: +		return +	 +	intelligence += 1 +	strength -= 1 + + +func _on_dexterity_button_pressed() -> void: +	if dexterity >= 9: +		return +	 +	dexterity += 1 +	vitality -= 1 + + +func _on_agility_button_pressed() -> void: +	if agility >= 9: +		return +	 +	agility += 1 +	luck -= 1 + + +func _on_appearance_left_button_pressed() -> void: +	head_id = (head_id - 1) % (42 + 1) +	# TODO: fix + + +func _on_appearance_right_button_pressed() -> void: +	head_id = (head_id + 1) % (42 + 1) + + +func _on_appearance_up_button_pressed() -> void: +	# TODO: change hair color +	pass # Replace with function body. + + +func _on_name_text_changed(new_text: String) -> void: +	character_name = new_text diff --git a/ui/login/character_creation.tscn b/ui/login/character_creation.tscn new file mode 100644 index 0000000..dbecf32 --- /dev/null +++ b/ui/login/character_creation.tscn @@ -0,0 +1,304 @@ +[gd_scene load_steps=21 format=3 uid="uid://di8inwptr42fe"] + +[ext_resource type="Script" uid="uid://w10xfhscfuo0" path="res://ui/login/character_creation.gd" id="1_i6vfx"] +[ext_resource type="Theme" uid="uid://c6y6r8kcnbb10" path="res://ui/theme_clear.tres" id="1_kuhsd"] +[ext_resource type="Texture2D" uid="uid://687s0xq708kn" path="res://client_data/data/texture/유저인터페이스/basic_interface/arw_left.png" id="2_6pdc2"] +[ext_resource type="Texture2D" uid="uid://0to1babdx1js" path="res://client_data/data/texture/유저인터페이스/basic_interface/arw_right.png" id="3_60s0a"] +[ext_resource type="Texture2D" uid="uid://mvgh8pjg7qar" path="res://client_data/data/texture/유저인터페이스/basic_interface/arw_up.png" id="4_ufd68"] +[ext_resource type="Texture2D" uid="uid://ci2liot5s8jnb" path="res://client_data/data/sprite/인간족/머리통/남/16_남/000.png" id="5_6pdc2"] +[ext_resource type="Texture2D" uid="uid://be3ax80esna7b" path="res://client_data/data/sprite/인간족/몸통/남/초보자_남/000.png" id="6_60s0a"] +[ext_resource type="Texture2D" uid="uid://c0kd66xiup6qq" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-str0.png" id="8_6pdc2"] +[ext_resource type="Texture2D" uid="uid://c5k65ct7at0ns" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-str1.png" id="9_60s0a"] +[ext_resource type="Texture2D" uid="uid://cnpgjr7mj4j14" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-vit0.png" id="10_6pdc2"] +[ext_resource type="Texture2D" uid="uid://b4878jg8ex7tm" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-vit1.png" id="11_60s0a"] +[ext_resource type="Texture2D" uid="uid://iviinm4jtx2j" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-luk0.png" id="12_6pdc2"] +[ext_resource type="Texture2D" uid="uid://dx0w5jac6n12s" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-luk1.png" id="13_60s0a"] +[ext_resource type="PackedScene" uid="uid://cff164qwvlsqd" path="res://ui/login/stat_entry.tscn" id="14_b1a0f"] +[ext_resource type="Texture2D" uid="uid://qrudl7mwwjvq" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-int0.png" id="14_ufd68"] +[ext_resource type="Texture2D" uid="uid://7vxidv2eb4uk" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-int1.png" id="15_uors6"] +[ext_resource type="Texture2D" uid="uid://bd20v4ovvst4r" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-dex0.png" id="16_kbej0"] +[ext_resource type="Texture2D" uid="uid://cyry27r8wpd7i" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-dex1.png" id="17_1iw4y"] +[ext_resource type="Texture2D" uid="uid://cd7riu7j5lyri" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-agi0.png" id="18_225jb"] +[ext_resource type="Texture2D" uid="uid://dcotmlbpx0iaa" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-agi1.png" id="19_b1a0f"] + +[node name="CharacterCreation" type="HBoxContainer"] +script = ExtResource("1_i6vfx") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 +size_flags_vertical = 8 + +[node name="Control" type="Control" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 20) +layout_mode = 2 + +[node name="AppearanceLeftButton" type="TextureButton" parent="VBoxContainer/Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -5.5 +offset_right = 11.0 +offset_bottom = 5.5 +grow_vertical = 2 +scale = Vector2(1.5, 1.5) +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("2_6pdc2") + +[node name="AppearanceRightButton" type="TextureButton" parent="VBoxContainer/Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -11.0 +offset_top = -5.5 +offset_bottom = 5.5 +grow_horizontal = 0 +grow_vertical = 2 +scale = Vector2(1.5, 1.5) +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("3_60s0a") + +[node name="AppearanceUpButton" type="TextureButton" parent="VBoxContainer/Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -5.5 +offset_top = -8.0 +offset_right = 5.5 +offset_bottom = 3.0 +grow_horizontal = 2 +scale = Vector2(1.5, 1.5) +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("4_ufd68") + +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = -8 + +[node name="Head" type="TextureRect" parent="VBoxContainer/VBoxContainer"] +unique_name_in_owner = true +z_index = 1 +texture_filter = 1 +layout_mode = 2 +texture = ExtResource("5_6pdc2") +stretch_mode = 5 + +[node name="Body" type="TextureRect" parent="VBoxContainer/VBoxContainer"] +texture_filter = 1 +layout_mode = 2 +texture = ExtResource("6_60s0a") +stretch_mode = 5 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"] +texture_filter = 1 +layout_mode = 2 +theme = ExtResource("1_kuhsd") +theme_type_variation = &"LabelLabel" +text = "Name" + +[node name="Name" type="LineEdit" parent="VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 4 +theme = ExtResource("1_kuhsd") + +[node name="Control" type="Control" parent="."] +custom_minimum_size = Vector2(280, 280) +layout_mode = 2 + +[node name="Container" type="Node2D" parent="Control"] +position = Vector2(40, 40) + +[node name="Polygon" type="Polygon2D" parent="Control/Container"] +unique_name_in_owner = true +color = Color(0.776471, 0.807843, 0.905882, 1) +polygon = PackedVector2Array(100, 50, 148, 76, 148, 124, 100, 150, 52, 124, 52, 76) +uv = PackedVector2Array(100, 0, 200, 50, 200, 150, 100, 200, 0, 150, 0, 75) + +[node name="LineCircle" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(100, 0, 200, 50, 200, 150, 100, 200, 0, 150, 0, 50) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="LineNS" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(100, 0, 100, 200) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="LineNESW" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(200, 50, 0, 150) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="LineNWSE" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(0, 50, 200, 150) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="StrengthButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -19.0 +offset_top = 1.0 +offset_right = 21.0 +offset_bottom = 41.0 +grow_horizontal = 2 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("8_6pdc2") +texture_pressed = ExtResource("9_60s0a") + +[node name="VitalityButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -42.9999 +offset_top = 67.0 +offset_right = -2.99994 +offset_bottom = 107.0 +grow_horizontal = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("10_6pdc2") +texture_pressed = ExtResource("11_60s0a") + +[node name="LuckButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -44.0 +offset_top = -101.0 +offset_right = -4.0 +offset_bottom = -61.0 +grow_horizontal = 0 +grow_vertical = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("12_6pdc2") +texture_pressed = ExtResource("13_60s0a") + +[node name="IntelligenceButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -18.0 +offset_top = -40.0 +offset_right = 22.0 +grow_horizontal = 2 +grow_vertical = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("14_ufd68") +texture_pressed = ExtResource("15_uors6") + +[node name="DexterityButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_left = 9.0 +offset_top = -104.0 +offset_right = 49.0 +offset_bottom = -64.0 +grow_vertical = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("16_kbej0") +texture_pressed = ExtResource("17_1iw4y") + +[node name="AgilityButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +offset_left = 8.0 +offset_top = 67.0 +offset_right = 48.0 +offset_bottom = 107.0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("18_225jb") +texture_pressed = ExtResource("19_b1a0f") + +[node name="VBoxContainer2" type="VBoxContainer" parent="."] +layout_mode = 2 +theme_override_constants/separation = 1 + +[node name="StatEntryStrength" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "STR" +value = 5 +value_alignment = 1 + +[node name="StatEntryAgility" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "AGI" +value = 5 +value_alignment = 1 + +[node name="StatEntryVitality" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "VIT" +value = 5 +value_alignment = 1 + +[node name="StatEntryIntelligence" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "INT" +value = 5 +value_alignment = 1 + +[node name="StatEntryDexterity" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "DEX" +value = 5 +value_alignment = 1 + +[node name="StatEntryLuck" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "LUK" +value = 5 +value_alignment = 1 + +[connection signal="pressed" from="VBoxContainer/Control/AppearanceLeftButton" to="." method="_on_appearance_left_button_pressed"] +[connection signal="pressed" from="VBoxContainer/Control/AppearanceRightButton" to="." method="_on_appearance_right_button_pressed"] +[connection signal="pressed" from="VBoxContainer/Control/AppearanceUpButton" to="." method="_on_appearance_up_button_pressed"] +[connection signal="text_changed" from="VBoxContainer/HBoxContainer/Name" to="." method="_on_name_text_changed"] +[connection signal="pressed" from="Control/StrengthButton" to="." method="_on_strength_button_pressed"] +[connection signal="pressed" from="Control/VitalityButton" to="." method="_on_vitality_button_pressed"] +[connection signal="pressed" from="Control/LuckButton" to="." method="_on_luck_button_pressed"] +[connection signal="pressed" from="Control/IntelligenceButton" to="." method="_on_intelligence_button_pressed"] +[connection signal="pressed" from="Control/DexterityButton" to="." method="_on_dexterity_button_pressed"] +[connection signal="pressed" from="Control/AgilityButton" to="." method="_on_agility_button_pressed"] diff --git a/ui/login/character_selection_item.tscn b/ui/login/character_selection_item.tscn index de28392..0dab44c 100644 --- a/ui/login/character_selection_item.tscn +++ b/ui/login/character_selection_item.tscn @@ -1,10 +1,10 @@  [gd_scene load_steps=7 format=3 uid="uid://rrd131rq74n5"]  [ext_resource type="Script" uid="uid://bsglhorusc7ug" path="res://ui/login/character_selection_item.gd" id="1_25yur"] -[ext_resource type="Texture2D" uid="uid://danymuvfjf4o1" path="res://client_data/data/sprite/Àΰ£Á·/¸Ó¸®Åë/³²/16_³²/000.png" id="2_aqbfs"] -[ext_resource type="Texture2D" uid="uid://cwqgdd00sf7pu" path="res://client_data/data/sprite/Àΰ£Á·/¸öÅë/³²/Ãʺ¸ÀÚ_³²/000.png" id="3_xv3pn"] +[ext_resource type="Texture2D" uid="uid://ci2liot5s8jnb" path="res://client_data/data/sprite/인간족/머리통/남/16_남/000.png" id="2_u21ok"] +[ext_resource type="Texture2D" uid="uid://be3ax80esna7b" path="res://client_data/data/sprite/인간족/몸통/남/초보자_남/000.png" id="3_vhrt2"]  [ext_resource type="PackedScene" uid="uid://knmmuhon34rh" path="res://ui/bmp_texture_rect.tscn" id="4_vhrt2"] -[ext_resource type="Texture2D" uid="uid://1s8lrydoctbv" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/box_select.png" id="5_vhrt2"] +[ext_resource type="Texture2D" uid="uid://bfe86fb6ytqg3" path="res://client_data/data/texture/유저인터페이스/login_interface/box_select.png" id="5_vhrt2"]  [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u21ok"]  bg_color = Color(0, 0, 0, 0.0980392) @@ -43,14 +43,14 @@ unique_name_in_owner = true  z_index = 1  texture_filter = 1  layout_mode = 2 -texture = ExtResource("2_aqbfs") +texture = ExtResource("2_u21ok")  stretch_mode = 3  [node name="Body" type="TextureRect" parent="MarginContainer/VBoxContainer/Sprite"]  unique_name_in_owner = true  texture_filter = 1  layout_mode = 2 -texture = ExtResource("3_xv3pn") +texture = ExtResource("3_vhrt2")  stretch_mode = 3  [node name="SelectionBorder" parent="." instance=ExtResource("4_vhrt2")] diff --git a/ui/login/login_character_selection_list.gd b/ui/login/login_character_selection_list.gd index bd19fa1..7ff43cf 100644 --- a/ui/login/login_character_selection_list.gd +++ b/ui/login/login_character_selection_list.gd @@ -76,6 +76,11 @@ func set_login_character_list(value: LoginCharacterList) -> void:  	draw() +func add_character_information(info: CharacterInformation) -> void: +	login_character_list.add_character_information(info) +	draw() + +  func draw():  	if not login_character_list:  		return diff --git a/ui/login/login_character_selection_list.tscn b/ui/login/login_character_selection_list.tscn index 02a9dc2..373dcde 100644 --- a/ui/login/login_character_selection_list.tscn +++ b/ui/login/login_character_selection_list.tscn @@ -4,12 +4,12 @@  [ext_resource type="Script" uid="uid://dmch4gi1khn2r" path="res://ui/login/login_character_selection_list.gd" id="1_togb6"]  [ext_resource type="PackedScene" uid="uid://rrd131rq74n5" path="res://ui/login/character_selection_item.tscn" id="2_k142l"]  [ext_resource type="PackedScene" uid="uid://cjcm2mai50thr" path="res://ui/bmp_texture_button.tscn" id="2_s7n6r"] -[ext_resource type="Texture2D" uid="uid://cey66pn46da80" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_l_out.png" id="3_wnv6e"] -[ext_resource type="Texture2D" uid="uid://bbs77ppnvcm23" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_l_press.png" id="4_rdaw5"] -[ext_resource type="Texture2D" uid="uid://c4supu7w8gabw" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_l_over.png" id="5_1vggc"] -[ext_resource type="Texture2D" uid="uid://dqweltumn8n7t" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_r_out.png" id="7_wnv6e"] -[ext_resource type="Texture2D" uid="uid://bsdygckmj667w" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_r_press.png" id="8_rdaw5"] -[ext_resource type="Texture2D" uid="uid://dqdmks4uak1go" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_r_over.png" id="9_1vggc"] +[ext_resource type="Texture2D" uid="uid://c1cgkiyacvr4k" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_l_out.png" id="3_wnv6e"] +[ext_resource type="Texture2D" uid="uid://dar08umwslovr" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_l_press.png" id="4_wnv6e"] +[ext_resource type="Texture2D" uid="uid://b38efa2wsrsiw" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_l_over.png" id="5_wnv6e"] +[ext_resource type="Texture2D" uid="uid://cjmj1etf1wth7" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_r_out.png" id="7_1vggc"] +[ext_resource type="Texture2D" uid="uid://deorq2yjwe4ie" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_r_press.png" id="8_1oc8k"] +[ext_resource type="Texture2D" uid="uid://ccfm5ls854xpf" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_r_over.png" id="9_muwiy"]  [node name="LoginCharacterSelectionList" type="VBoxContainer"]  theme_override_constants/separation = 32 @@ -31,8 +31,8 @@ unique_name_in_owner = true  texture_filter = 0  layout_mode = 2  texture_normal = ExtResource("3_wnv6e") -texture_pressed = ExtResource("4_rdaw5") -texture_hover = ExtResource("5_1vggc") +texture_pressed = ExtResource("4_wnv6e") +texture_hover = ExtResource("5_wnv6e")  stretch_mode = 5  [node name="CharacterList" type="HBoxContainer" parent="MarginContainer/HBoxContainer"] @@ -50,9 +50,9 @@ layout_mode = 2  unique_name_in_owner = true  texture_filter = 0  layout_mode = 2 -texture_normal = ExtResource("7_wnv6e") -texture_pressed = ExtResource("8_rdaw5") -texture_hover = ExtResource("9_1vggc") +texture_normal = ExtResource("7_1vggc") +texture_pressed = ExtResource("8_1oc8k") +texture_hover = ExtResource("9_muwiy")  stretch_mode = 5  [node name="CharacterSelectionStatus" parent="." instance=ExtResource("1_5anyi")] diff --git a/ui/login/stat_entry.gd b/ui/login/stat_entry.gd new file mode 100644 index 0000000..6d79ac0 --- /dev/null +++ b/ui/login/stat_entry.gd @@ -0,0 +1,18 @@ +@tool +extends HBoxContainer + + +@export var label: String: +	set(value): +		label = value +		$Label.text = value + +@export var value: int: +	set(v): +		value = v +		$Value.text = str(v) + +@export var value_alignment: HorizontalAlignment: +	set(value): +		value_alignment = value +		$Value.horizontal_alignment = value diff --git a/ui/login/stat_entry.tscn b/ui/login/stat_entry.tscn new file mode 100644 index 0000000..91e9abe --- /dev/null +++ b/ui/login/stat_entry.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://cff164qwvlsqd"] + +[ext_resource type="Theme" uid="uid://c6y6r8kcnbb10" path="res://ui/theme_clear.tres" id="1_3i1yo"] +[ext_resource type="Script" uid="uid://bjdgrc1kwcbtj" path="res://ui/login/stat_entry.gd" id="1_vt1a4"] + +[node name="StatEntry" type="HBoxContainer"] +offset_right = 169.0 +offset_bottom = 20.0 +script = ExtResource("1_vt1a4") + +[node name="Label" type="Label" parent="."] +custom_minimum_size = Vector2(45, 0) +layout_mode = 2 +theme = ExtResource("1_3i1yo") +theme_type_variation = &"CharacterSelectionStatusLabel" +text = "Label" + +[node name="Value" type="Label" parent="."] +custom_minimum_size = Vector2(120, 0) +layout_mode = 2 +size_flags_horizontal = 3 +theme = ExtResource("1_3i1yo") +theme_type_variation = &"CharacterSelectionStatusLabel2" +text = "value" diff --git a/ui/message_window.tscn b/ui/message_window.tscn index 5c195bf..b46fbe3 100644 --- a/ui/message_window.tscn +++ b/ui/message_window.tscn @@ -4,9 +4,9 @@  [ext_resource type="PackedScene" uid="uid://cjcm2mai50thr" path="res://ui/bmp_texture_button.tscn" id="2_3gmlp"]  [ext_resource type="Theme" uid="uid://c6y6r8kcnbb10" path="res://ui/theme_clear.tres" id="2_prcjf"]  [ext_resource type="Script" uid="uid://o36qsov00kwb" path="res://ui/message_window.gd" id="2_rr7kw"] -[ext_resource type="Texture2D" uid="uid://b1yjeotua8xj5" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/btn_close.bmp" id="3_prcjf"] -[ext_resource type="Texture2D" uid="uid://d4mycn8dag5yl" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/inventory/btn_close_press.bmp" id="4_rr7kw"] -[ext_resource type="Texture2D" uid="uid://ds70r0x5vvy6t" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/btn_close_a.bmp" id="5_ql6vf"] +[ext_resource type="Texture2D" uid="uid://b0o61r0oau4k7" path="res://client_data/data/texture/유저인터페이스/btn_close.png" id="5_m5dfh"] +[ext_resource type="Texture2D" uid="uid://6sx7uu2xjc4" path="res://client_data/data/texture/유저인터페이스/btn_close_b.png" id="6_m5dfh"] +[ext_resource type="Texture2D" uid="uid://bdxjoywe2tdif" path="res://client_data/data/texture/유저인터페이스/btn_close_a.png" id="7_a7gey"]  [node name="MessageWindow" instance=ExtResource("1_m7647")]  offset_right = 63.0 @@ -40,8 +40,8 @@ text = "Message"  unique_name_in_owner = true  layout_mode = 2  size_flags_horizontal = 8 -texture_normal = ExtResource("3_prcjf") -texture_pressed = ExtResource("4_rr7kw") -texture_hover = ExtResource("5_ql6vf") +texture_normal = ExtResource("5_m5dfh") +texture_pressed = ExtResource("6_m5dfh") +texture_hover = ExtResource("7_a7gey")  [connection signal="pressed" from="VBoxContainer/ButtonBar/ButtonBarElements/CloseButtonBottom" to="." method="_on_close_button_bottom_pressed"] diff --git a/ui/theme.tres b/ui/theme.tres index 69ad428..a2a513d 100644 --- a/ui/theme.tres +++ b/ui/theme.tres @@ -1,29 +1,20 @@ -[gd_resource type="Theme" load_steps=9 format=3 uid="uid://c5sm3yvuakj3b"] - -[ext_resource type="Texture2D" uid="uid://34bqfgx41tf0" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/bt_otp_over.png" id="1_iqtc0"] -[ext_resource type="Texture2D" uid="uid://cehi7txcq4p2q" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/name-edit.bmp" id="1_rqugq"] -[ext_resource type="Texture2D" uid="uid://b63yrv7hceon4" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/bt_otp_normal.png" id="2_7any1"] -[ext_resource type="Texture2D" uid="uid://yew2ev1s10pk" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/bt_otp_press.png" id="3_3fgq6"] +[gd_resource type="Theme" load_steps=5 format=3 uid="uid://c5sm3yvuakj3b"]  [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_y5ki2"] -texture = ExtResource("1_iqtc0")  [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_rtqkv"]  content_margin_left = 4.0  content_margin_top = 2.0  content_margin_right = 4.0  content_margin_bottom = 2.0 -texture = ExtResource("2_7any1")  [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_47c11"] -texture = ExtResource("3_3fgq6")  [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_jf26r"]  content_margin_left = 4.0  content_margin_top = 4.0  content_margin_right = 4.0  content_margin_bottom = 4.0 -texture = ExtResource("1_rqugq")  [resource]  Button/colors/font_color = Color(0.133333, 0.133333, 0.133333, 1) diff --git a/ui/theme_clear.tres b/ui/theme_clear.tres index f5028a8..7fa57f0 100644 --- a/ui/theme_clear.tres +++ b/ui/theme_clear.tres @@ -52,7 +52,7 @@ content_margin_left = 3.0  content_margin_top = 0.0  content_margin_right = 3.0  content_margin_bottom = 0.0 -bg_color = Color(0.94902, 0.94902, 0.94902, 1) +bg_color = Color(0.980392, 0.980392, 0.980392, 1)  border_width_left = 1  border_width_top = 1  border_width_right = 1 diff --git a/ui/window.tscn b/ui/window.tscn index d27d7c5..f0c3d95 100644 --- a/ui/window.tscn +++ b/ui/window.tscn @@ -2,17 +2,17 @@  [ext_resource type="PackedScene" uid="uid://knmmuhon34rh" path="res://ui/bmp_texture_rect.tscn" id="1_4qpm3"]  [ext_resource type="Script" uid="uid://qdg2tjk8xmjt" path="res://ui/window.gd" id="1_hfgic"] -[ext_resource type="Texture2D" uid="uid://22px3uxdg48t" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/titlebar_left.png" id="3_74c65"] -[ext_resource type="Texture2D" uid="uid://dc2f7tx5xsico" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/titlebar_mid.bmp" id="3_mngfx"] -[ext_resource type="Texture2D" uid="uid://dkqx0rjvi6aba" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/titlebar_right.png" id="5_qkejn"] -[ext_resource type="Texture2D" uid="uid://clqwl83uoxeue" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/btnbar_mid1.bmp" id="6_mnaxm"] -[ext_resource type="Texture2D" uid="uid://dmuuq7siyfv4r" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/sys_base_off.png" id="6_uftm1"] +[ext_resource type="Texture2D" uid="uid://b40mcjrv0d0gi" path="res://client_data/data/texture/유저인터페이스/basic_interface/titlebar_left.png" id="3_74c65"] +[ext_resource type="Texture2D" uid="uid://b3d3jmq8eso2v" path="res://client_data/data/texture/유저인터페이스/basic_interface/titlebar_mid.png" id="4_qkejn"] +[ext_resource type="Texture2D" uid="uid://d22mmihwnjj0c" path="res://client_data/data/texture/유저인터페이스/basic_interface/titlebar_right.png" id="5_uftm1"] +[ext_resource type="Texture2D" uid="uid://dwv8ca3u5xk3o" path="res://client_data/data/texture/유저인터페이스/basic_interface/sys_base_off.png" id="6_74c65"]  [ext_resource type="PackedScene" uid="uid://cjcm2mai50thr" path="res://ui/bmp_texture_button.tscn" id="7_m42e5"] -[ext_resource type="Texture2D" uid="uid://dtaegqi7vx4ia" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/big_sys_close_off.png" id="8_vjbfl"] -[ext_resource type="Texture2D" uid="uid://jwguf7fj0iyx" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/big_sys_close_on.png" id="9_kh8ey"] -[ext_resource type="Texture2D" uid="uid://dif01o7ri7qop" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/btnbar_left1.png" id="10_ug6hj"] -[ext_resource type="Texture2D" uid="uid://bp60ikxqixf6q" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/btnbar_right1.png" id="12_xgidv"] -[ext_resource type="Texture2D" uid="uid://ch1t3k18kvhtk" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/basic_interface/btn_comparison_resize.png" id="13_sy0l2"] +[ext_resource type="Texture2D" uid="uid://dt2t71nhoaelo" path="res://client_data/data/texture/유저인터페이스/basic_interface/big_sys_close_off.png" id="8_74c65"] +[ext_resource type="Texture2D" uid="uid://dguxqcl61xj50" path="res://client_data/data/texture/유저인터페이스/basic_interface/big_sys_close_on.png" id="9_qkejn"] +[ext_resource type="Texture2D" uid="uid://k78jsflcoc84" path="res://client_data/data/texture/유저인터페이스/basic_interface/btnbar_left1.png" id="10_74c65"] +[ext_resource type="Texture2D" uid="uid://bn66ekthd5657" path="res://client_data/data/texture/유저인터페이스/basic_interface/btnbar_mid1.png" id="11_qkejn"] +[ext_resource type="Texture2D" uid="uid://bwi568g2qyf3o" path="res://client_data/data/texture/유저인터페이스/basic_interface/btnbar_right1.png" id="12_uftm1"] +[ext_resource type="Texture2D" uid="uid://cygyjjv5s6dx0" path="res://client_data/data/texture/유저인터페이스/basic_interface/btn_comparison_resize.png" id="13_74c65"]  [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fufdc"]  bg_color = Color(1, 1, 1, 1) @@ -45,11 +45,11 @@ texture = ExtResource("3_74c65")  [node name="Middle" parent="VBoxContainer/TitleBar/TitleBarBackground" instance=ExtResource("1_4qpm3")]  layout_mode = 2  size_flags_horizontal = 3 -texture = ExtResource("3_mngfx") +texture = ExtResource("4_qkejn")  [node name="Right" parent="VBoxContainer/TitleBar/TitleBarBackground" instance=ExtResource("1_4qpm3")]  layout_mode = 2 -texture = ExtResource("5_qkejn") +texture = ExtResource("5_uftm1")  [node name="TitleBarElements" type="MarginContainer" parent="VBoxContainer/TitleBar"]  unique_name_in_owner = true @@ -67,15 +67,15 @@ theme_override_constants/margin_right = 2  [node name="BMPTextureRect" parent="VBoxContainer/TitleBar/TitleBarButtons" instance=ExtResource("1_4qpm3")]  layout_mode = 2  size_flags_horizontal = 0 -texture = ExtResource("6_uftm1") +texture = ExtResource("6_74c65")  stretch_mode = 3  [node name="CloseButton" parent="VBoxContainer/TitleBar/TitleBarButtons" instance=ExtResource("7_m42e5")]  unique_name_in_owner = true  layout_mode = 2  size_flags_horizontal = 8 -texture_normal = ExtResource("8_vjbfl") -texture_hover = ExtResource("9_kh8ey") +texture_normal = ExtResource("8_74c65") +texture_hover = ExtResource("9_qkejn")  stretch_mode = 5  [node name="Body" type="PanelContainer" parent="VBoxContainer"] @@ -94,16 +94,16 @@ theme_override_constants/separation = 0  [node name="BMPTextureRect" parent="VBoxContainer/ButtonBar/ButtonBarBackground" instance=ExtResource("1_4qpm3")]  layout_mode = 2 -texture = ExtResource("10_ug6hj") +texture = ExtResource("10_74c65")  [node name="BMPTextureRect2" parent="VBoxContainer/ButtonBar/ButtonBarBackground" instance=ExtResource("1_4qpm3")]  layout_mode = 2  size_flags_horizontal = 3 -texture = ExtResource("6_mnaxm") +texture = ExtResource("11_qkejn")  [node name="BMPTextureRect3" parent="VBoxContainer/ButtonBar/ButtonBarBackground" instance=ExtResource("1_4qpm3")]  layout_mode = 2 -texture = ExtResource("12_xgidv") +texture = ExtResource("12_uftm1")  [node name="ButtonBarElements" type="MarginContainer" parent="VBoxContainer/ButtonBar"]  unique_name_in_owner = true @@ -120,7 +120,7 @@ layout_mode = 2  size_flags_horizontal = 8  size_flags_vertical = 8  mouse_default_cursor_shape = 2 -texture = ExtResource("13_sy0l2") +texture = ExtResource("13_74c65")  stretch_mode = 5  [connection signal="gui_input" from="VBoxContainer/TitleBar" to="." method="_on_title_bar_gui_input"] | 
