first
This commit is contained in:
43
include_lib/system/ui/ui/ui_slider.h
Normal file
43
include_lib/system/ui/ui/ui_slider.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef UI_SLIDER_H
|
||||
#define UI_SLIDER_H
|
||||
|
||||
#include "ui/ui_core.h"
|
||||
#include "ui/control.h"
|
||||
|
||||
|
||||
#define SLIDER_CHILD_NUM (SLIDER_CHILD_END - SLIDER_CHILD_BEGIN)
|
||||
|
||||
|
||||
struct slider_text_info {
|
||||
u8 move;
|
||||
int min_value;
|
||||
int max_value;
|
||||
int text_color;
|
||||
};
|
||||
|
||||
|
||||
struct ui_slider {
|
||||
struct element elm;
|
||||
struct element child_elm[SLIDER_CHILD_NUM];
|
||||
u8 step;
|
||||
char persent;
|
||||
s16 left;
|
||||
s16 width;
|
||||
s16 min_value;
|
||||
s16 max_value;
|
||||
u16 text_color;
|
||||
const struct ui_slider_info *info;
|
||||
const struct slider_text_info *text_info;
|
||||
const struct element_event_handler *handler;
|
||||
};
|
||||
|
||||
void ui_slider_enable();
|
||||
int ui_slider_set_persent_by_id(int id, int persent);
|
||||
int ui_slider_set_persent(struct ui_slider *slider, int persent);
|
||||
|
||||
int slider_touch_slider_move(struct ui_slider *slider, struct element_touch_event *e);//触摸滑动功能
|
||||
|
||||
int slider_get_percent(struct ui_slider *slider);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user