[plugin] bbcode text

Post your completed addons to share with the community

Post » Tue Mar 01, 2016 4:45 am

Set text properties by bbcode
It supports bold, italic, text color, or size properties recently.
See demo first,
- type something at textbox

Document, plugin and sample capx are included.
It also supports scrolling and typing by rex_text_scrolling behavior / rex_text_typing behavior.
Last edited by rexrainbow on Wed Dec 21, 2016 7:59 am, edited 2 times in total.
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

Post » Tue Mar 01, 2016 6:30 am

nice job ! thks guy!
B
72
S
25
G
5
Posts: 89
Reputation: 7,275

Post » Mon Mar 07, 2016 7:06 pm

This is fantastic! Thank you so much. This is especially helpful for some of our clients who have specific branding standards for displaying their product and company names.
B
15
S
2
Posts: 10
Reputation: 822

Post » Sun Mar 13, 2016 12:43 am

Update
Fix bug of getting text width.
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

Post » Thu Mar 17, 2016 10:16 am

@zenox98

Would you please help me to move this thread into "completed addons"?
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

Post » Thu Mar 17, 2016 10:39 am

@rexrainbow
Moved as requested.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,391
Reputation: 58,464

Post » Wed Mar 23, 2016 5:13 pm

I'd love to see this integrated as an offical feature with a setting to enable BB code formatting for individual textboxes. Nice work @rexrainbow .
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,717

Post » Wed Apr 20, 2016 6:50 am

Amazing work @rexrainbow!

I've got a two questions about features that could be added in future if possible of course:
1. Would it be possible to add URL tags to make hyperlinks within the text?
2. Would it be possible to add "sprites" in form of IMG tags within the text (to add smiley's for example)?
Something like this in C2:
Code: Select all
This is just some random text including a smiley face [img=#SPRITENAMEHERE#][/img] in the middle of the text!
Result in the game view:
This is just some random text including a smiley face :D in the middle of the text!
ImageImageImage
B
61
S
22
G
78
Posts: 646
Reputation: 44,755

Post » Wed Apr 20, 2016 7:55 am

@TheRealDannyyy

They might be impossible.
- "hyperlinks" includes an area definition to cache the clicking for request1.
- mix an image also not easy in this plugin for request2.
B
108
S
26
G
268
Posts: 4,456
Reputation: 150,247

Post » Wed Apr 27, 2016 9:19 pm

@Rexrainbow

This works really well! I got it implemented into my existing system way easier than I thought I would. :)

One conflict I'm having is that I have a dialogue system that displays text letter-by-letter. Since the text is drawn this way, it will display the BBCode inputs letter-by-letter until the full code is complete.

https://dl.dropboxusercontent.com/u/13694360/RexBBCTest1.png

Do you know of any way to make this apply the BBCode before the final letters are made?

Thanks!

EDIT:

I did some thinking and developed a little trick to solve my problem. I'll post it here for the curious folks.

Basically I made it so that the normal letter-by-letter display would stop when it saw an open bracket and start again when it saw a closed bracket.

I had another variable (Text_Temp) keep track of the current letter in isolation by using mid(Text_Source.Text, Index, 1). The index variable increases by one every check, which is what determines how many letters I will display (the basic typewriter event). So if I have the sentence "Hello" in Text_Source.Text, when my index reaches three Text_Temp = "l" only.

Then I made a switch variable (Text_Switch). When Text_Temp = "[" then it bypasses the normal text display. When Text_Temp = "]" it resumes.

Here's a picture. Hope this helps anyone who has the same issue. :)

Image

Thanks again for this plugin, Rex! You're a real lifesaver!
B
24
S
6
G
6
Posts: 17
Reputation: 4,458

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 5 guests