Add a center flag, next to the rtl flag, for viewports. That results in any text being drawn centered. It overrides the RTL flag if set.

Simplify splashes and time menu by using it.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23105 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-10-11 12:21:27 +00:00
parent e171294c1d
commit a79dc87761
5 changed files with 34 additions and 49 deletions

View file

@ -26,9 +26,13 @@
#include "cpu.h"
#include "config.h"
#define VP_FLAG_IS_RTL 0x01
#define VP_FLAG_IS_RTL 0x01
#define VP_FLAG_CENTER_ALIGN 0x02
#define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_IS_RTL) != 0)
#define VP_FLAG_ALIGNMENT_MASK \
(VP_FLAG_IS_RTL|VP_FLAG_CENTER_ALIGN)
#define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_ALIGNMENT_MASK) == VP_FLAG_IS_RTL)
struct viewport {
int x;