Break out rendering of "notices" from OnScreenDisplay. They can now also be used as views.

Use it for the new message in ControlMappingScreen, when you try to map
a combo when that's disabled. It'll have more uses.
This commit is contained in:
Henrik Rydgård
2023-07-07 15:23:19 +02:00
parent e182837f86
commit 952e125c7e
5 changed files with 113 additions and 45 deletions
+2 -1
View File
@@ -46,6 +46,7 @@
#include "UI/ControlMappingScreen.h"
#include "UI/GameSettingsScreen.h"
#include "UI/JoystickHistoryView.h"
#include "UI/OnScreenDisplay.h"
#if PPSSPP_PLATFORM(ANDROID)
#include "android/jni/app-android.h"
@@ -334,7 +335,7 @@ void KeyMappingNewKeyDialog::CreatePopupContents(UI::ViewGroup *parent) {
parent->Add(new TextView(std::string(km->T("Map a new key for")) + " " + mc->T(pspButtonName), new LinearLayoutParams(Margins(10, 0))));
parent->Add(new TextView(std::string(mapping_.ToVisualString()), new LinearLayoutParams(Margins(10, 0))));
comboMappingsNotEnabled_ = parent->Add(new TextView(km->T("Combo mappings are not enabled"), new LinearLayoutParams(Margins(10, 0))));
comboMappingsNotEnabled_ = parent->Add(new NoticeView(NoticeLevel::WARN, km->T("Combo mappings are not enabled"), "", new LinearLayoutParams(Margins(10, 0))));
comboMappingsNotEnabled_->SetVisibility(UI::V_GONE);
SetVRAppMode(VRAppMode::VR_CONTROLLER_MAPPING_MODE);