writer over half
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
//namespace myink { namespace ui {
|
||||
PositionalProperties Paint_DrawString(UWORD Xstart, UWORD Ystart, const char * pString, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background);
|
||||
|
||||
TextBlock::TextBlock(const char * t, const TextBlockStyleProperties & s): text(t), style(s)
|
||||
TextBlock::TextBlock(const char * t, const TextBlockStyleProperties & s): style(s), text(t)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,10 +28,11 @@ PositionalProperties Paint_DrawString(UWORD Xstart, UWORD Ystart, const char * p
|
||||
UWORD max_x_pos = Xstart;
|
||||
UWORD max_y_pos = Ystart + Font->Height;
|
||||
UWORD Ypoint = Ystart;
|
||||
|
||||
UWORD max_width = 2*Paint.Width;
|
||||
|
||||
while (* pString != '\0') {
|
||||
//if X direction filled , reposition to(Xstart,Ypoint),Ypoint is Y direction plus the Height of the character
|
||||
if (*pString == '\n'|| (Xpoint + Font->Width ) > Paint.Width ) {
|
||||
if (*pString == '\n'|| (Xpoint + Font->Width ) > max_width ) {
|
||||
Xpoint = Xstart;
|
||||
Ypoint += Font->Height;
|
||||
if(Ypoint >= max_y_pos) {
|
||||
|
||||
Reference in New Issue
Block a user