Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
How do I init in code the font properties of a 2Doverlay ? it expects these 6 properties: 1- Point Size: 12, 2 - Face Name: "Arial", 3 - Style: "Nortmal", 4 - Weight: "Normal", 5 - Underlined: "False", <--- ? typo in Properties panel ? 6 - Family: "Swiss" I do like this: var oFont = {12,"Arial","Normal","Normal","False","Swiss"}; ccbSetSceneNodeProperty(nThingy, "Font", oFont ); Error :insufficient number of parameters ??? |
||||
|
Did you typeof the params? |
||||
|
Do it like this.
|
||||
|
Thanks just_in_case wrote: Do it like this.
Not Underlinedworks with string: "False" where I expected to see logical: false then this should be:
also text color is not as expected: vColor = new vector3d(255,255,175); // numbers but color is distorted from selected values vColor = {"255", "255", "175"}; // string object ccbSetSceneNodeProperty(nDialog, "Text Color", vColor ); now correct color. now I try to calculate the Pixel length of a given string:
function needed to customize the 2doverlay node for dialogs etc. Can pad with spaces and newlines \n to outline with underlying speechballoon image for example. |
|