mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge pull request #20801 from NABN00B/gui-buttons-and-margins
GUI margin and Back button adjustments
This commit is contained in:
9 files changed
+17
-16
No files matched your search
@@ -570,11 +570,11 @@ void AnalogSetupScreen::CreateViews() {
|
||||
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
|
||||
LinearLayout *leftColumn = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(300.0f, FILL_PARENT)));
|
||||
LinearLayout *leftColumn = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(300.0f, FILL_PARENT, Margins(10, 0, 0, 10))));
|
||||
LinearLayout *rightColumn = root_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
|
||||
|
||||
auto co = GetI18NCategory(I18NCat::CONTROLS);
|
||||
ScrollView *scroll = leftColumn->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0)));
|
||||
ScrollView *scroll = leftColumn->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f)));
|
||||
|
||||
LinearLayout *scrollContents = scroll->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(300.0f, WRAP_CONTENT)));
|
||||
|
||||
@@ -596,7 +596,7 @@ void AnalogSetupScreen::CreateViews() {
|
||||
|
||||
rightColumn->Add(theTwo);
|
||||
|
||||
leftColumn->Add(new Button(di->T("Back"), new LayoutParams(FILL_PARENT, WRAP_CONTENT)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
AddStandardBack(leftColumn);
|
||||
}
|
||||
|
||||
UI::EventReturn AnalogSetupScreen::OnResetToDefaults(UI::EventParams &e) {
|
||||
|
||||
+2
-2
@@ -1174,7 +1174,7 @@ void FrameDumpTestScreen::CreateViews() {
|
||||
TabHolder *tabHolder;
|
||||
tabHolder = new TabHolder(ORIENT_VERTICAL, 200, nullptr, new AnchorLayoutParams(10, 0, 10, 0, false));
|
||||
root_->Add(tabHolder);
|
||||
AddStandardBack(root_);
|
||||
tabHolder->AddBack(this);
|
||||
tabHolder->SetTag("DumpTypes");
|
||||
root_->SetDefaultFocusView(tabHolder);
|
||||
|
||||
@@ -1326,7 +1326,7 @@ void TouchTestScreen::CreateViews() {
|
||||
root_->Add(new Choice(gr->T("Recreate Activity")))->OnClick.Handle(this, &TouchTestScreen::OnRecreateActivity);
|
||||
#endif
|
||||
root_->Add(new CheckBox(&g_Config.bImmersiveMode, gr->T("FullScreen", "Full Screen")))->OnClick.Handle(this, &TouchTestScreen::OnImmersiveModeChange);
|
||||
root_->Add(new Button(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
root_->Add(new Button(di->T("Back"), new LinearLayoutParams(FILL_PARENT, 64, Margins(10, 0))))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
}
|
||||
|
||||
void TouchTestScreen::UpdateLogView() {
|
||||
|
||||
@@ -326,13 +326,14 @@ void DeveloperToolsScreen::CreateMIPSTracerTab(UI::LinearLayout *list) {
|
||||
return UI::EVENT_CONTINUE;
|
||||
});
|
||||
|
||||
Button *FlushTrace = list->Add(new Button(dev->T("Flush the trace")));
|
||||
list->Add(new ItemHeader(dev->T("MIPSTracer actions")));
|
||||
Choice *FlushTrace = list->Add(new Choice(dev->T("Flush the trace")));
|
||||
FlushTrace->OnClick.Handle(this, &DeveloperToolsScreen::OnMIPSTracerFlushTrace);
|
||||
|
||||
Button *InvalidateJitCache = list->Add(new Button(dev->T("Clear the JIT cache")));
|
||||
Choice *InvalidateJitCache = list->Add(new Choice(dev->T("Clear the JIT cache")));
|
||||
InvalidateJitCache->OnClick.Handle(this, &DeveloperToolsScreen::OnMIPSTracerClearJitCache);
|
||||
|
||||
Button *ClearMIPSTracer = list->Add(new Button(dev->T("Clear the MIPSTracer")));
|
||||
Choice *ClearMIPSTracer = list->Add(new Choice(dev->T("Clear the MIPSTracer")));
|
||||
ClearMIPSTracer->OnClick.Handle(this, &DeveloperToolsScreen::OnMIPSTracerClearTracer);
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ void GPUDriverTestScreen::CreateViews() {
|
||||
tabHolder_->AddTab("Discard", new LinearLayout(ORIENT_VERTICAL));
|
||||
tabHolder_->AddTab("Shader", new LinearLayout(ORIENT_VERTICAL));
|
||||
|
||||
Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(100, WRAP_CONTENT, 10, NONE, NONE, 10));
|
||||
Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(190, WRAP_CONTENT, 10, NONE, NONE, 10));
|
||||
back->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
anchor->Add(back);
|
||||
}
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ void GameScreen::CreateViews() {
|
||||
}
|
||||
}
|
||||
|
||||
leftColumn->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle(this, &GameScreen::OnSwitchBack);
|
||||
AddStandardBack(leftColumn);
|
||||
|
||||
ViewGroup *badgeHolder = new LinearLayout(ORIENT_HORIZONTAL, new AnchorLayoutParams(10, 10, 110, NONE));
|
||||
LinearLayout *mainGameInfo = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
|
||||
|
||||
+3
-3
@@ -827,7 +827,7 @@ void GameBrowser::Refresh() {
|
||||
Add(topBar);
|
||||
|
||||
if (*gridStyle_) {
|
||||
gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(10, 0, 0, 0)));
|
||||
} else {
|
||||
UI::LinearLayout *gl = new UI::LinearLayoutList(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
gl->SetSpacing(4.0f);
|
||||
@@ -835,7 +835,7 @@ void GameBrowser::Refresh() {
|
||||
}
|
||||
} else {
|
||||
if (*gridStyle_) {
|
||||
gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
gameList_ = new UI::GridLayoutList(UI::GridLayoutSettings(150*g_Config.fGameGridScale, 85*g_Config.fGameGridScale), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(10, 0, 0, 0)));
|
||||
} else {
|
||||
UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
gl->SetSpacing(4.0f);
|
||||
@@ -960,7 +960,7 @@ void GameBrowser::Refresh() {
|
||||
|
||||
if (!lastText_.empty()) {
|
||||
Add(new Spacer());
|
||||
Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)))->OnClick.Handle(this, &GameBrowser::LastClick);
|
||||
Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT, Margins(10, 0, 0, 10))))->OnClick.Handle(this, &GameBrowser::LastClick);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -608,7 +608,7 @@ void UIScreenWithBackground::sendMessage(UIMessage message, const char *value) {
|
||||
void UIDialogScreenWithBackground::AddStandardBack(UI::ViewGroup *parent) {
|
||||
using namespace UI;
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
parent->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(150, 64, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
parent->Add(new Choice(di->T("Back"), "", false, new AnchorLayoutParams(190, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
}
|
||||
|
||||
void UIDialogScreenWithBackground::sendMessage(UIMessage message, const char *value) {
|
||||
|
||||
+1
-1
@@ -380,7 +380,7 @@ void GamePauseScreen::CreateSavestateControls(UI::LinearLayout *leftColumnItems,
|
||||
}
|
||||
leftColumnItems->Add(new Spacer(0.0));
|
||||
|
||||
LinearLayout *buttonRow = leftColumnItems->Add(new LinearLayout(ORIENT_HORIZONTAL));
|
||||
LinearLayout *buttonRow = leftColumnItems->Add(new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(Margins(10, 0, 0, 0))));
|
||||
if (g_Config.bEnableStateUndo && !Achievements::HardcoreModeActive() && NetworkAllowSaveState()) {
|
||||
UI::Choice *loadUndoButton = buttonRow->Add(new Choice(pa->T("Undo last load")));
|
||||
loadUndoButton->SetEnabled(SaveState::HasUndoLoad(gamePath_));
|
||||
|
||||
@@ -42,7 +42,7 @@ void TabbedUIDialogScreenWithGameBackground::CreateViews() {
|
||||
tabHolder_ = new TabHolder(ORIENT_HORIZONTAL, 200, filterNotice_, new LinearLayoutParams(1.0f));
|
||||
verticalLayout->Add(tabHolder_);
|
||||
CreateExtraButtons(verticalLayout, 0);
|
||||
verticalLayout->Add(new Choice(di->T("Back"), "", false, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 0.0f, Margins(0))))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
verticalLayout->Add(new Choice(di->T("Back"), "", false, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, 0.0f, Margins(10, 0))))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
root_->Add(verticalLayout);
|
||||
} else {
|
||||
tabHolder_ = new TabHolder(ORIENT_VERTICAL, 200, filterNotice_, new AnchorLayoutParams(10, 0, 10, 0, false));
|
||||
|
||||
Reference in new issue
Block a user