#pragma once #include #include #include #include #include "wxcomponents/checktree.h" #include "Cafe/GraphicPack/GraphicPack2.h" class wxSplitterWindow; class wxPanel; class wxButton; class wxChoice; class GraphicPacksWindow2 : public wxDialog { public: GraphicPacksWindow2(wxWindow* parent, uint64_t title_id_filter); ~GraphicPacksWindow2(); static void RefreshGraphicPacks(); private: std::string m_filter; bool m_filter_installed_games; std::vector m_installed_games; void FillGraphicPackList() const; void GetChildren(const wxTreeItemId& id, std::vector& children) const; void ExpandChildren(const std::vector& ids, size_t& counter) const; wxSplitterWindow * m_splitter_window; wxPanel* m_right_panel; wxScrolled* m_gp_options; wxCheckTree * m_graphic_pack_tree; wxTextCtrl* m_filter_text; wxCheckBox* m_installed_games_only; wxStaticText* m_graphic_pack_name, *m_graphic_pack_description; wxBoxSizer* m_preset_sizer; std::vector m_active_preset; wxButton* m_reload_shaders; wxButton* m_update_graphicPacks; wxInfoBar* m_info_bar; GraphicPackPtr m_shown_graphic_pack; std::string m_gp_name, m_gp_description; float m_ratio = 0.55f; wxTreeItemId FindTreeItem(const wxTreeItemId& root, const wxString& text) const; void LoadPresetSelections(const GraphicPackPtr& gp); void OnTreeSelectionChanged(wxTreeEvent& event); void OnTreeChoiceChanged(wxTreeEvent& event); void OnActivePresetChanged(wxCommandEvent& event); void OnReloadShaders(wxCommandEvent& event); void OnCheckForUpdates(wxCommandEvent& event); void OnSizeChanged(wxSizeEvent& event); void SashPositionChanged(wxEvent& event); void OnFilterUpdate(wxEvent& event); void OnInstalledGamesChanged(wxCommandEvent& event); void SaveStateToConfig(); void ReloadPack(const GraphicPackPtr& graphic_pack) const; void DeleteShadersFromRuntimeCache(const GraphicPackPtr& graphic_pack) const; };