Marmalade SDK: Add a Label
We have to insert into our .ui file the label properties:
And in our code, we have to add this code:
CIwUILabel
{
name "Hello_World_label"
pos { 50, 50 }
sizeToContent true
font "times"
textColour { 0,0,255 }
caption "Hello, World!"
}
And in our code, we have to add this code:
// Load ui group which contains the specification for the label // as well as the font IwGetResManager()->LoadGroup("IwUIBasicLabelGroup.group"); // Clone label from loaded resource CIwUILabel* pLabel = (CIwUILabel*) CIwUIElement::CreateFromResource("Hello_World_label"); // Add the label to the UIView singleton IwGetUIView()->AddElement(pLabel);
Marmalade SDK: Add a Label
Reviewed by Unknown
on
22:27
Rating:
No hay comentarios: