summaryrefslogtreecommitdiff
path: root/textscreen/txt_widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'textscreen/txt_widget.c')
-rw-r--r--textscreen/txt_widget.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/textscreen/txt_widget.c b/textscreen/txt_widget.c
index 8aa633d9..8411ac5b 100644
--- a/textscreen/txt_widget.c
+++ b/textscreen/txt_widget.c
@@ -51,6 +51,10 @@ void TXT_InitWidget(TXT_UNCAST_ARG(widget), txt_widget_class_t *widget_class)
widget->selectable = 1;
widget->visible = 1;
+
+ // Align left by default
+
+ widget->align = TXT_HORIZ_LEFT;
}
void TXT_SignalConnect(TXT_UNCAST_ARG(widget),
@@ -143,4 +147,11 @@ int TXT_WidgetKeyPress(TXT_UNCAST_ARG(widget), int key)
return 0;
}
+void TXT_SetWidgetAlign(TXT_UNCAST_ARG(widget), txt_horiz_align_t horiz_align)
+{
+ TXT_CAST_ARG(txt_widget_t, widget);
+
+ widget->align = horiz_align;
+}
+