|
这些天,需要对ShowCategoryxxxScreen()号窗口修改字体显示行距,所以看了看GUI部分的代码,真是看的晕晕的,满页的全局变量,就算是局部变量左一个x,右一个y,然后来一个X1,Y1,X2,Y2。。。。
帮助文件也写不好,不过有点奇怪,这么多gloab变量,都没有打架,这个比较奇怪。贴一个struct来给大家分析分析:
typedef struct****
{
U32 buf_count;//
s32 x,y;
s32 width,height;
UI_filled_area* normal_filler;
UI_filled_area* disabled_filler;
UI_filled_area* focussed_filler;
color special_text_color;
color normal_text_color;
color disabled_text_color;
color focussed_text_color;
color selected_text_color;
color selector_color;
color cursor_color;
color boundary_color;
s8 text_gap;
UI_font_type text_font;
dword flags;
UI_buffer_type text;
s32 text_length;
s32 allocated_length;
s32 available_length;
s32 edit_width;
s32 edit_height;
s32 text_x;
s32 text_y;
s32 text_offset_x;
s32 text_offset_y;
s32 cursor_x;
s32 cursor_y;
s32 n_lines;
s32 text_height;
s32 cursor_line_position_counter;
UI_buffer_type line_before_cursor_line_p;
UI_buffer_type cursor_line_p;
UI_buffer_type cursor_p;
UI_buffer_type line_after_cursor_line_p;
UI_buffer_type line_after_cursor_line_last_p;
UI_buffer_type last_position_p;
byte mask_character;
s32 UCS2_count;
s32 GSM_ext_count;
void (*overflow_callback)(void);
void (*change_callback)(void);
*****
大家讨论讨论 |
|