Plugins: show text by sprites

Post your completed addons to share with the community

Post » Sun Jun 09, 2013 5:35 am

@jayderyu

It is possible to have a single "sprite text" absolutely. There will be a single plugin if it is an official one.

The problem is, I'm just a part time plugin maker. I need to find a way to reduce the maintenance effort.
Combined plugins will more easier to maintain (and less bugs), since I don't need to copy most code to create another arrangement of characters, for example.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Sun Jun 09, 2013 5:52 am

@Zharzew

Thanks for these suggestions, I will try.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Sun Jun 09, 2013 6:08 am

Update

Behavior: Layouter_Linear , changing property name "Delta distance" to "Spacing" in properties table.rexrainbow2013-06-09 06:10:28
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Sun Jun 09, 2013 6:47 am

@rexrainbow

Sorry for my ignorance, but what is the best way to 'hide' or 'remove' a layouter? Usually, there would be a 'show' / 'hide' command, but all I see is Create Reference and Remove Reference, which I don't think do what I need.

Basically, what is the best way to Show and Hide text? None of your examples has any 'removing' of a sprite, hence my confusion. :/

Thanks a lot! :)
B
8
S
2
G
4
Posts: 64
Reputation: 3,199

Post » Sun Jun 09, 2013 7:07 am

@Zharzew

Do you mean a visible action to set invisible to all characters?rexrainbow2013-06-09 07:08:10
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Sun Jun 09, 2013 7:16 am

@rexrainbow

Yeah, set all sprites of a layouter object to invisible / hidden. Destroy will 'destroy' the object, so that is no good (as you know), and the Create / Remove instances seem better suited for multiple creations of a layouter.

In my case, I just want to display text, and then hide it later. Basically I am using layouter in place of spritefont.
B
8
S
2
G
4
Posts: 64
Reputation: 3,199

Post » Sun Jun 09, 2013 9:11 am

@rexrainbow

Sorry to bother you more, but right now you have to write a function to resize a sprite (as seen in your text example). Is there a way that the layouter could have a command to scale all associated sprites that are a part of it? This would make scaling text and such much easier than writing a function to do so.

I am currently setting all the text to "" to hide them (essentially blank). Is this a sufficient practice? This is needed since the layouters I am using are global and used in a end level score card.
B
8
S
2
G
4
Posts: 64
Reputation: 3,199

Post » Sun Jun 09, 2013 9:44 am

@zharzew

Okay, I will add action to set visible , opacity to all sprites.
The scale changing only set the scale of each sprite, not the spacing. Is it ok?
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Sun Jun 09, 2013 9:47 am

[QUOTE=Zharzew] @rexrainbow

Is it possible to align the text using an image point? I am noticing that it aligns to whatever edge you have selected (ie left). I am just trying to center some text and it is aligning just off center, because of this.

Thanks for any help! This thing is awesome! :)[/QUOTE]

I am not sure, do you want to alignment text to a target position? You might set the position of layouter object first, then set text.
B
108
S
26
G
267
Posts: 4,456
Reputation: 149,747

Post » Sun Jun 09, 2013 10:34 am

@rexrainbow

Scaling the sprite, but leaving the spacing between them should work great! :)

As for the alignment or the sprite, I am already aligning the layouter object to be center, it is the collected sprites that is not centering (they are just off center, it is really weird). It easiest to see when there is just one sprite that draws, multiple sprites (ie 2 or more) seem to center much better. When just one is there, it appears that it is aligning the 'left side of the sprite' to the center (of the layouter), not the 'center of the sprite'. I hope that makes sense.

I guess I was thinking if we could have the sprite align to the origin point (or any image point) it would be easier to do just that (basically just put the image point at the center of your sprite). This could open up all sorts of neat alignment tricks potentially.

Thanks again! You are too awesome! This plugin is just great, just like all your other work! :)Zharzew2013-06-09 10:35:38
B
8
S
2
G
4
Posts: 64
Reputation: 3,199

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests