summaryrefslogtreecommitdiff
path: root/src/gui/widget.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-06-21 20:25:27 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-06-21 20:25:27 +0200
commitc8f2689dbeca2bf51d41bbf861c495bb4b0c29ce (patch)
tree4d50fcd52ce35f58a686f14055e2d198b66a41e7 /src/gui/widget.c
parented983944d6d00a055ff90f04f6f1e12aca87bb86 (diff)
downloadabaos-c8f2689dbeca2bf51d41bbf861c495bb4b0c29ce.tar.gz
abaos-c8f2689dbeca2bf51d41bbf861c495bb4b0c29ce.tar.bz2
started to rewrite to use the main desktop widget
Diffstat (limited to 'src/gui/widget.c')
-rw-r--r--src/gui/widget.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widget.c b/src/gui/widget.c
index cd77d03..1c26680 100644
--- a/src/gui/widget.c
+++ b/src/gui/widget.c
@@ -15,7 +15,7 @@ static widget_vtable_t widget_vtable = {
widget_on_key_up
};
-void widget_init( widget_t *widget, widget_t *parent, const int x, const int y, const int w, const int h )
+void widget_init( widget_t *widget, widget_t *parent, const int x, const int y, const int w, const int h, const vga_color_t background_color )
{
memset( widget, 0, sizeof( widget_t ) );
@@ -24,6 +24,7 @@ void widget_init( widget_t *widget, widget_t *parent, const int x, const int y,
widget->y = y;
widget->w = w;
widget->h = h;
+ widget->background_color = background_color;
widget->vtable = &widget_vtable;
}
@@ -37,7 +38,7 @@ void widget_draw( void *obj, graphics_context_t *context )
widget->vtable->model_to_screen( widget, &x, &y );
vga_draw_rectangle( context, x, y, widget->w, widget->h,
- vga_make_RGB( 0xFF, 0xFF, 0xFF ) );
+ widget->background_color );
}
void widget_get_focus( void *obj, widget_t *widget )