fix: fixes background image blowing up to 1:1 size; also small cleanup
This commit is contained in:
committed by
Julian Murgia
parent
c660e2d51c
commit
950ee463d8
@@ -16,7 +16,7 @@ const SELECT_BACKGROUND = "MarginContainer/MarginContainer/VBoxContainer/
|
||||
const SELECT_BACKGROUNDSPACER = "MarginContainer/MarginContainer/VBoxContainer/MarginContainer/GridContainer/SelectBackgroundSpacer"
|
||||
const ROOM_FOLDER_PATH = "MarginContainer/MarginContainer/VBoxContainer/MarginContainer/GridContainer/RoomFolder"
|
||||
const ROOM_BACKGROUND = "MarginContainer/MarginContainer/VBoxContainer/PreviewSection/CenterContainer/RoomBackground"
|
||||
const BACKGROUND_PREVIEW = "MarginContainer/MarginContainer/VBoxContainer/PreviewSection/BackgroundPreview"
|
||||
const BACKGROUND_PREVIEW = "MarginContainer/MarginContainer/VBoxContainer/PreviewSection/Control/BackgroundPreview"
|
||||
|
||||
const SCRIPT_BLANK_TEXT = "Room will not have a script configured."
|
||||
const SCRIPT_SELECT_TEXT = "Please select script."
|
||||
@@ -157,8 +157,6 @@ func _on_BackgroundImageFileDialog_file_selected(path: String) -> void:
|
||||
|
||||
image_stream_texture = load(path)
|
||||
|
||||
var preview_size = get_node(ROOM_BACKGROUND).rect_size
|
||||
|
||||
get_node(BACKGROUND_PREVIEW).texture = image_stream_texture
|
||||
get_node(ROOM_BACKGROUND).visible = false
|
||||
set_preview_scale()
|
||||
|
||||
@@ -283,7 +283,11 @@ texture = ExtResource( 2 )
|
||||
expand = true
|
||||
stretch_mode = 7
|
||||
|
||||
[node name="BackgroundPreview" type="TextureRect" parent="MarginContainer/MarginContainer/VBoxContainer/PreviewSection"]
|
||||
[node name="Control" type="Control" parent="MarginContainer/MarginContainer/VBoxContainer/PreviewSection"]
|
||||
margin_right = 1000.0
|
||||
margin_bottom = 400.0
|
||||
|
||||
[node name="BackgroundPreview" type="TextureRect" parent="MarginContainer/MarginContainer/VBoxContainer/PreviewSection/Control"]
|
||||
margin_right = 1000.0
|
||||
margin_bottom = 400.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user