ppsspp/UI/ChatScreen.h

50 lines
1.3 KiB
C
Raw Normal View History

2016-10-21 10:35:54 +00:00
#pragma once
#include "ppsspp_config.h"
#include "Common/UI/UIScreen.h"
2016-10-21 10:35:54 +00:00
class ChatMenu : public UI::AnchorLayout {
2016-10-21 10:35:54 +00:00
public:
ChatMenu(int token, const Bounds &screenBounds, ScreenManager *screenManager, UI::LayoutParams *lp = nullptr)
: UI::AnchorLayout(lp), screenManager_(screenManager), token_(token) {
CreateSubviews(screenBounds);
}
void Update() override;
2021-09-13 03:16:05 +00:00
bool SubviewFocused(UI::View *view) override;
void Close();
bool Contains(float x, float y) const {
if (box_)
return box_->GetBounds().Contains(x, y);
return false;
}
2016-10-21 10:35:54 +00:00
private:
void CreateSubviews(const Bounds &screenBounds);
void CreateContents(UI::ViewGroup *parent);
void UpdateChat();
UI::EventReturn OnAskForChatMessage(UI::EventParams &e);
UI::EventReturn OnSubmitMessage(UI::EventParams &e);
2017-07-06 13:43:39 +00: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);
UI::TextEdit *chatEdit_ = nullptr;
UI::ScrollView *scroll_ = nullptr;
UI::LinearLayout *chatVert_ = nullptr;
UI::ViewGroup *box_ = nullptr;
ScreenManager *screenManager_;
int chatChangeID_ = 0;
bool toBottom_ = true;
2021-09-13 03:16:05 +00:00
bool promptInput_ = false;
int token_;
std::string messageTemp_;
UI::Button *chatButton_ = nullptr;
};