summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/screen
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/eve/screen')
-rw-r--r--fw/fe310/eos/eve/screen/form.c12
-rw-r--r--fw/fe310/eos/eve/screen/form.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/fw/fe310/eos/eve/screen/form.c b/fw/fe310/eos/eve/screen/form.c
index 52cfdc6..5837a99 100644
--- a/fw/fe310/eos/eve/screen/form.c
+++ b/fw/fe310/eos/eve/screen/form.c
@@ -109,7 +109,7 @@ void eve_form_update_g(EVEPage *page, EVEWidget *_widget) {
widget->label->g.x = 0;
widget->label->g.y = h;
}
- if (w + widget->g.w >= form->p.v.window->g.w) {
+ if (w + widget->g.w > form->p.v.window->g.w) {
h += _h;
w = 0;
_h = 0;
@@ -123,3 +123,13 @@ void eve_form_update_g(EVEPage *page, EVEWidget *_widget) {
widget = eve_widget_next(widget);
}
}
+
+EVEWidget *eve_form_widget(EVEForm *form, uint16_t idx) {
+ EVEWidget *w = form->widget;
+ int i;
+
+ for (i=0; i<idx; i++) {
+ w = eve_widget_next(w);
+ }
+ return w;
+}
diff --git a/fw/fe310/eos/eve/screen/form.h b/fw/fe310/eos/eve/screen/form.h
index 91a4f8a..b6e59ff 100644
--- a/fw/fe310/eos/eve/screen/form.h
+++ b/fw/fe310/eos/eve/screen/form.h
@@ -13,3 +13,4 @@ int eve_form_touch(EVEView *v, uint8_t tag0, int touch_idx);
uint8_t eve_form_draw(EVEView *v, uint8_t tag0);
int eve_form_handle_evt(EVEPage *page, struct EVEWidget *widget, EVETouch *touch, uint16_t evt, uint8_t tag0, int touch_idx);
void eve_form_update_g(EVEPage *page, struct EVEWidget *widget);
+struct EVEWidget *eve_form_widget(EVEForm *form, uint16_t idx);