From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.Client/Common/UI/UIComponent_Chat.h | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Minecraft.Client/Common/UI/UIComponent_Chat.h (limited to 'Minecraft.Client/Common/UI/UIComponent_Chat.h') diff --git a/Minecraft.Client/Common/UI/UIComponent_Chat.h b/Minecraft.Client/Common/UI/UIComponent_Chat.h new file mode 100644 index 00000000..d18352cc --- /dev/null +++ b/Minecraft.Client/Common/UI/UIComponent_Chat.h @@ -0,0 +1,66 @@ +#pragma once + +#include "UIScene.h" + +#define CHAT_LINES_COUNT 10 + +class UIComponent_Chat : public UIScene +{ +private: + bool m_bSplitscreen; + +protected: + UIControl_Label m_labelChatText[CHAT_LINES_COUNT]; + UIControl_Label m_labelJukebox; + UIControl m_controlLabelBackground[CHAT_LINES_COUNT]; + UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) + UI_MAP_ELEMENT(m_labelChatText[0],"Label1") + UI_MAP_ELEMENT(m_labelChatText[1],"Label2") + UI_MAP_ELEMENT(m_labelChatText[2],"Label3") + UI_MAP_ELEMENT(m_labelChatText[3],"Label4") + UI_MAP_ELEMENT(m_labelChatText[4],"Label5") + UI_MAP_ELEMENT(m_labelChatText[5],"Label6") + UI_MAP_ELEMENT(m_labelChatText[6],"Label7") + UI_MAP_ELEMENT(m_labelChatText[7],"Label8") + UI_MAP_ELEMENT(m_labelChatText[8],"Label9") + UI_MAP_ELEMENT(m_labelChatText[9],"Label10") + + UI_MAP_ELEMENT(m_controlLabelBackground[0],"Label1Background") + UI_MAP_ELEMENT(m_controlLabelBackground[1],"Label2Background") + UI_MAP_ELEMENT(m_controlLabelBackground[2],"Label3Background") + UI_MAP_ELEMENT(m_controlLabelBackground[3],"Label4Background") + UI_MAP_ELEMENT(m_controlLabelBackground[4],"Label5Background") + UI_MAP_ELEMENT(m_controlLabelBackground[5],"Label6Background") + UI_MAP_ELEMENT(m_controlLabelBackground[6],"Label7Background") + UI_MAP_ELEMENT(m_controlLabelBackground[7],"Label8Background") + UI_MAP_ELEMENT(m_controlLabelBackground[8],"Label9Background") + UI_MAP_ELEMENT(m_controlLabelBackground[9],"Label10Background") + + UI_MAP_ELEMENT(m_labelJukebox,"Jukebox") + UI_END_MAP_ELEMENTS_AND_NAMES() + +public: + UIComponent_Chat(int iPad, void *initData, UILayer *parentLayer); + +protected: + // TODO: This should be pure virtual in this class + virtual wstring getMoviePath(); + +public: + virtual EUIScene getSceneType() { return eUIComponent_Chat;} + + // Returns true if this scene handles input + virtual bool stealsFocus() { return false; } + + // Returns true if this scene has focus for the pad passed in + virtual bool hasFocus(int iPad) { return false; } + + // Returns true if lower scenes in this scenes layer, or in any layer below this scenes layers should be hidden + virtual bool hidesLowerScenes() { return false; } + + // RENDERING + virtual void render(S32 width, S32 height, C4JRender::eViewportType viewport); + +protected: + void handleTimerComplete(int id); +}; \ No newline at end of file -- cgit v1.2.3