Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Is scalable text in 2D overly possible?

srfstudio
Registered User
Quote
2018-09-20 22:06:36

After unsuccessfully trying to setup my GUI, I realized that the problem is related to the text in 2D overly objects.

I thought that the 'Font / Point Size' parameter was in vh, em or some other scalable/responsive unit but it's completely un-scalable and messing up my GUI

Is it possible to make text scalable or, at least, make the whole 2D overly object un-scalable so that everything stays in place?

///////////////// Edit:

Nope, even without the text GUI images are losing their place. It seems that the whole 2D overly object is un-scalable if it's not one-piece image...

///////////////// Edit Edit:

It seems that images are scalable if the game window stays in the same aspect ratio while being scaled. So I just have to get the right aspect ratio of the editor window in order to create a GUI.

Text is, however, not scalable whatever aspect ratio game window is in.


niko
Moderator
Quote
2018-09-21 08:21:45

Yes, that's true, text won't scale, but it would be an idea. Wasn't suggested before.


srfstudio
Registered User
Quote
2018-09-22 02:22:35

Thank you for reply, text scaling would be a great addition.

My GUI is very simple so I decided to change Position Mode to Absolute & move everything to the top-left corner. However more complex GUIs with images & texts that are also meant to work with multiple resolutions would be impossible to achieve at this point without custom scripts.


just_in_case
Moderator
Quote
2018-09-22 17:14:00

this was suggested a year ago by @Ishmaru....https://www.ambiera.com/forum.ph...

i know he didn't suggested it but he actually asked how to do it, but the idea was same behind this... it would be good to have...
and it will be also good if we can use textures which are not in power of two for 2D overlay to prevent duplicating them on the overlay....

or there must be an option of repeat texture count, just like we have in planemeshes....


Robo
Guest
Quote
2021-07-05 11:07:45

This works:

var s = 22;
var tex = s + "; Swiss; Arial; Normal; Normal; Not Underlined";
ccbSetSceneNodeProperty(node, 'Font', tex);}


just_in_case
Moderator
Quote
2021-07-05 15:11:25

@Robo you are replying to an old post, but it can be good for others, cause many people are not aware of this, I recently answered a question and posted the same on the @Scripting channel on My discord server about a month ago cause someone asked me the same question.

anyways thanks for sharing this, might help some of the fellow members out there.


Robo
Guest
Quote
2021-07-06 02:26:43

cheers, yes, I do that on purpose rather than typically creating new posts as better to have all the info in one place when users search for it....you what they say..."great minds think alike.."


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact