Some small helpers to draw strings and sprites dealing with left-to-right/right-to-left.
This commit is contained in:
@@ -171,6 +171,17 @@ int GetCharacterHeight(FontSize size);
|
||||
/** Height of characters in the large (#FS_MONO) font. */
|
||||
#define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO))
|
||||
|
||||
int InitTempMargin(int left, int right, bool to_end_line);
|
||||
void AddSpace(int space, int &here, bool to_end_line);
|
||||
|
||||
void UpdateMarginEnd(int end, int &margin, bool to_end_line);
|
||||
void UpdateMarginWidth(int adding, int &margin, bool to_end_line);
|
||||
void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line);
|
||||
void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line);
|
||||
|
||||
void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
|
||||
void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line = false, SubSprite *sub = NULL);
|
||||
|
||||
extern DrawPixelInfo *_cur_dpi;
|
||||
|
||||
TextColour GetContrastColour(uint8 background);
|
||||
|
||||
Reference in New Issue
Block a user