Skip to content

Commit ef7c139

Browse files
committed
chore: reposition text wrap in ui test scene
1 parent 7216ee4 commit ef7c139

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

scenes/80,-3-ui/src/raw-text-wrap.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const BASE_TRANSFORM: PBUiTransform = {
7979
paddingBottom: 0
8080
}
8181

82-
function createPanel(leftPercent: number, topPercent: number): Entity {
82+
function createPanel(rightPercent: number, topPercent: number): Entity {
8383
const entity = engine.addEntity()
8484

8585
UiTransform.create(entity, {
@@ -89,8 +89,8 @@ function createPanel(leftPercent: number, topPercent: number): Entity {
8989
height: PANEL_HEIGHT,
9090
heightUnit: YGUnit.YGU_POINT,
9191
positionType: YGPositionType.YGPT_ABSOLUTE,
92-
positionLeft: leftPercent,
93-
positionLeftUnit: YGUnit.YGU_PERCENT,
92+
positionRight: rightPercent,
93+
positionRightUnit: YGUnit.YGU_PERCENT,
9494
positionTop: topPercent,
9595
positionTopUnit: YGUnit.YGU_PERCENT
9696
})
@@ -107,7 +107,7 @@ function createPanel(leftPercent: number, topPercent: number): Entity {
107107
export function setupRawTextWrapTest() {
108108
// 'textWrap' is deliberately omitted, so the field is absent from the wire and the
109109
// renderer has to fall back to the proto default TW_WRAP: this text must wrap.
110-
UiText.create(createPanel(3, 52), {
110+
UiText.create(createPanel(15, 5), {
111111
value: WRAP_TEXT,
112112
fontSize: 18,
113113
color: Color4.White()
@@ -116,7 +116,7 @@ export function setupRawTextWrapTest() {
116116
// Control with the same panel geometry, differing only in that 'textWrap' is sent: this text
117117
// must stay on a single line regardless of what the default is. It spills past the panel
118118
// edges because 'overflow' is left at its YGO_VISIBLE default, so nothing clips it.
119-
UiText.create(createPanel(3, 75), {
119+
UiText.create(createPanel(15, 28), {
120120
value: NO_WRAP_TEXT,
121121
fontSize: 18,
122122
color: Color4.White(),

0 commit comments

Comments
 (0)