From b13d27c0b8d40481b7ef177a6dd441ecb41cd5ee Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sun, 8 Sep 2024 14:45:52 +0100 Subject: [PATCH] Basic functionality for the texture browser --- project/code/TMV/UI/TextureBrowser.cs | 91 ++++++++++++++++++ .../scenes/asset_browser/asset_browser.tscn | 96 ++++++++++++------- 2 files changed, 152 insertions(+), 35 deletions(-) create mode 100644 project/code/TMV/UI/TextureBrowser.cs diff --git a/project/code/TMV/UI/TextureBrowser.cs b/project/code/TMV/UI/TextureBrowser.cs new file mode 100644 index 0000000..0b9d4cf --- /dev/null +++ b/project/code/TMV/UI/TextureBrowser.cs @@ -0,0 +1,91 @@ +using Godot; + +namespace KeepersCompound.TMV.UI; + +public partial class TextureBrowser : Node +{ + private Tree _folderTree; + private LineEdit _searchBar; + private MenuButton _sortMenu; + private Button _openFolderButton; + private MenuButton _browserMenu; + private HFlowContainer _textureList; + private TextureRect _previewTexture; + private LineEdit _texturePath; + + public override void _Ready() + { + // !HACK TEMP + Context.Instance.PathManager.Init("/stuff/Games/thief/drive_c/GOG Games/TG ND 1.27 (MAPPING)/"); + Context.Instance.CampaignName = "TheBlackParade_1_0"; + + _folderTree = GetNode("%FolderTree"); + _searchBar = GetNode("%SearchBar"); + _sortMenu = GetNode("%SortMenu"); + _openFolderButton = GetNode