|
|
|
|
@ -72,27 +72,31 @@ textInput2 = {
|
|
|
|
|
cursorX = measureText textBeforeCursor;
|
|
|
|
|
padding = 8;
|
|
|
|
|
|
|
|
|
|
Clickable {
|
|
|
|
|
event = config.onFocus,
|
|
|
|
|
child =
|
|
|
|
|
Stack {
|
|
|
|
|
children = [
|
|
|
|
|
Rect { w = config.w, h = config.h, color = "rgba(240,240,240,0.9)", radius = 4 },
|
|
|
|
|
Clip {
|
|
|
|
|
w = config.w,
|
|
|
|
|
h = config.h,
|
|
|
|
|
child = Clickable {
|
|
|
|
|
event = config.onFocus,
|
|
|
|
|
child =
|
|
|
|
|
Stack {
|
|
|
|
|
children = [
|
|
|
|
|
Rect { w = config.w, h = config.h, color = "rgba(240,240,240,0.9)", radius = 4 },
|
|
|
|
|
|
|
|
|
|
Positioned {
|
|
|
|
|
x = 8 - state.scrollOffset,
|
|
|
|
|
y = 8,
|
|
|
|
|
child = Text { content = state.text, x = 0, y = 17 }
|
|
|
|
|
},
|
|
|
|
|
Positioned {
|
|
|
|
|
x = 8 - state.scrollOffset,
|
|
|
|
|
y = 8,
|
|
|
|
|
child = Text { content = state.text, x = 0, y = 17 }
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
(config.focused
|
|
|
|
|
| True \ Positioned {
|
|
|
|
|
x = 8 + cursorX - state.scrollOffset,
|
|
|
|
|
y = 8,
|
|
|
|
|
child = Rect { w = 2, h = 24, color = "black" }
|
|
|
|
|
}
|
|
|
|
|
| _ \ Rect { w = 0, h = 0, color = "transparent" })
|
|
|
|
|
]
|
|
|
|
|
(config.focused
|
|
|
|
|
| True \ Positioned {
|
|
|
|
|
x = 8 + cursorX - state.scrollOffset,
|
|
|
|
|
y = 8,
|
|
|
|
|
child = Rect { w = 2, h = 24, color = "black" }
|
|
|
|
|
}
|
|
|
|
|
| _ \ Rect { w = 0, h = 0, color = "transparent" })
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|