mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 10:40:01 +01:00
Windows CTRL + C Hotkey
This commit is contained in:
1 parent
5187b9f118
commit
f514b25c79
7 files changed
+41
-14
No files matched your search
+14
-6
@@ -29,7 +29,6 @@ void ChatMenu::CreatePopupContents(UI::ViewGroup *parent) {
|
||||
chatVert_ = scroll_->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)));
|
||||
chatVert_->SetSpacing(0);
|
||||
parent->Add(outer);
|
||||
UpdateChat();
|
||||
}
|
||||
|
||||
void ChatMenu::CreateViews() {
|
||||
@@ -56,6 +55,7 @@ void ChatMenu::CreateViews() {
|
||||
|
||||
CreatePopupContents(box_);
|
||||
root_->SetDefaultFocusView(box_);
|
||||
this->UpdateChat();
|
||||
g_Config.iNewChat = 0;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ UI::EventReturn ChatMenu::OnSubmit(UI::EventParams &e) {
|
||||
chatEdit_->SetFocus();
|
||||
sendChat(chat);
|
||||
#elif defined(__ANDROID__)
|
||||
scroll_->ScrollToBottom();
|
||||
System_SendMessage("inputbox", "Chat:");
|
||||
#endif
|
||||
return UI::EVENT_DONE;
|
||||
@@ -132,7 +131,7 @@ void ChatMenu::UpdateChat() {
|
||||
v->SetTextColor(0xFF000000 | color);
|
||||
}
|
||||
}
|
||||
toBottom_ = true;
|
||||
this->ScrollChat();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,11 +149,20 @@ bool ChatMenu::touch(const TouchInput &touch) {
|
||||
}
|
||||
|
||||
void ChatMenu::update(InputState &input) {
|
||||
if (toBottom_) {
|
||||
toBottom_ = false;
|
||||
PopupScreen::update(input);
|
||||
this->ScrollChat();
|
||||
}
|
||||
|
||||
void ChatMenu::sendMessage(const char *message, const char *value) {
|
||||
// Always call the base class method first to handle the most common messages.
|
||||
PopupScreen::sendMessage(message, value);
|
||||
this->ScrollChat();
|
||||
}
|
||||
|
||||
void ChatMenu::ScrollChat() {
|
||||
if (scroll_) {
|
||||
scroll_->ScrollToBottom();
|
||||
}
|
||||
PopupScreen::update(input);
|
||||
}
|
||||
|
||||
ChatMenu::~ChatMenu() {
|
||||
|
||||
@@ -12,6 +12,9 @@ public:
|
||||
bool touch(const TouchInput &touch) override;
|
||||
void update(InputState &input) override;
|
||||
void UpdateChat();
|
||||
void ScrollChat();
|
||||
protected:
|
||||
virtual void sendMessage(const char *message, const char *value);
|
||||
private:
|
||||
UI::EventReturn OnSubmit(UI::EventParams &e);
|
||||
UI::TextEdit *chatEdit_;
|
||||
|
||||
@@ -371,6 +371,11 @@ void EmuScreen::sendMessage(const char *message, const char *value) {
|
||||
} else {
|
||||
gstate_c.skipDrawReason &= ~SKIPDRAW_WINDOW_MINIMIZED;
|
||||
}
|
||||
} else if (!strcmp(message, "chat screen")) {
|
||||
releaseButtons();
|
||||
ChatMenu * ch = new ChatMenu();
|
||||
setChatPointer(ch);
|
||||
screenManager()->push(ch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user