2016-10-21 18:35:54 +08:00
|
|
|
#pragma once
|
2020-03-10 20:44:30 -07:00
|
|
|
|
|
|
|
#include "ppsspp_config.h"
|
2020-10-04 20:48:47 +02:00
|
|
|
#include "Common/UI/UIScreen.h"
|
2016-10-21 18:35:54 +08:00
|
|
|
|
2021-09-12 19:44:44 -07:00
|
|
|
class ChatMenu : public UI::AnchorLayout {
|
2016-10-21 18:35:54 +08:00
|
|
|
public:
|
2021-09-12 19:44:44 -07:00
|
|
|
ChatMenu(const Bounds &screenBounds, UI::LayoutParams *lp = nullptr): UI::AnchorLayout(lp) {
|
|
|
|
CreateSubviews(screenBounds);
|
|
|
|
}
|
|
|
|
void Update() override;
|
2021-09-12 20:16:05 -07:00
|
|
|
bool SubviewFocused(UI::View *view) override;
|
2020-03-10 20:44:30 -07:00
|
|
|
|
2021-09-12 20:20:17 -07:00
|
|
|
void Close();
|
|
|
|
|
2021-09-12 19:44:44 -07:00
|
|
|
bool Contains(float x, float y) const {
|
|
|
|
if (box_)
|
|
|
|
return box_->GetBounds().Contains(x, y);
|
|
|
|
return false;
|
|
|
|
}
|
2020-03-10 20:44:30 -07:00
|
|
|
|
2016-10-21 18:35:54 +08:00
|
|
|
private:
|
2021-09-12 19:44:44 -07:00
|
|
|
void CreateSubviews(const Bounds &screenBounds);
|
|
|
|
void CreateContents(UI::ViewGroup *parent);
|
|
|
|
void UpdateChat();
|
|
|
|
|
2016-10-21 18:35:54 +08:00
|
|
|
UI::EventReturn OnSubmit(UI::EventParams &e);
|
2017-07-06 21:43:39 +08:00
|
|
|
UI::EventReturn OnQuickChat1(UI::EventParams &e);
|
|
|
|
UI::EventReturn OnQuickChat2(UI::EventParams &e);
|
|
|
|
UI::EventReturn OnQuickChat3(UI::EventParams &e);
|
|
|
|
UI::EventReturn OnQuickChat4(UI::EventParams &e);
|
|
|
|
UI::EventReturn OnQuickChat5(UI::EventParams &e);
|
2020-03-10 20:44:30 -07:00
|
|
|
|
2020-03-08 23:51:23 +01:00
|
|
|
#if PPSSPP_PLATFORM(WINDOWS) || defined(USING_QT_UI) || defined(SDL)
|
2020-03-10 20:44:30 -07:00
|
|
|
UI::TextEdit *chatEdit_ = nullptr;
|
|
|
|
#endif
|
|
|
|
UI::ScrollView *scroll_ = nullptr;
|
|
|
|
UI::LinearLayout *chatVert_ = nullptr;
|
|
|
|
UI::ViewGroup *box_ = nullptr;
|
2021-09-12 19:44:44 -07:00
|
|
|
|
2021-09-14 17:51:57 -07:00
|
|
|
int chatChangeID_ = 0;
|
2021-09-12 19:44:44 -07:00
|
|
|
bool toBottom_ = true;
|
2021-09-12 20:16:05 -07:00
|
|
|
bool promptInput_ = false;
|
2020-03-10 20:44:30 -07:00
|
|
|
};
|