1 #pragma once
2 
3 #include "ppsspp_config.h"
4 #include "Common/UI/UIScreen.h"
5 
6 class ChatMenu : public UI::AnchorLayout {
7 public:
AnchorLayout(lp)8 	ChatMenu(const Bounds &screenBounds, UI::LayoutParams *lp = nullptr): UI::AnchorLayout(lp) {
9 		CreateSubviews(screenBounds);
10 	}
11 	void Update() override;
12 	bool SubviewFocused(UI::View *view) override;
13 
14 	void Close();
15 
Contains(float x,float y)16 	bool Contains(float x, float y) const {
17 		if (box_)
18 			return box_->GetBounds().Contains(x, y);
19 		return false;
20 	}
21 
22 private:
23 	void CreateSubviews(const Bounds &screenBounds);
24 	void CreateContents(UI::ViewGroup *parent);
25 	void UpdateChat();
26 
27 	UI::EventReturn OnSubmit(UI::EventParams &e);
28 	UI::EventReturn OnQuickChat1(UI::EventParams &e);
29 	UI::EventReturn OnQuickChat2(UI::EventParams &e);
30 	UI::EventReturn OnQuickChat3(UI::EventParams &e);
31 	UI::EventReturn OnQuickChat4(UI::EventParams &e);
32 	UI::EventReturn OnQuickChat5(UI::EventParams &e);
33 
34 #if PPSSPP_PLATFORM(WINDOWS) || defined(USING_QT_UI) || defined(SDL)
35 	UI::TextEdit *chatEdit_ = nullptr;
36 #endif
37 	UI::ScrollView *scroll_ = nullptr;
38 	UI::LinearLayout *chatVert_ = nullptr;
39 	UI::ViewGroup *box_ = nullptr;
40 
41 	int chatChangeID_ = 0;
42 	bool toBottom_ = true;
43 	bool promptInput_ = false;
44 };
45