here im trying to create a scrollable panel by creating this small panel
const COLOR_PRIMARY = 0x4e342e;
var CreatePanel = function (scene) {
var panel = scene.rexUI.add.sizer({
width: 100,
orientation: 'y',
space: { item: 4 }
})
for (var i = 0; i < 50; i++) {
var name = `item-${i}`;
var label = scene.rexUI.add.label({
height: 350,
width: 1500,
background: scene.rexUI.add.roundRectangle({
color: COLOR_PRIMARY
}),
text: scene.add.text(
10,
10,
'Lorem Ipsum is simply dummy text of the pinting'),
name: name,
})
panel.add(label, { expand: true });
}
return panel;
}
but i dont know how to add an image as icon, and how to resize text inside panel.
Please help!
New contributor
Viễn Thông Điện tử is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.