util: add functions for row positioning
This commit is contained in:
parent
ff15ac0d56
commit
9d6ff94790
|
@ -45,6 +45,10 @@ void scrollbar(int offset, int length, int top, int bottom);
|
|||
/* row_count(): Number of rows available to row_print() */
|
||||
int row_count(void);
|
||||
|
||||
/* row_x() row_y(): Coordinates for row_print() */
|
||||
int row_x(int x);
|
||||
int row_y(int y);
|
||||
|
||||
//---
|
||||
// General (x,y) printing
|
||||
//---
|
||||
|
|
|
@ -125,6 +125,15 @@ int row_count(void)
|
|||
return ROW_COUNT;
|
||||
}
|
||||
|
||||
int row_x(int x)
|
||||
{
|
||||
return ROW_X + ROW_W * (x - 1);
|
||||
}
|
||||
int row_y(int y)
|
||||
{
|
||||
return ROW_Y + ROW_H * (y - 1) + ROW_YPAD;
|
||||
}
|
||||
|
||||
//---
|
||||
// Other drawing utilities
|
||||
//---
|
||||
|
|
Loading…
Reference in New Issue