- [NEW] Es pot navegar entre habitacions pulsant el nombres de les vores
- [FIX] usar mouseClk() en el treeview - [FIX] Al crear nova habitació s¡obri la porta contraria en l'habitació des de la que se venia.
This commit is contained in:
@@ -568,23 +568,29 @@ namespace draw
|
||||
for (int i=0;i<len;++i)
|
||||
{
|
||||
char chr = text[i]-32;
|
||||
draw((x+i)*8, y*8, 8, 8, (chr&15)*8, (chr>>4)*8, DRAW_FLIP_NONE,zoom&FONT_ZOOM_HORIZONTAL?16:8, zoom&FONT_ZOOM_VERTICAL?16:8);
|
||||
draw((x+(i*(zoom&FONT_ZOOM_HORIZONTAL?2:1)))*8, y*8, 8, 8, (chr&15)*8, (chr>>4)*8, DRAW_FLIP_NONE,zoom&FONT_ZOOM_HORIZONTAL?16:8, zoom&FONT_ZOOM_VERTICAL?16:8);
|
||||
}
|
||||
source = tmp;
|
||||
}
|
||||
|
||||
void print2(const int num, const int positions, const int x, const int y, const uint8_t color, const int zoom)
|
||||
{
|
||||
char buffer[positions+1];
|
||||
int digit = positions-1;
|
||||
int value = num;
|
||||
const char empty = positions < 0 ? '0' : ' ';
|
||||
const int pos = positions < 0 ? -positions : positions;
|
||||
char buffer[pos+1];
|
||||
int digit = pos-1;
|
||||
int value = num<0 ? -num : num;
|
||||
while (digit>=0)
|
||||
{
|
||||
buffer[digit] = (value%10)==0 && digit<positions-1 ? 32 : (value%10)+48;
|
||||
value = value/10;
|
||||
if (digit==0 && num<0) {
|
||||
buffer[digit] = '-';
|
||||
} else {
|
||||
buffer[digit] = (value%10)==0 && digit<pos-1 ? empty : (value%10)+48;
|
||||
value = value/10;
|
||||
}
|
||||
digit--;
|
||||
}
|
||||
buffer[positions]=0;
|
||||
buffer[pos]=0;
|
||||
print2(buffer, x, y, color, zoom);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user