Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat feature based on Adenovan's Rechat branch #12667

Merged
merged 27 commits into from
Mar 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
10e874c
PPSSPP early chat feature rebranched
adenovan Oct 21, 2016
bd2342a
Enable chat box
sum2012 Oct 21, 2016
08a1cc7
Add translation
sum2012 Oct 21, 2016
07b1d8b
pointer fix random crash & better substring logic
adenovan Oct 22, 2016
2874c6d
Oops it still random crashed destructor do the fix well
adenovan Oct 22, 2016
18525ea
Android Chat Support
adenovan Oct 23, 2016
5187b9f
Add New Chat Counter
adenovan Oct 24, 2016
f514b25
Windows CTRL + C Hotkey
adenovan Oct 25, 2016
20b289c
cmake buildfix
adenovan Oct 25, 2016
766373e
pointer and scroll fix
adenovan Oct 26, 2016
6b39018
Android chat empty after : fix
adenovan Oct 27, 2016
e17b57d
Add support OSK for windows
sum2012 Oct 27, 2016
fae8633
Build fix for Linux QT
sum2012 Oct 27, 2016
1241d53
Add translation of "You're in Offline Mode"
sum2012 Oct 27, 2016
6121dce
remove pointer and using update() should fix random crash (thanks Ukn…
adenovan Oct 31, 2016
624d1cd
chat screen & chat button position and hide ui on show chat
adenovan Dec 5, 2016
6706698
build fix
adenovan Dec 5, 2016
97a4d64
Rebased and fix the update scroll
adenovan Jun 7, 2017
8ec2d50
Add virtual key for opening chat
adenovan Jun 7, 2017
f5d5687
Quick Chat
adenovan Jul 6, 2017
4420719
Bug fix
adenovan Jul 8, 2017
f236ea1
group chat options and set enabled ptr
adenovan Aug 8, 2017
5382efd
Update ab.cmd
adenovan Aug 8, 2017
142e609
Merge branch 'rechat' of https://github.com/adenovan/amultios-ppsspp …
anr2me Mar 2, 2020
93b59af
Fix building errors
anr2me Mar 2, 2020
394194f
Fix chat color formatting
anr2me Mar 2, 2020
dc4df7d
Tweaked chatbox a little bit
anr2me Mar 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add translation
  • Loading branch information
sum2012 authored and adenovan committed Jul 1, 2017
commit 08a1cc70755160d900397b90f0daddd450c09c7f
9 changes: 6 additions & 3 deletions UI/ChatScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,29 @@
#include "Core/System.h"
#include "Common/LogManager.h"
#include "Core/HLE/proAdhoc.h"
#include "i18n/i18n.h"

void ChatMenu::CreatePopupContents(UI::ViewGroup *parent) {
using namespace UI;
//tried to give instance to proAdhoc not working
//setChatPointer(this);
I18NCategory *n = GetI18NCategory("Networking");
LinearLayout *outer = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, 400));
scroll_ = outer->Add(new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(PopupWidth(), FILL_PARENT, 1.0f)));
chatVert_ = scroll_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(PopupWidth(), WRAP_CONTENT)));
chatVert_->SetSpacing(0);
LinearLayout *bottom = outer->Add(new LinearLayout(ORIENT_HORIZONTAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
chatEdit_ = bottom->Add(new TextEdit("", "Chat Here", new LinearLayoutParams(1.0)));
chatEdit_ = bottom->Add(new TextEdit("", n->T("Chat Here"), new LinearLayoutParams(1.0)));
chatEdit_->OnEnter.Handle(this, &ChatMenu::OnSubmit);
bottom->Add(new Button("Send"))->OnClick.Handle(this, &ChatMenu::OnSubmit);
bottom->Add(new Button(n->T("Send")))->OnClick.Handle(this, &ChatMenu::OnSubmit);
parent->Add(outer);
UpdateChat();
}

void ChatMenu::CreateViews() {
using namespace UI;

I18NCategory *n = GetI18NCategory("Networking");
UIContext &dc = *screenManager()->getUIContext();

AnchorLayout *anchor = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT));
Expand All @@ -42,7 +45,7 @@ void ChatMenu::CreateViews() {
box_->SetBG(UI::Drawable(0x66303030));
box_->SetHasDropShadow(false);

View *title = new PopupHeader("Chat");
View *title = new PopupHeader(n->T("Chat"));
box_->Add(title);

CreatePopupContents(box_);
Expand Down
3 changes: 2 additions & 1 deletion UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,14 +772,15 @@ void EmuScreen::processAxis(const AxisInput &axis, int direction) {

void EmuScreen::CreateViews() {
using namespace UI;
I18NCategory *sc = GetI18NCategory("Screen");
const Bounds &bounds = screenManager()->getUIContext()->GetBounds();
InitPadLayout(bounds.w, bounds.h);
root_ = CreatePadLayout(bounds.w, bounds.h, &pauseTrigger_);
if (g_Config.bShowDeveloperMenu) {
root_->Add(new Button("DevMenu"))->OnClick.Handle(this, &EmuScreen::OnDevTools);
}
if (g_Config.bEnableNetworkChat)
root_->Add(new Button("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);
saveStatePreview_ = new AsyncImageFileView("", IS_FIXED, nullptr, new AnchorLayoutParams(bounds.centerX(), 100, NONE, NONE, true));
saveStatePreview_->SetFixedSize(160, 90);
saveStatePreview_->SetColor(0x90FFFFFF);
Expand Down