Files
MinecraftConsoles/Minecraft.Client/Common/UI/UIGroup.h
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

116 lines
3.3 KiB
C++

#pragma once
#include "UILayer.h"
#include "UIEnums.h"
class UIComponent_Tooltips;
class UIComponent_TutorialPopup;
class UIScene_HUD;
class UIComponent_PressStartToPlay;
// A group contains a collection of layers for a specific context (e.g. each player has 1 group)
class UIGroup
{
private:
UILayer *m_layers[eUILayer_COUNT];
UIComponent_Tooltips *m_tooltips;
UIComponent_TutorialPopup *m_tutorialPopup;
UIComponent_PressStartToPlay *m_pressStartToPlay;
UIScene_HUD *m_hud;
C4JRender::eViewportType m_viewportType;
EUIGroup m_group;
int m_iPad;
bool m_bMenuDisplayed;
bool m_bPauseMenuDisplayed;
bool m_bContainerMenuDisplayed;
bool m_bIgnoreAutosaveMenuDisplayed;
bool m_bIgnorePlayerJoinMenuDisplayed;
// Countdown in ticks to update focus state
int m_updateFocusStateCountdown;
int m_commandBufferList;
public:
UIGroup(EUIGroup group, int iPad);
#ifdef __PSVITA__
EUIGroup GetGroup() {return m_group;}
#endif
UIComponent_Tooltips *getTooltips() { return m_tooltips; }
UIComponent_TutorialPopup *getTutorialPopup() { return m_tutorialPopup; }
UIScene_HUD *getHUD() { return m_hud; }
UIComponent_PressStartToPlay *getPressStartToPlay() { return m_pressStartToPlay; }
void DestroyAll();
void ReloadAll();
void tick();
void render();
bool hidesLowerScenes();
void getRenderDimensions(S32 &width, S32 &height);
// NAVIGATION
bool NavigateToScene(int iPad, EUIScene scene, void *initData, EUILayer layer);
bool NavigateBack(int iPad, EUIScene eScene, EUILayer eLayer = eUILayer_COUNT);
void closeAllScenes();
UIScene *GetTopScene(EUILayer layer);
bool IsSceneInStack(EUIScene scene);
bool HasFocus(int iPad);
bool RequestFocus(UILayer* layerPtr);
void UpdateFocusState();
bool GetMenuDisplayed();
bool IsPauseMenuDisplayed() { return m_bPauseMenuDisplayed; }
bool IsContainerMenuDisplayed() { return m_bContainerMenuDisplayed; }
bool IsIgnoreAutosaveMenuDisplayed() { return m_bIgnoreAutosaveMenuDisplayed; }
bool IsIgnorePlayerJoinMenuDisplayed() { return m_bIgnorePlayerJoinMenuDisplayed; }
// INPUT
void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
#ifdef __PSVITA__
// Current active scene
UIScene *getCurrentScene();
#endif
// FOCUS
bool getFocusState();
// A component is an element on a layer that displays BELOW other scenes in this layer, but does not engage in any navigation
// E.g. you can keep a component active while performing navigation with other scenes on this layer
void showComponent(int iPad, EUIScene scene, EUILayer layer, bool show);
UIScene *addComponent(int iPad, EUIScene scene, EUILayer layer);
void removeComponent(EUIScene scene, EUILayer layer);
void SetViewportType(C4JRender::eViewportType type);
C4JRender::eViewportType GetViewportType();
virtual void HandleDLCMountingComplete();
virtual void HandleDLCInstalled();
#ifdef _XBOX_ONE
virtual void HandleDLCLicenseChange();
#endif
virtual void HandleMessage(EUIMessage message, void *data);
bool IsFullscreenGroup();
void handleUnlockFullVersion();
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
unsigned int GetLayerIndex(UILayer* layerPtr);
int getCommandBufferList();
UIScene *FindScene(EUIScene sceneType);
private:
void _UpdateFocusState();
void updateStackStates();
};