Posted By
|
Message
|
Sumo148 Super amazing fantastic user
Registered 26/01/2009
Points 530
|
10th September, 2009 at 00:51:28 -
is it possible to put smile icon images into a rich edit box? I'm trying to include it in my online chat room. Thanks
n/a
|
OMC What a goofball
Registered 21/05/2007
Points 3516
|
10th September, 2009 at 01:40:09 -
Check out this example: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=148954#Post148954 and talk to Jon Lambert if you have trouble.
|
Sumo148 Super amazing fantastic user
Registered 26/01/2009
Points 530
|
10th September, 2009 at 01:57:11 -
woah
What's up with the emotion "strings"? Is it some kind of code?
n/a
|
Jon Lambert Administrator
Vaporware Master
Registered 19/12/2004
Points 8235
|
10th September, 2009 at 04:23:52 -
The emotion strings are code, yes. They are the code for each of those images on the bottom bar, as they would be if you "hacked" an rtf file with pictures in it. Either way, the text for a smiley is found by the rich edit object through an event using the Special object's Find string in string action. Then it sets the rich edit to find and select that string and then paste an image into its place. You can paste using the Screen Capture object to take a picture (like I did) or use the Power System object to send external images to the clipboard, and probably other objects as well.
That example uses a fast loop to do it, which is okay. Mine uses Find string in string (as I mentioned earlier) like so:
Find(GetText$( "Conversation", 0, GetNChars( "Conversation" )), "", 0)=""
Which requires only one event, whereas the fastloop required two. Then it selects that text, uses the Screen Capture object to take a picture of the applicable emoticon, pastes that to the clipboard, then pastes it into the selected text.
If I was confusing (because I probably was) then I'd be happy to clarify.
Edited by an Administrator
Sandwich Time!Whoo!
JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364
|
Sumo148 Super amazing fantastic user
Registered 26/01/2009
Points 530
|
11th September, 2009 at 00:06:21 -
so do I have to somehow edit each string, or make a string for each icon?
n/a
|
Jon Lambert Administrator
Vaporware Master
Registered 19/12/2004
Points 8235
|
11th September, 2009 at 00:24:04 -
You don't have to use strings if you don't want to, although you obviously can, by that example. You have a number of ways you can do it. If you want to do it internally by image, then you can make each emoticon a separate object and have the Screen Capture object take pictures of them and paste them to the clipboard like I did (make sure the Screen Capture object is above the emoticons and that there is nothing between them and the SCO or below the emoticons). Otherwise you can use external image files by using the Power System object to paste an external image file to the clipboard and then paste it from there.
Sandwich Time!Whoo!
JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364
|
Sumo148 Super amazing fantastic user
Registered 26/01/2009
Points 530
|
11th September, 2009 at 00:34:35 -
when using the screen capture object, can you capture one active (including transparency) or should I just add a white background behind then and then capture that?
Also is it possible to restrict the player from stretching the icons while they're in the rich edit box?
n/a
|
Jon Lambert Administrator
Vaporware Master
Registered 19/12/2004
Points 8235
|
11th September, 2009 at 01:21:34 -
You should probably put a background behind it or just leave the frame itself behind it. Also, you should probably have read-only on so they shouldn't be able to stretch the image.
Sandwich Time!Whoo!
JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364
|
|
|