Add New Chat Counter

This commit is contained in:
Ade Novan 2016-10-24 15:29:17 +08:00 committed by Gde Made Novan Priambhada
parent 18525ea523
commit 5187b9f118
4 changed files with 9 additions and 1 deletions

View File

@ -425,6 +425,7 @@ public:
int iWlanAdhocChannel;
bool bWlanPowerSave;
bool bEnableNetworkChat;
int iNewChat;
int iPSPModel;
int iFirmwareVersion;

View File

@ -1132,6 +1132,11 @@ int friendFinder(){
if (ch) {
ch->UpdateChat();
}
else {
if (g_Config.iNewChat < 50) {
g_Config.iNewChat += 1;
}
}
// Move RX Buffer
memmove(rx, rx + sizeof(SceNetAdhocctlChatPacketS2C), sizeof(rx) - sizeof(SceNetAdhocctlChatPacketS2C));

View File

@ -56,6 +56,7 @@ void ChatMenu::CreateViews() {
CreatePopupContents(box_);
root_->SetDefaultFocusView(box_);
g_Config.iNewChat = 0;
}
void ChatMenu::dialogFinished(const Screen *dialog, DialogResult result) {

View File

@ -779,7 +779,8 @@ void EmuScreen::CreateViews() {
root_->Add(new Button("DevMenu"))->OnClick.Handle(this, &EmuScreen::OnDevTools);
}
if (g_Config.bEnableNetworkChat) {
root_->Add(new Button(sc->T("Chat"), new AnchorLayoutParams(50, NONE, NONE, 50, true)))->OnClick.Handle(this, &EmuScreen::OnChat);
//root_->Add(new Button(sc->T("Chat"), new AnchorLayoutParams(50, NONE, NONE, 50, true)))->OnClick.Handle(this, &EmuScreen::OnChat);
root_->Add(new ChoiceWithValueDisplay(&g_Config.iNewChat, sc->T("Chat"), new AnchorLayoutParams(130,WRAP_CONTENT,80, NONE, NONE, 50, true)))->OnClick.Handle(this, &EmuScreen::OnChat);
}
saveStatePreview_ = new AsyncImageFileView("", IS_FIXED, nullptr, new AnchorLayoutParams(bounds.centerX(), 100, NONE, NONE, true));
saveStatePreview_->SetFixedSize(160, 90);