Add text_valign="top" support to GUI engine
This commit is contained in:
parent
8d565fba11
commit
7b903a09ba
@ -309,11 +309,12 @@ namespace GUIEngine
|
||||
For icon buttons. A different icon to show when the item is focused.
|
||||
|
||||
\n
|
||||
\subsection prop4 PROP_TEXT_ALIGN
|
||||
<em> Name in XML files: </em> \c "text_align"
|
||||
\subsection prop4 PROP_TEXT_ALIGN, PROP_TEXT_VALIGN
|
||||
<em> Name in XML files: </em> \c "text_align", "text_valign"
|
||||
|
||||
used exclusively by label components. Value can be "right" or "center" (left
|
||||
used if not specified).
|
||||
used if not specified) for "text_align", or "top"/"center"/"bottom" for
|
||||
valign.
|
||||
|
||||
\n
|
||||
\subsection prop5 PROP_WORD_WRAP
|
||||
|
@ -210,6 +210,7 @@ if(prop_name != NULL) widget.m_properties[prop_flag] = core::stringc(prop_name).
|
||||
READ_PROPERTY(icon, PROP_ICON);
|
||||
READ_PROPERTY(focus_icon, PROP_FOCUS_ICON);
|
||||
READ_PROPERTY(text_align, PROP_TEXT_ALIGN);
|
||||
READ_PROPERTY(text_valign, PROP_TEXT_VALIGN);
|
||||
READ_PROPERTY(min_value, PROP_MIN_VALUE);
|
||||
READ_PROPERTY(max_value, PROP_MAX_VALUE);
|
||||
READ_PROPERTY(square_items, PROP_SQUARE);
|
||||
|
@ -98,6 +98,7 @@ namespace GUIEngine
|
||||
PROP_ICON,
|
||||
PROP_FOCUS_ICON,
|
||||
PROP_TEXT_ALIGN,
|
||||
PROP_TEXT_VALIGN,
|
||||
PROP_MIN_VALUE,
|
||||
PROP_MAX_VALUE,
|
||||
PROP_MAX_WIDTH,
|
||||
|
@ -76,7 +76,9 @@ void BubbleWidget::replaceText()
|
||||
else if (m_properties[PROP_TEXT_ALIGN] == "right") align = EGUIA_LOWERRIGHT;
|
||||
else if (translations->isRTLText(message)) align = EGUIA_LOWERRIGHT;
|
||||
|
||||
EGUI_ALIGNMENT valign = EGUIA_CENTER ; //TODO: make label v-align configurable through XML file?
|
||||
EGUI_ALIGNMENT valign = EGUIA_CENTER;
|
||||
if (m_properties[PROP_TEXT_VALIGN] == "top") valign = EGUIA_UPPERLEFT;
|
||||
if (m_properties[PROP_TEXT_VALIGN] == "bottom") valign = EGUIA_LOWERRIGHT;
|
||||
|
||||
// find expanded bubble size
|
||||
int text_height = irrwidget->getTextHeight();
|
||||
|
@ -66,7 +66,10 @@ void LabelWidget::add()
|
||||
EGUI_ALIGNMENT align = EGUIA_UPPERLEFT;
|
||||
if (m_properties[PROP_TEXT_ALIGN] == "center") align = EGUIA_CENTER;
|
||||
else if (m_properties[PROP_TEXT_ALIGN] == "right") align = EGUIA_LOWERRIGHT;
|
||||
EGUI_ALIGNMENT valign = EGUIA_CENTER ; //TODO: make label v-align configurable through XML file?
|
||||
|
||||
EGUI_ALIGNMENT valign = EGUIA_CENTER ;
|
||||
if (m_properties[PROP_TEXT_VALIGN] == "top") valign = EGUIA_UPPERLEFT;
|
||||
if (m_properties[PROP_TEXT_VALIGN] == "bottom") valign = EGUIA_LOWERRIGHT;
|
||||
|
||||
IGUIStaticText* irrwidget;
|
||||
if (m_scroll_speed != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user