mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 18:23:43 +01:00
main screen: Only have click-to-copy on the version name if it's not a basic version
This commit is contained in:
1 parent
04644fa96c
commit
c9ce8863a8
1 file changed
+10
-6
+10
-6
@@ -1280,12 +1280,16 @@ void MainScreen::CreateViews() {
|
||||
ClickableTextView *ver = rightColumnItems->Add(new ClickableTextView(versionString, new LinearLayoutParams(Margins(70, -10, 0, 4))));
|
||||
ver->SetSmall(true);
|
||||
ver->SetClip(false);
|
||||
ver->OnClick.Add([](UI::EventParams &e) {
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
System_CopyStringToClipboard(PPSSPP_GIT_VERSION);
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, ApplySafeSubstitutions(di->T("Copied to clipboard: %1"), PPSSPP_GIT_VERSION));
|
||||
return UI::EVENT_DONE;
|
||||
});
|
||||
|
||||
// Only allow copying the version if it looks like a git version string. 1.19 for example is not really necessary to be able to copy/paste.
|
||||
if (strchr(PPSSPP_GIT_VERSION, '-')) {
|
||||
ver->OnClick.Add([](UI::EventParams &e) {
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
System_CopyStringToClipboard(PPSSPP_GIT_VERSION);
|
||||
g_OSD.Show(OSDType::MESSAGE_INFO, ApplySafeSubstitutions(di->T("Copied to clipboard: %1"), PPSSPP_GIT_VERSION));
|
||||
return UI::EVENT_DONE;
|
||||
});
|
||||
}
|
||||
|
||||
LinearLayout *rightColumnChoices = rightColumnItems;
|
||||
if (vertical) {
|
||||
|
||||
Reference in new issue
Block a user