mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-25 16:41:04 +00:00
Add RecreateAllViews function
This commit is contained in:
parent
67183f5822
commit
fd4501b91a
@ -155,6 +155,12 @@ void ScreenManager::pop() {
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenManager::RecreateAllViews() {
|
||||
for (auto it = stack_.begin(); it != stack_.end(); ++it) {
|
||||
it->screen->RecreateViews();
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenManager::finishDialog(const Screen *dialog, DialogResult result) {
|
||||
if (dialog != stack_.back().screen) {
|
||||
ELOG("Wrong dialog being finished!");
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
virtual void axis(const AxisInput &touch) {}
|
||||
virtual void sendMessage(const char *msg, const char *value) {}
|
||||
|
||||
virtual void RecreateViews() {}
|
||||
|
||||
ScreenManager *screenManager() { return screenManager_; }
|
||||
void setScreenManager(ScreenManager *sm) { screenManager_ = sm; }
|
||||
|
||||
@ -89,6 +91,9 @@ public:
|
||||
// Push a dialog box in front. Currently 1-level only.
|
||||
void push(Screen *screen, int layerFlags = 0);
|
||||
|
||||
// Recreate all views
|
||||
void RecreateAllViews();
|
||||
|
||||
// Pops the dialog away.
|
||||
void finishDialog(const Screen *dialog, DialogResult result = DR_OK);
|
||||
|
||||
|
@ -23,7 +23,7 @@ protected:
|
||||
virtual void CreateViews() = 0;
|
||||
virtual void DrawBackground(UIContext &dc) {}
|
||||
|
||||
void RecreateViews() { recreateViews_ = true; }
|
||||
virtual void RecreateViews() { recreateViews_ = true; }
|
||||
|
||||
UI::ViewGroup *root_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user