Files
player/Project/Src/MyWin/Window/mywin_inputbox.h
andy d45df9714a 整理代码
1.解决一些编译警告
2.整理一些文件格式
2025-10-18 01:02:27 +08:00

31 lines
814 B
C

#ifndef MYWIN_INPUTBOX_H__
#define MYWIN_INPUTBOX_H__
// 定义输入框的最大字符数
#define INPUTBOX_MAX_CHAR_NUM 256
typedef struct {
WIN_WindowStruct win;
char inputs[INPUTBOX_MAX_CHAR_NUM];
int press;
uint32_t color_light;
uint32_t color_dark;
} WIN_InputboxStruct;
WIN_InputboxStruct *WIN_CreatInputbox(
WIN_WindowStruct *base,
void (*msgLoop)(struct _WIN_WindowStruct *win, WIN_MsgStruct *msg), int x,
int y, int x_size, int y_size);
int INPUTBOX_Clear(WIN_InputboxStruct *box);
int INPUTBOX_SetChars(WIN_InputboxStruct *box, char *str);
// 默认消息处理函数
void INPUTBOX_DefaultMsgLoop(WIN_InputboxStruct *box, WIN_MsgStruct *msg);
WIN_InputboxStruct *INPUTBOX_InputChars(WIN_WindowStruct *base, int x, int y,
int x_size, int y_size);
#endif