Set resolution text
This commit is contained in:
parent
0a71be4731
commit
56614d3b1d
|
@ -27,6 +27,7 @@ public partial class TextureBrowser : Node
|
|||
private LineEdit _texturePath;
|
||||
private OptionButton _filterOptions;
|
||||
private LineEdit _fileType;
|
||||
private LineEdit _resolutionBox;
|
||||
|
||||
private string _searchFilterPrefix = "";
|
||||
|
||||
|
@ -46,6 +47,7 @@ public partial class TextureBrowser : Node
|
|||
_texturePath = GetNode<LineEdit>("%PathBox");
|
||||
_filterOptions = GetNode<OptionButton>("%FilterOptions");
|
||||
_fileType = GetNode<LineEdit>("%FileTypeBox");
|
||||
_resolutionBox = GetNode<LineEdit>("%ResolutionBox");
|
||||
|
||||
_searchBar.TextChanged += ApplySearchFilter;
|
||||
_sortMenu.GetPopup().IdPressed += ApplySortMode;
|
||||
|
@ -130,6 +132,8 @@ public partial class TextureBrowser : Node
|
|||
_previewTexture.Texture = texture;
|
||||
_texturePath.Text = name;
|
||||
_fileType.Text = Path.GetExtension(path).ToUpper();
|
||||
var resolution = texture.GetSize();
|
||||
_resolutionBox.Text = $"{resolution.X}x{resolution.Y}";
|
||||
}
|
||||
|
||||
private void ApplySearchFilter(string filter)
|
||||
|
|
|
@ -287,6 +287,7 @@ layout_mode = 2
|
|||
text = "Resolution"
|
||||
|
||||
[node name="ResolutionBox" type="LineEdit" parent="TabContainer/Textures/VBoxContainer/HSplitContainer/HSplitContainer/Preview/VBoxContainer/PanelContainer/MarginContainer/Details"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
editable = false
|
||||
|
|
Loading…
Reference in New Issue