diff --git a/Scenes/GamePaths.gd b/Scenes/GamePaths.gd index 3dcf5134..5b87c27c 100644 --- a/Scenes/GamePaths.gd +++ b/Scenes/GamePaths.gd @@ -197,7 +197,7 @@ func set_keeperfx_version(): var script = "" script += "cd " + EXECUTABLE_PATH.get_base_dir() + ";" script += "exiftool -ProductVersion -n keeperfx.exe | awk -F ': ' '{print $2}'" - var exit_code = OS.execute("bash", ["-c", script], true, output, true) + var _exit_code = OS.execute("bash", ["-c", script], true, output, true) #print("Exit code: ", exit_code) #print("Output: ", output) #print(script) diff --git a/Scenes/ImageAsMapDialog.gd b/Scenes/ImageAsMapDialog.gd index e7312cb5..3b33a8fa 100644 --- a/Scenes/ImageAsMapDialog.gd +++ b/Scenes/ImageAsMapDialog.gd @@ -125,11 +125,8 @@ func _on_slab_button_pressed(buttonID): oMessage.quick("Must first click on a pixel within the image.") return - var slabID = buttonID.get_meta("slabID") - - # Many colours can be assigned to one Button. # Many buttons CANNOT be assigned to one colour. diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index 7844f295..79bb2b52 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=180 format=2] +[gd_scene load_steps=183 format=2] [ext_resource path="res://Scenes/SlabStyle.gd" type="Script" id=1] [ext_resource path="res://Scenes/SlabPlacement.gd" type="Script" id=2] @@ -158,6 +158,9 @@ [ext_resource path="res://Art/HelpIcon.png" type="Texture" id=156] [ext_resource path="res://Scenes/AddCustomSlabWindow.gd" type="Script" id=157] [ext_resource path="res://Scenes/ConstructedVariations.gd" type="Script" id=158] +[ext_resource path="res://dk_images/landviews/rgmap00.png" type="Texture" id=159] +[ext_resource path="res://Scenes/MapCoordinatesWindow.gd" type="Script" id=160] +[ext_resource path="res://dk_images/landviews/ensign_lvl5.png" type="Texture" id=161] [sub_resource type="TileSet" id=1] 0/name = "Wibble_0.png 0" @@ -4268,15 +4271,51 @@ size_flags_vertical = 1 text = "Flag position" valign = 1 -[node name="EnsignPositionLineEdit" type="LineEdit" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition"] +[node name="HBoxContainer2" type="HBoxContainer" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition"] margin_left = 305.0 margin_right = 607.0 margin_bottom = 31.0 +size_flags_horizontal = 3 + +[node name="Spacing" type="Control" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2"] +margin_right = 79.0 +margin_bottom = 31.0 +size_flags_horizontal = 3 + +[node name="EnsignPositionX" type="LineEdit" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2"] +margin_left = 83.0 +margin_right = 141.0 +margin_bottom = 31.0 grow_horizontal = 2 grow_vertical = 2 -size_flags_horizontal = 7 +size_flags_horizontal = 5 +text = "0" align = 1 +[node name="Label" type="Label" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2"] +margin_left = 145.0 +margin_top = 5.0 +margin_right = 156.0 +margin_bottom = 26.0 +text = "x" + +[node name="EnsignPositionY" type="LineEdit" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2"] +margin_left = 160.0 +margin_right = 218.0 +margin_bottom = 31.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 5 +text = "0" +align = 1 + +[node name="OpenMapCoordButton" type="Button" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2"] +margin_left = 222.0 +margin_right = 302.0 +margin_bottom = 31.0 +size_flags_horizontal = 3 +text = "Map" + [node name="HBoxEnsignZoom" type="HBoxContainer" parent="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer"] visible = false margin_top = 291.0 @@ -6688,6 +6727,99 @@ margin_bottom = 227.0 group = ExtResource( 155 ) text = "Fake Slabs (.une)" +[node name="MapCoordinatesWindow" type="WindowDialog" parent="Ui/UiSystem"] +visible = true +margin_left = -1480.0 +margin_top = -1560.0 +margin_right = -235.0 +margin_bottom = -697.0 +mouse_filter = 1 +window_title = "Map Coordinates" +resizable = true +script = ExtResource( 160 ) + +[node name="MarginContainer" type="MarginContainer" parent="Ui/UiSystem/MapCoordinatesWindow"] +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 2 +custom_constants/margin_right = 10 +custom_constants/margin_top = 10 +custom_constants/margin_left = 10 +custom_constants/margin_bottom = 10 + +[node name="VBoxContainer" type="VBoxContainer" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer"] +margin_left = 10.0 +margin_top = 10.0 +margin_right = 1235.0 +margin_bottom = 853.0 +mouse_filter = 2 + +[node name="LandviewAspectRatioContainer" type="AspectRatioContainer" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer"] +margin_right = 1225.0 +margin_bottom = 812.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="LandviewImage" type="TextureRect" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/LandviewAspectRatioContainer"] +margin_left = 206.5 +margin_right = 1018.5 +margin_bottom = 812.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = ExtResource( 159 ) +expand = true +stretch_mode = 1 + +[node name="EnsignFlagImg" type="TextureRect" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/LandviewAspectRatioContainer/LandviewImage"] +margin_right = 31.0 +margin_bottom = 63.0 +rect_pivot_offset = Vector2( 16, 62 ) +mouse_filter = 2 +texture = ExtResource( 161 ) +stretch_mode = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer"] +margin_top = 816.0 +margin_right = 1225.0 +margin_bottom = 843.0 +alignment = 1 + +[node name="ChangeImageCoordButton" type="Button" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/HBoxContainer"] +margin_left = 470.0 +margin_right = 570.0 +margin_bottom = 27.0 +rect_min_size = Vector2( 100, 0 ) +size_flags_horizontal = 4 +text = "Image" + +[node name="LandViewFlagPosLabel" type="Label" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/HBoxContainer"] +margin_left = 574.0 +margin_top = 3.0 +margin_right = 650.0 +margin_bottom = 24.0 +text = "640, 480" + +[node name="CloseMapCoordButton" type="Button" parent="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/HBoxContainer"] +margin_left = 654.0 +margin_right = 754.0 +margin_bottom = 27.0 +rect_min_size = Vector2( 100, 0 ) +size_flags_horizontal = 4 +text = "Close" + +[node name="ChooseLandviewImageFileDialog" type="FileDialog" parent="Ui/UiSystem"] +margin_right = 638.0 +margin_bottom = 538.0 +rect_min_size = Vector2( 300, 105 ) +window_title = "Select a .png image" +resizable = true +dialog_hide_on_ok = true +mode_overrides_title = false +mode = 0 +access = 2 +filters = PoolStringArray( "*.png" ) +show_hidden_files = true + [node name="UiMessages" type="Control" parent="Ui"] anchor_right = 1.0 anchor_bottom = 1.0 @@ -7256,7 +7388,9 @@ script = SubResource( 20 ) [connection signal="value_changed" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxPlayers/PlayersSpinBox" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_PlayersSpinBox_value_changed"] [connection signal="text_changed" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxSpeech/SpeechLineEdit" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_SpeechLineEdit_text_changed"] [connection signal="text_changed" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxLandView/LandViewLineEdit" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_LandViewLineEdit_text_changed"] -[connection signal="text_changed" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/EnsignPositionLineEdit" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_EnsignPositionLineEdit_text_changed"] +[connection signal="focus_exited" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2/EnsignPositionX" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_EnsignPositionX_focus_exited"] +[connection signal="focus_exited" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2/EnsignPositionY" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_EnsignPositionY_focus_exited"] +[connection signal="pressed" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignPosition/HBoxContainer2/OpenMapCoordButton" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_OpenMapCoordButton_pressed"] [connection signal="text_changed" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxEnsignZoom/EnsignZoomLineEdit" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_EnsignZoomLineEdit_text_changed"] [connection signal="item_selected" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxOptions/OptionsOptionButton" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_OptionsOptionButton_item_selected"] [connection signal="text_changed" from="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties/VBoxContainer/AdvancedMapProperties/VBoxContainer/HBoxNameID/NameIDLineEdit" to="Ui/UiSystem/MapSettingsWindow/MapSettingsTabs/MapProperties" method="_on_NameIDLineEdit_text_changed"] @@ -7348,6 +7482,12 @@ script = SubResource( 20 ) [connection signal="value_changed" from="Ui/UiSystem/ResizeCurrentMapSize/MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer/ResizeFillWithID" to="Ui/UiSystem/ResizeCurrentMapSize" method="_on_ResizeFillWithID_value_changed"] [connection signal="pressed" from="Ui/UiSystem/ResizeCurrentMapSize/MarginContainer/VBoxContainer/ResizeApplyButton" to="Ui/UiSystem/ResizeCurrentMapSize" method="_on_ResizeApplyButton_pressed"] [connection signal="visibility_changed" from="Ui/UiSystem/GridDataWindow" to="Game2D/AnalyzeGrids" method="_on_GridDataWindow_visibility_changed"] +[connection signal="visibility_changed" from="Ui/UiSystem/MapCoordinatesWindow" to="Ui/UiSystem/MapCoordinatesWindow" method="_on_MapCoordinatesWindow_visibility_changed"] +[connection signal="gui_input" from="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/LandviewAspectRatioContainer/LandviewImage" to="Ui/UiSystem/MapCoordinatesWindow" method="_on_LandviewImage_gui_input"] +[connection signal="resized" from="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/LandviewAspectRatioContainer/LandviewImage" to="Ui/UiSystem/MapCoordinatesWindow" method="_on_LandviewImage_resized"] +[connection signal="pressed" from="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/HBoxContainer/ChangeImageCoordButton" to="Ui/UiSystem/MapCoordinatesWindow" method="_on_ChangeImageCoordButton_pressed"] +[connection signal="pressed" from="Ui/UiSystem/MapCoordinatesWindow/MarginContainer/VBoxContainer/HBoxContainer/CloseMapCoordButton" to="Ui/UiSystem/MapCoordinatesWindow" method="_on_CloseMapCoordButton_pressed"] +[connection signal="file_selected" from="Ui/UiSystem/ChooseLandviewImageFileDialog" to="Ui/UiSystem/MapCoordinatesWindow" method="_on_ChooseLandviewImageFileDialog_file_selected"] [connection signal="timeout" from="Ui/UiMessages/FPScounter/Timer" to="Ui/UiMessages/FPScounter" method="_on_Wait_timeout"] [connection signal="about_to_show" from="Ui/UiPreviewExporter/ExportPreview" to="Ui/UiPreviewExporter/ExportPreview" method="_on_ExportPreview_about_to_show"] [connection signal="hide" from="Ui/UiPreviewExporter/ExportPreview" to="Ui/UiPreviewExporter/ExportPreview" method="_on_ExportPreview_hide"] diff --git a/Scenes/MapCoordinatesWindow.gd b/Scenes/MapCoordinatesWindow.gd new file mode 100644 index 00000000..67fb0c46 --- /dev/null +++ b/Scenes/MapCoordinatesWindow.gd @@ -0,0 +1,104 @@ +extends WindowDialog + +onready var oMapProperties = Nodelist.list["oMapProperties"] +onready var oEnsignFlagImg = Nodelist.list["oEnsignFlagImg"] +onready var oLandviewAspectRatioContainer = Nodelist.list["oLandviewAspectRatioContainer"] +onready var oLandviewImage = Nodelist.list["oLandviewImage"] +onready var oEnsignPositionX = Nodelist.list["oEnsignPositionX"] +onready var oEnsignPositionY = Nodelist.list["oEnsignPositionY"] +onready var oMessage = Nodelist.list["oMessage"] +onready var oChooseLandviewImageFileDialog = Nodelist.list["oChooseLandviewImageFileDialog"] +onready var oLandViewFlagPosLabel = Nodelist.list["oLandViewFlagPosLabel"] + +var imageData = Image.new() +var textureData = ImageTexture.new() + +var image_resolution = Vector2() +var holding_left_click = false +var normalized_flag_position = Vector2(0.5, 0.5) # Default to center + + +func _ready(): + update_image_resolution() + update_aspect_ratio() + update_flag_position() + + +func _on_LandviewImage_resized(): + update_flag_size() + update_flag_position() + + +func update_image_resolution(): + image_resolution = oLandviewImage.texture.get_data().get_size() + + +func update_aspect_ratio(): + oLandviewAspectRatioContainer.ratio = image_resolution.x / image_resolution.y + + +func update_flag_size(): + var adjustScale = oLandviewImage.rect_size / image_resolution + oEnsignFlagImg.rect_scale = Vector2(adjustScale.x, adjustScale.x) + + +func update_flag_position(): + var flag_position = normalized_flag_position * oLandviewImage.rect_size + oEnsignFlagImg.rect_position = flag_position - oEnsignFlagImg.rect_pivot_offset + + var new_set_pos = image_resolution * normalized_flag_position + new_set_pos.x = int(new_set_pos.x) + new_set_pos.y = int(new_set_pos.y) + + oMapProperties.set_flag_pos_by_landview_img(new_set_pos) + oLandViewFlagPosLabel.text = "(" + str(new_set_pos.x) + ", " + str(new_set_pos.y) + ")" + +func _on_CloseMapCoordButton_pressed(): + visible = false + + +func _on_LandviewImage_gui_input(event): + if visible == false: return + + if event is InputEventMouseButton and event.button_index == BUTTON_LEFT: + if event.pressed: + holding_left_click = true + else: + holding_left_click = false + + if event is InputEventMouseMotion: + if holding_left_click == true: + var clamped_position = Vector2() + clamped_position.x = clamp(event.position.x, 0, oLandviewImage.rect_size.x) + clamped_position.y = clamp(event.position.y, 0, oLandviewImage.rect_size.y) + + normalized_flag_position = clamped_position / oLandviewImage.rect_size + update_flag_position() + + +func _on_ChangeImageCoordButton_pressed(): + Utils.popup_centered(oChooseLandviewImageFileDialog) + + +func _on_MapCoordinatesWindow_visibility_changed(): + if visible == true: + var flag_position_x = int(oEnsignPositionX.text) + var flag_position_y = int(oEnsignPositionY.text) + var flag_position = Vector2(flag_position_x, flag_position_y) + normalized_flag_position = flag_position / image_resolution + update_flag_position() + else: + if oMessage == null: return + +func _on_ChooseLandviewImageFileDialog_file_selected(path): + var err = imageData.load(path) + if err != OK: + oMessage.quick("Error loading file.") + return + textureData = ImageTexture.new() + textureData.create_from_image(imageData, 0) # flags off + oLandviewImage.texture = textureData + + update_image_resolution() + update_aspect_ratio() + update_flag_position() diff --git a/Scenes/Properties.gd b/Scenes/Properties.gd index b0f1e357..55ce4a68 100644 --- a/Scenes/Properties.gd +++ b/Scenes/Properties.gd @@ -12,7 +12,6 @@ onready var oAdvancedMapProperties = Nodelist.list["oAdvancedMapProperties"] onready var oMapSizeTextLabel = Nodelist.list["oMapSizeTextLabel"] onready var oMapNameLineEdit = Nodelist.list["oMapNameLineEdit"] onready var oNameIDLineEdit = Nodelist.list["oNameIDLineEdit"] -onready var oEnsignPositionLineEdit = Nodelist.list["oEnsignPositionLineEdit"] onready var oSpeechLineEdit = Nodelist.list["oSpeechLineEdit"] onready var oLandViewLineEdit = Nodelist.list["oLandViewLineEdit"] onready var oAuthorLineEdit = Nodelist.list["oAuthorLineEdit"] @@ -21,6 +20,9 @@ onready var oCurrentFormat = Nodelist.list["oCurrentFormat"] onready var oKindOptionButton = Nodelist.list["oKindOptionButton"] onready var oPlayersSpinBox = Nodelist.list["oPlayersSpinBox"] onready var oOptionsOptionButton = Nodelist.list["oOptionsOptionButton"] +onready var oEnsignPositionX = Nodelist.list["oEnsignPositionX"] +onready var oEnsignPositionY = Nodelist.list["oEnsignPositionY"] +onready var oMapCoordinatesWindow = Nodelist.list["oMapCoordinatesWindow"] onready var oHBoxPlayers = Nodelist.list["oHBoxPlayers"] onready var oHBoxSpeech = Nodelist.list["oHBoxSpeech"] @@ -66,7 +68,12 @@ func _on_MapProperties_visibility_changed(): oNameIDLineEdit.text = oDataLof.NAME_ID oKindOptionButton.selected = kind_text_to_button_id() oOptionsOptionButton.selected = options_text_to_button_id() - oEnsignPositionLineEdit.text = oDataLof.ENSIGN_POS + + var ENSIGN_XY = oDataLof.ENSIGN_POS.split(" ") + if ENSIGN_XY.size() >= 2: + oEnsignPositionX.text = ENSIGN_XY[0] + oEnsignPositionY.text = ENSIGN_XY[1] + oPlayersSpinBox.value = int(oDataLof.PLAYERS) oSpeechLineEdit.text = oDataLof.SPEECH oLandViewLineEdit.text = oDataLof.LAND_VIEW @@ -135,11 +142,6 @@ func _on_NameIDLineEdit_text_changed(new_text): oEditor.mapHasBeenEdited = true oDataLof.NAME_ID = new_text -func _on_EnsignPositionLineEdit_text_changed(new_text): - oEditor.mapHasBeenEdited = true - oDataLof.ENSIGN_POS = new_text - oDataLof.ENSIGN_ZOOM = new_text - func _on_OptionsLineEdit_text_changed(new_text): oEditor.mapHasBeenEdited = true oDataLof.OPTIONS = new_text @@ -166,6 +168,27 @@ func _on_OptionsOptionButton_item_selected(index): oDataLof.OPTIONS = options_options[oOptionsOptionButton.text] +func _on_EnsignPositionX_focus_exited(): + oEditor.mapHasBeenEdited = true + if int(oEnsignPositionX.text) > 1000000: # Change this if I need to set a cap + oEnsignPositionX.text = "1000000" + oDataLof.ENSIGN_POS = oEnsignPositionX.text + " " + oEnsignPositionY.text + oDataLof.ENSIGN_ZOOM = oDataLof.ENSIGN_POS + +func _on_EnsignPositionY_focus_exited(): + oEditor.mapHasBeenEdited = true + if int(oEnsignPositionY.text) > 1000000: + oEnsignPositionY.text = "1000000" + oDataLof.ENSIGN_POS = oEnsignPositionX.text + " " + oEnsignPositionY.text + oDataLof.ENSIGN_ZOOM = oDataLof.ENSIGN_POS + +func set_flag_pos_by_landview_img(newPos): + oEnsignPositionX.text = str(newPos.x) + oEnsignPositionY.text = str(newPos.y) + _on_EnsignPositionX_focus_exited() + _on_EnsignPositionY_focus_exited() + + func options_text_to_button_id(): var button_id = 0 for i in range(oOptionsOptionButton.get_item_count()): @@ -187,7 +210,6 @@ func update_section_visibility(): oHBoxPlayers.visible = false oHBoxSpeech.visible = false oHBoxEnsignPosition.visible = false - #oHBoxEnsignZoom.visible = false oHBoxOptions.visible = false oHBoxLandView.visible = false oHBoxNameID.visible = false @@ -196,17 +218,13 @@ func update_section_visibility(): pass "Multiplayer": oHBoxPlayers.visible = true - oHBoxEnsignPosition.visible = true - #oHBoxEnsignZoom.visible = true oHBoxOptions.visible = true oHBoxLandView.visible = true oHBoxNameID.visible = true "Campaign", "Secret", "Moon": oHBoxSpeech.visible = true - oHBoxEnsignPosition.visible = true - #oHBoxEnsignZoom.visible = true oHBoxOptions.visible = true oHBoxLandView.visible = true oHBoxNameID.visible = true @@ -220,7 +238,8 @@ func update_section_visibility(): oDataLof.SPEECH = "" if oHBoxEnsignPosition.visible == false: - oEnsignPositionLineEdit.text = "" + oEnsignPositionX.text = "" + oEnsignPositionY.text = "" oDataLof.ENSIGN_POS = "" oDataLof.ENSIGN_ZOOM = "" @@ -235,3 +254,7 @@ func update_section_visibility(): if oHBoxNameID.visible == false: oNameIDLineEdit.text = "" oDataLof.NAME_ID = "" + + +func _on_OpenMapCoordButton_pressed(): + Utils.popup_centered(oMapCoordinatesWindow) diff --git a/dk_images/landviews/ensign_lvl5.png b/dk_images/landviews/ensign_lvl5.png new file mode 100644 index 00000000..1d981cf2 Binary files /dev/null and b/dk_images/landviews/ensign_lvl5.png differ diff --git a/dk_images/landviews/ensign_lvl5.png.import b/dk_images/landviews/ensign_lvl5.png.import new file mode 100644 index 00000000..5d936c5b --- /dev/null +++ b/dk_images/landviews/ensign_lvl5.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ensign_lvl5.png-caf15f75acec993ab02bde6410cdd068.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://dk_images/landviews/ensign_lvl5.png" +dest_files=[ "res://.import/ensign_lvl5.png-caf15f75acec993ab02bde6410cdd068.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=true +flags/anisotropic=true +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0