mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 07:52:31 +00:00
system/MsgDialog: System message texts
This commit is contained in:
parent
6fdfde7649
commit
299711fc9e
@ -117,7 +117,34 @@ void MsgDialogUi::DrawProgressBar() {
|
|||||||
EndGroup();
|
EndGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MsgDialogUi::DrawSystemMessage() {}
|
struct {
|
||||||
|
const char* text;
|
||||||
|
} static constexpr system_message_texts[] = {
|
||||||
|
"No product available in the store.", // TRC_EMPTY_STORE
|
||||||
|
"PSN chat restriction.", // TRC_PSN_CHAT_RESTRICTION
|
||||||
|
"User-generated Media restriction", // TRC_PSN_UGC_RESTRICTION
|
||||||
|
nullptr, // !!NOP
|
||||||
|
"Camera not connected.", // CAMERA_NOT_CONNECTED
|
||||||
|
"Warning: profile picture and name are not set", // WARNING_PROFILE_PICTURE_AND_NAME_NOT_SHARED
|
||||||
|
};
|
||||||
|
static_assert(std::size(system_message_texts) ==
|
||||||
|
static_cast<int>(SystemMessageType::WARNING_PROFILE_PICTURE_AND_NAME_NOT_SHARED) + 1);
|
||||||
|
|
||||||
|
void MsgDialogUi::DrawSystemMessage() {
|
||||||
|
// TODO: Implement go to settings & user profile
|
||||||
|
const auto& [msg_type, _] = *param->sysMsgParam;
|
||||||
|
ASSERT(msg_type <= SystemMessageType::WARNING_PROFILE_PICTURE_AND_NAME_NOT_SHARED);
|
||||||
|
auto [msg] = system_message_texts[static_cast<u32>(msg_type)];
|
||||||
|
DrawCenteredText(msg);
|
||||||
|
const auto ws = GetWindowSize();
|
||||||
|
SetCursorPos({
|
||||||
|
ws.x / 2.0f - BUTTON_SIZE.x / 2.0f,
|
||||||
|
ws.y - 10.0f - BUTTON_SIZE.y,
|
||||||
|
});
|
||||||
|
if (Button("OK", BUTTON_SIZE)) {
|
||||||
|
Finish(ButtonId::OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MsgDialogUi::MsgDialogUi(const Param* param, Status* status, MsgDialogResult* result)
|
MsgDialogUi::MsgDialogUi(const Param* param, Status* status, MsgDialogResult* result)
|
||||||
: dialog_unique_id([] {
|
: dialog_unique_id([] {
|
||||||
|
Loading…
Reference in New Issue
Block a user