Files
LCE-Revelations/Minecraft.Client/GuiComponent.h
Revela e786604228 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.
2026-03-17 17:08:58 -05:00

22 lines
759 B
C++

#pragma once
class Font;
using namespace std;
class GuiComponent
{
protected:
float blitOffset;
protected:
void hLine(int x0, int x1, int y, int col);
void vLine(int x, int y0, int y1, int col);
void fill(int x0, int y0, int x1, int y1, int col);
void fillGradient(int x0, int y0, int x1, int y1, int col1, int col2);
public:
GuiComponent(); // 4J added
void drawCenteredString(Font *font, const wstring& str, int x, int y, int color);
void drawString(Font *font, const wstring& str, int x, int y, int color);
void drawStringLiteral(Font* font, const wstring& str, int x, int y, int color);
void drawStringPreshaped(Font* font, const wstring& str, int x, int y, int color);
void blit(int x, int y, int sx, int sy, int w, int h);
};