mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
Introduce SimpleBaseDialogScreen, TabbedBaseDialogScreen's simpler cousin
This commit is contained in:
1 parent
a4f588adfb
commit
e37c0cbef3
12 files changed
+83
-16
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#include "Common/UI/ScrollView.h"
|
||||
#include "UI/SimpleDialogScreen.h"
|
||||
#include "UI/MiscViews.h"
|
||||
|
||||
void UISimpleBaseDialogScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
|
||||
const bool canScroll = CanScroll();
|
||||
ignoreBottomInset_ = canScroll;
|
||||
|
||||
const bool portrait = UsePortraitLayout();
|
||||
|
||||
root_ = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
root_->Add(new TopBar(GetTitle()));
|
||||
|
||||
if (canScroll) {
|
||||
ScrollView *scroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
|
||||
LinearLayout *contents = new LinearLayoutList(ORIENT_VERTICAL);
|
||||
contents->SetSpacing(0);
|
||||
CreateDialogViews(contents);
|
||||
scroll->Add(contents);
|
||||
root_->Add(scroll);
|
||||
} else {
|
||||
CreateDialogViews(root_);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user