diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/Common/UI/UIController.h | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
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 97a43994725008e35fceb984d5549df9c8cea470.
* 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>
Diffstat (limited to 'Minecraft.Client/Common/UI/UIController.h')
| -rw-r--r-- | Minecraft.Client/Common/UI/UIController.h | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/Minecraft.Client/Common/UI/UIController.h b/Minecraft.Client/Common/UI/UIController.h index ef064f80..49c78032 100644 --- a/Minecraft.Client/Common/UI/UIController.h +++ b/Minecraft.Client/Common/UI/UIController.h @@ -38,10 +38,37 @@ private: S32 m_tileOriginX, m_tileOriginY; + enum EFont + { + eFont_NotLoaded = 0, + + eFont_Bitmap, + eFont_Japanese, + eFont_SimpChinese, + eFont_TradChinese, + eFont_Korean, + + }; + + // 4J-JEV: It's important that currentFont == targetFont, unless updateCurrentLanguage is going to be called. + EFont m_eCurrentFont, m_eTargetFont; + + // 4J-JEV: Behaves like navigateToHome when not ingame. When in-game, it closes all player scenes instead. + bool m_bCleanupOnReload; + + EFont getFontForLanguage(int language); + UITTFFont *createFont(EFont fontLanguage); + UIAbstractBitmapFont *m_mcBitmapFont; UITTFFont *m_mcTTFFont; UIBitmapFont *m_moj7, *m_moj11; +public: + void setCleanupOnReload(); + void updateCurrentFont(); + + +private: // 4J-PB - ui element type for PSVita touch control #ifdef __PSVITA__ @@ -136,6 +163,7 @@ private: C4JThread *m_reloadSkinThread; bool m_navigateToHomeOnReload; int m_accumulatedTicks; + __uint64 m_lastUiSfx; // Tracks time (ms) of last UI sound effect D3D11_RECT m_customRenderingClearRect; @@ -182,6 +210,9 @@ protected: public: CRITICAL_SECTION m_Allocatorlock; void SetupFont(); + bool PendingFontChange(); + bool UsingBitmapFont(); + public: // TICKING virtual void tick(); @@ -295,7 +326,7 @@ public: virtual void SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID ); virtual void SetEnableTooltips( unsigned int iPad, BOOL bVal ); virtual void ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show ); - virtual void SetTooltips( unsigned int iPad, int iA, int iB=-1, int iX=-1, int iY=-1 , int iLT=-1, int iRT=-1, int iLB=-1, int iRB=-1, int iLS=-1, bool forceUpdate = false); + virtual void SetTooltips( unsigned int iPad, int iA, int iB=-1, int iX=-1, int iY=-1 , int iLT=-1, int iRT=-1, int iLB=-1, int iRB=-1, int iLS=-1, int iRS=-1, int iBack=-1, bool forceUpdate = false); virtual void EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable ); virtual void RefreshTooltips(unsigned int iPad); @@ -341,15 +372,12 @@ public: virtual void HidePressStart(); void ClearPressStart(); - // 4J Stu - Only because of the different StringTable type, should really fix the libraries -#ifndef __PS3__ - virtual C4JStorage::EMessageResult RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, - int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, C4JStringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0, bool bIsError = true); -#else - virtual C4JStorage::EMessageResult RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, - int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, StringTable *pStringTable=NULL, WCHAR *pwchFormatString=NULL,DWORD dwFocusButton=0, bool bIsError = true); -#endif + virtual C4JStorage::EMessageResult RequestAlertMessage(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, WCHAR *pwchFormatString=NULL); + virtual C4JStorage::EMessageResult RequestErrorMessage(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, WCHAR *pwchFormatString=NULL); +private: + virtual C4JStorage::EMessageResult RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad,int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, WCHAR *pwchFormatString,DWORD dwFocusButton, bool bIsError); +public: C4JStorage::EMessageResult RequestUGCMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL); C4JStorage::EMessageResult RequestContentRestrictedMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL); |
