summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/scene.c24
-rw-r--r--boot/scene_menu.c8
-rw-r--r--boot/scene_textline.c16
3 files changed, 24 insertions, 24 deletions
diff --git a/boot/scene.c b/boot/scene.c
index a0060c6a97d..49dac90ceed 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -210,8 +210,8 @@ int scene_obj_set_pos(struct scene *scn, uint id, int x, int y)
obj = scene_obj_find(scn, id, SCENEOBJT_NONE);
if (!obj)
return log_msg_ret("find", -ENOENT);
- obj->bbox.x = x;
- obj->bbox.y = y;
+ obj->bbox.x0 = x;
+ obj->bbox.y0 = y;
return 0;
}
@@ -368,8 +368,8 @@ static int scene_obj_render(struct scene_obj *obj, bool text_mode)
struct udevice *cons = text_mode ? NULL : exp->cons;
int x, y, ret;
- x = obj->bbox.x;
- y = obj->bbox.y;
+ x = obj->bbox.x0;
+ y = obj->bbox.y0;
switch (obj->type) {
case SCENEOBJT_NONE:
@@ -915,15 +915,15 @@ int scene_bbox_union(struct scene *scn, uint id, int inset,
if (!obj)
return log_msg_ret("obj", -ENOENT);
if (bbox->valid) {
- bbox->x0 = min(bbox->x0, obj->bbox.x - inset);
- bbox->y0 = min(bbox->y0, obj->bbox.y);
- bbox->x1 = max(bbox->x1, obj->bbox.x + obj->bbox.w + inset);
- bbox->y1 = max(bbox->y1, obj->bbox.y + obj->bbox.h);
+ bbox->x0 = min(bbox->x0, obj->bbox.x0 - inset);
+ bbox->y0 = min(bbox->y0, obj->bbox.y0);
+ bbox->x1 = max(bbox->x1, obj->bbox.x0 + obj->bbox.w + inset);
+ bbox->y1 = max(bbox->y1, obj->bbox.y0 + obj->bbox.h);
} else {
- bbox->x0 = obj->bbox.x - inset;
- bbox->y0 = obj->bbox.y;
- bbox->x1 = obj->bbox.x + obj->bbox.w + inset;
- bbox->y1 = obj->bbox.y + obj->bbox.h;
+ bbox->x0 = obj->bbox.x0 - inset;
+ bbox->y0 = obj->bbox.y0;
+ bbox->x1 = obj->bbox.x0 + obj->bbox.w + inset;
+ bbox->y1 = obj->bbox.y0 + obj->bbox.h;
bbox->valid = true;
}
diff --git a/boot/scene_menu.c b/boot/scene_menu.c
index 20a6a6b6a01..c47c2030527 100644
--- a/boot/scene_menu.c
+++ b/boot/scene_menu.c
@@ -102,7 +102,7 @@ static int update_pointers(struct scene_obj_menu *menu, uint id, bool point)
label = scene_obj_find(scn, item->label_id, SCENEOBJT_NONE);
ret = scene_obj_set_pos(scn, menu->pointer_id,
- menu->obj.bbox.x + 200, label->bbox.y);
+ menu->obj.bbox.x0 + 200, label->bbox.y0);
if (ret < 0)
return log_msg_ret("ptr", ret);
}
@@ -205,12 +205,12 @@ int scene_menu_arrange(struct scene *scn, struct expo_arrange_info *arr,
int x, y;
int ret;
- x = menu->obj.bbox.x;
- y = menu->obj.bbox.y;
+ x = menu->obj.bbox.x0;
+ y = menu->obj.bbox.y0;
if (menu->title_id) {
int width;
- ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.bbox.x, y);
+ ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.bbox.x0, y);
if (ret < 0)
return log_msg_ret("tit", ret);
diff --git a/boot/scene_textline.c b/boot/scene_textline.c
index 5b4e21e6360..a513d555ded 100644
--- a/boot/scene_textline.c
+++ b/boot/scene_textline.c
@@ -94,16 +94,16 @@ int scene_textline_arrange(struct scene *scn, struct expo_arrange_info *arr,
int x, y;
int ret;
- x = tline->obj.bbox.x;
- y = tline->obj.bbox.y;
+ x = tline->obj.bbox.x0;
+ y = tline->obj.bbox.y0;
if (tline->label_id) {
- ret = scene_obj_set_pos(scn, tline->label_id, tline->obj.bbox.x,
- y);
+ ret = scene_obj_set_pos(scn, tline->label_id,
+ tline->obj.bbox.x0, y);
if (ret < 0)
return log_msg_ret("tit", ret);
ret = scene_obj_set_pos(scn, tline->edit_id,
- tline->obj.bbox.x + 200, y);
+ tline->obj.bbox.x0 + 200, y);
if (ret < 0)
return log_msg_ret("tit", ret);
@@ -197,8 +197,8 @@ int scene_textline_render_deps(struct scene *scn,
if (ret)
return log_msg_ret("sav", ret);
- vidconsole_set_cursor_visible(cons, true, txt->obj.bbox.x,
- txt->obj.bbox.y, scn->cls.num);
+ vidconsole_set_cursor_visible(cons, true, txt->obj.bbox.x0,
+ txt->obj.bbox.y0, scn->cls.num);
}
return 0;
@@ -219,7 +219,7 @@ int scene_textline_open(struct scene *scn, struct scene_obj_textline *tline)
if (!txt)
return log_msg_ret("cur", -ENOENT);
- vidconsole_set_cursor_pos(cons, txt->obj.bbox.x, txt->obj.bbox.y);
+ vidconsole_set_cursor_pos(cons, txt->obj.bbox.x0, txt->obj.bbox.y0);
vidconsole_entry_start(cons);
cli_cread_init(&scn->cls, abuf_data(&tline->buf), tline->max_chars);
scn->cls.insert = true;