Add Arabic text shaping support for chat functionality
This commit introduces Arabic text shaping in the chat application by adding `ArabicShaping.cpp` and `ArabicShaping.h` for handling contextual forms and visual reordering. The rendering logic in `ChatScreen.cpp` is updated to utilize this new functionality, adjusting cursor positions accordingly. Other UI components, including `UIControl_Base.cpp`, `UIControl_Label.cpp`, and `UIControl_SaveList.cpp`, are modified to ensure proper display of Arabic text. Additionally, `Font.cpp` is enhanced with methods for efficient rendering of pre-shaped text.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "XUI_Chat.h"
|
||||
#include "..\..\Minecraft.h"
|
||||
#include "..\..\Gui.h"
|
||||
#include "..\..\..\Minecraft.World\ArabicShaping.h"
|
||||
|
||||
HRESULT CScene_Chat::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
|
||||
{
|
||||
@@ -29,7 +30,8 @@ HRESULT CScene_Chat::OnTimer( XUIMessageTimer *pXUIMessageTimer, BOOL &bHandled)
|
||||
{
|
||||
m_Backgrounds[i].SetOpacity(opacity);
|
||||
m_Labels[i].SetOpacity(opacity);
|
||||
m_Labels[i].SetText( pGui->getMessage(m_iPad,i).c_str() );
|
||||
wstring shaped = shapeArabicText(pGui->getMessage(m_iPad, i));
|
||||
m_Labels[i].SetText( shaped.c_str() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user