2023-06-16 11:44:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ppsspp_config.h"
|
|
|
|
|
|
|
|
#include "Common/UI/UIScreen.h"
|
2023-09-30 09:21:22 +00:00
|
|
|
#include "Common/System/System.h"
|
2023-06-16 11:44:35 +00:00
|
|
|
#include "Core/ConfigValues.h"
|
|
|
|
#include "UI/MiscScreens.h"
|
|
|
|
|
|
|
|
class TabbedUIDialogScreenWithGameBackground : public UIDialogScreenWithGameBackground {
|
|
|
|
public:
|
|
|
|
TabbedUIDialogScreenWithGameBackground(const Path &gamePath) : UIDialogScreenWithGameBackground(gamePath) {}
|
|
|
|
|
2024-01-19 12:44:49 +00:00
|
|
|
UI::LinearLayout *AddTab(const char *tag, std::string_view title, bool isSearch = false);
|
2023-06-16 11:44:35 +00:00
|
|
|
void CreateViews() override;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Load data and define your tabs here.
|
|
|
|
virtual void PreCreateViews() {}
|
2023-06-18 10:22:36 +00:00
|
|
|
virtual void CreateTabs() = 0;
|
2023-06-21 10:17:44 +00:00
|
|
|
virtual bool ShowSearchControls() const { return true; }
|
2023-06-18 10:22:36 +00:00
|
|
|
|
2023-06-16 11:44:35 +00:00
|
|
|
void RecreateViews() override;
|
2023-09-30 09:21:22 +00:00
|
|
|
void sendMessage(UIMessage message, const char *value) override;
|
2023-06-16 11:44:35 +00:00
|
|
|
|
|
|
|
SettingInfoMessage *settingInfo_ = nullptr;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void ApplySearchFilter();
|
|
|
|
|
|
|
|
UI::TabHolder *tabHolder_ = nullptr;
|
|
|
|
std::vector<UI::LinearLayout *> settingTabContents_;
|
|
|
|
std::vector<UI::TextView *> settingTabFilterNotices_;
|
|
|
|
UI::Choice *clearSearchChoice_ = nullptr;
|
|
|
|
UI::TextView *noSearchResults_ = nullptr;
|
|
|
|
// If we recreate the views while this is active we show it again
|
|
|
|
std::string oldSettingInfo_;
|
|
|
|
std::string searchFilter_;
|
|
|
|
};
|