mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Use the common tabdialog class for GestureMappingScreen
This commit is contained in:
1 parent
1f35cf8538
commit
243c784666
2 files changed
+12
-12
No files matched your search
@@ -2035,22 +2035,18 @@ void HostnameSelectScreen::OnCompleted(DialogResult result) {
|
||||
*value_ = StripSpaces(addrView_->GetText());
|
||||
}
|
||||
|
||||
void GestureMappingScreen::CreateViews() {
|
||||
void GestureMappingScreen::CreateTabs() {
|
||||
auto co = GetI18NCategory(I18NCat::CONTROLS);
|
||||
AddTab("Gesture", co->T("Gesture"), [this](UI::LinearLayout *parent) { CreateGestureTab(parent); });
|
||||
}
|
||||
|
||||
void GestureMappingScreen::CreateGestureTab(UI::LinearLayout *vert) {
|
||||
using namespace UI;
|
||||
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
auto co = GetI18NCategory(I18NCat::CONTROLS);
|
||||
auto mc = GetI18NCategory(I18NCat::MAPPABLECONTROLS);
|
||||
|
||||
root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
AddStandardBack(root_);
|
||||
TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 200, TabHolderFlags::Default, nullptr, new AnchorLayoutParams(10, 0, 10, 0, false));
|
||||
root_->Add(tabHolder);
|
||||
ScrollView *rightPanel = new ScrollView(ORIENT_VERTICAL);
|
||||
tabHolder->AddTab(co->T("Gesture"), rightPanel);
|
||||
LinearLayout *vert = rightPanel->Add(new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT)));
|
||||
vert->SetSpacing(0);
|
||||
|
||||
static const char *gestureButton[ARRAY_SIZE(GestureKey::keyList)+1];
|
||||
gestureButton[0] = "None";
|
||||
for (int i = 1; i < ARRAY_SIZE(gestureButton); ++i) {
|
||||
|
||||
@@ -184,12 +184,16 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class GestureMappingScreen : public UIBaseDialogScreen {
|
||||
class GestureMappingScreen : public UITabbedBaseDialogScreen {
|
||||
public:
|
||||
GestureMappingScreen(const Path &gamePath) : UIBaseDialogScreen(gamePath) {}
|
||||
GestureMappingScreen(const Path &gamePath) : UITabbedBaseDialogScreen(gamePath) {}
|
||||
void CreateViews() override;
|
||||
|
||||
void CreateTabs() override;
|
||||
const char *tag() const override { return "GestureMapping"; }
|
||||
bool ShowSearchControls() const override { return false; }
|
||||
protected:
|
||||
void CreateGestureTab(UI::LinearLayout *parent);
|
||||
};
|
||||
|
||||
class RestoreSettingsScreen : public PopupScreen {
|
||||
|
||||
Reference in new issue
Block a user