Testing mixing styles
This commit is contained in:
@ -15,18 +15,18 @@
|
||||
|
||||
<child>
|
||||
<UIRichTextLabel
|
||||
alignment="0, 0, 0, 0"
|
||||
alignX="UI_COMPONENT_ALIGN_STRETCH"
|
||||
alignY="UI_COMPONENT_ALIGN_STRETCH"
|
||||
alignment="0, 0, 65, 192"
|
||||
alignUnitLeft="UI_COMPONENT_ALIGN_UNIT_PERCENT"
|
||||
alignUnitRight="UI_COMPONENT_ALIGN_UNIT_PERCENT"
|
||||
alignX="UI_COMPONENT_ALIGN_MIDDLE"
|
||||
alignY="UI_COMPONENT_ALIGN_MIDDLE"
|
||||
ref="uiLabel"
|
||||
>
|
||||
<font font="font_arial" size="32">
|
||||
Hello World
|
||||
How are you today?
|
||||
How <font color="RED">are</font> you today?
|
||||
I'm doing great, thanks!
|
||||
Thanks, me too!
|
||||
</font>
|
||||
<font font="font_arial" size="36" color="RED">
|
||||
Glad to hear it!
|
||||
I'm glad to hear it too!
|
||||
What a great day!
|
||||
@ -40,5 +40,5 @@
|
||||
</UIRichTextLabel>
|
||||
</child>
|
||||
|
||||
<VNTextboxScroller ref="textboxScroller" label="uiLabel" />
|
||||
<VNTextboxScroller ref="textboxScroller" label="uiLabel" visibleLines="6" />
|
||||
</prefab>
|
@ -25,9 +25,10 @@ void VNTextboxScroller::onStart() {
|
||||
this->label->quadCount = 0;
|
||||
this->readyToClose = false;
|
||||
};
|
||||
x();
|
||||
|
||||
useEvent(x, this->label->eventTextChanged);
|
||||
useEffect(x, visibleLines)();
|
||||
useEffect(x, visibleLines);
|
||||
|
||||
useEvent([&](float_t delta){
|
||||
auto game = this->getGame();
|
||||
|
@ -16,13 +16,11 @@ UIBorder::UIBorder(SceneItem *item) :
|
||||
}
|
||||
|
||||
float_t UIBorder::getContentWidth() {
|
||||
if(this->texture != nullptr) return this->texture->getWidth();
|
||||
return this->width;
|
||||
return this->width - this->borderSize._realValue.x * 2.0f;
|
||||
}
|
||||
|
||||
float_t UIBorder::getContentHeight() {
|
||||
if(this->texture != nullptr) return this->texture->getHeight();
|
||||
return this->height;
|
||||
return this->height - this->borderSize._realValue.y * 2.0f;
|
||||
}
|
||||
|
||||
float_t UIBorder::getChildOffsetX() {
|
||||
|
Reference in New Issue
Block a user