28 #ifndef ASCENSION_UI_TEXT_H |
28 #ifndef ASCENSION_UI_TEXT_H |
29 #define ASCENSION_UI_TEXT_H |
29 #define ASCENSION_UI_TEXT_H |
30 |
30 |
31 #include "font.h" |
31 #include "font.h" |
32 #include "../scene.h" |
32 #include "../scene.h" |
33 #include "../texture.h" |
|
34 #include "../utils.h" |
33 #include "../utils.h" |
35 |
34 |
36 #include <cx/string.h> |
35 #include <cx/string.h> |
37 |
36 |
38 typedef struct AscText { |
37 typedef struct AscText { |
39 extend_asc_scene_node; |
38 AscSprite base; |
40 cxmutstr text; |
39 cxmutstr text; |
41 AscFont font; |
40 AscFont font; |
42 asc_col4i color; |
41 asc_col4i color; |
43 unsigned short max_width; |
42 unsigned short max_width; |
44 unsigned short offx; |
43 unsigned short offx; |
45 AscTexture tex; |
|
46 } AscText; |
44 } AscText; |
47 |
45 |
48 enum asc_text_alignment { |
46 enum asc_text_alignment { |
49 ASC_TEXT_ALIGN_LEFT = 0x00, |
47 ASC_TEXT_ALIGN_LEFT = 0x00, |
50 ASC_TEXT_ALIGN_CENTERED = 0x01, |
48 ASC_TEXT_ALIGN_CENTERED = 0x01, |