diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 19:22:49 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 19:54:51 +0300 |
commit | ae45d6cf5a564851a9b9d58e05425e4cf1dfe8aa (patch) | |
tree | a77c33ad3ee30774bb303dc653fba5c2b899f707 /boot/scene_menu.c | |
parent | 2d6ee92c6af06eeb7f7410180d5faa8f5e840bbb (diff) | |
download | u-boot-ae45d6cf5a564851a9b9d58e05425e4cf1dfe8aa.tar.xz |
expo: Add width and height to objects
At present objects only have a position so it is not possible to determine
the amount of space they take up on the display.
Add width and height properties, using a struct to keep all the dimensions
together.
For now this is not used. Future work will set up these new properties.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/scene_menu.c')
-rw-r--r-- | boot/scene_menu.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/boot/scene_menu.c b/boot/scene_menu.c index 8b04d44031..eed7565f6a 100644 --- a/boot/scene_menu.c +++ b/boot/scene_menu.c @@ -49,9 +49,9 @@ int scene_menu_arrange(struct scene *scn, struct scene_obj_menu *menu) int y, cur_y; int ret; - y = menu->obj.y; + y = menu->obj.dim.y; if (menu->title_id) { - ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.x, y); + ret = scene_obj_set_pos(scn, menu->title_id, menu->obj.dim.x, y); if (ret < 0) return log_msg_ret("tit", ret); @@ -89,18 +89,18 @@ int scene_menu_arrange(struct scene *scn, struct scene_obj_menu *menu) * pointer, then the key and the description */ if (item->label_id) { - ret = scene_obj_set_pos(scn, item->label_id, menu->obj.x, + ret = scene_obj_set_pos(scn, item->label_id, menu->obj.dim.x, y); if (ret < 0) return log_msg_ret("nam", ret); } - ret = scene_obj_set_pos(scn, item->key_id, menu->obj.x + 230, + ret = scene_obj_set_pos(scn, item->key_id, menu->obj.dim.x + 230, y); if (ret < 0) return log_msg_ret("key", ret); - ret = scene_obj_set_pos(scn, item->desc_id, menu->obj.x + 280, + ret = scene_obj_set_pos(scn, item->desc_id, menu->obj.dim.x + 280, y); if (ret < 0) return log_msg_ret("des", ret); @@ -134,7 +134,7 @@ int scene_menu_arrange(struct scene *scn, struct scene_obj_menu *menu) * points to */ ret = scene_obj_set_pos(scn, menu->pointer_id, - menu->obj.x + 200, cur_y); + menu->obj.dim.x + 200, cur_y); if (ret < 0) return log_msg_ret("ptr", ret); } |