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