mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
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:
parent
e171294c1d
commit
a79dc87761
5 changed files with 34 additions and 49 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue