fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 03:27 PM |
I want to make a custom chat GUI that symbolizes certain words. For Instance, If I were to say, "Have a nice day! :)", an ImageLabel would replace the word ":)" with an actual Smile picture. What would I have to learn, or do, to make this possible?
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 03:31 PM |
Bump [1]
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
RogueMage
|
  |
| Joined: 28 Jan 2012 |
| Total Posts: 1235 |
|
|
| 23 Jun 2016 03:35 PM |
First of all, you'd have to have basic knowledge of GUI's.
I'm still kind of new to this so here's what I would do:
if TextBox.Text == ":)" then local smileGui = Instance.new("ImageLabel", TextBox) -- Create a new ImageLabel GUI smileGui.Size = UDim2.new(1, 0, 1, 0) -- Cover the entire TextBox smileGui.Image = (INSERT IMAGE LINK HERE FOR A SMILEY FACE) smileGui.ZIndex = TextLabel.ZIndex + 1 end
That's what I would do if you find out the TextBox text is ":)" |
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 03:41 PM |
I have knowledge on GUIs, It's just this one thing that's bothering me. Also, I would use string manipulation [I know this already], but I don't know how to place the image Over the text where ":)" Is located. Like twitch for example, some of Its emojis and how they work.
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 03:44 PM |
Bump [2]
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 03:55 PM |
Bump [3]
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 04:16 PM |
Bump [4]
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 05:02 PM |
Bump [5]
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 05:06 PM |
Lot of bumps.
You probably want to go learn how to manipulate strings.
http://wiki.roblox.com/index.php?title=String_pattern
Basically, become master with strings. That's the first step.
Then you gotta go through the string and look for keywords. (Hint, string.gmatch)
|
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 05:07 PM |
Yea, but how would I move the Image to the text?
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 05:10 PM |
You won't ask that if you understood how guis work and how to string manipulate.
|
|
|
| Report Abuse |
|
|
|
| 23 Jun 2016 06:08 PM |
I dont have too much expereince with string manipulation but I'd s string.find the last letter of the smiley face ")" and create an image inside the textlabel, and then I'd set the X.Offset of the image to (WIDTH * POS) + OFFSET
Where WIDTH is the pixel width of each letter in the textlabel POS is the substring position of the character retreived by string.find OFFSET is some value u can use to offset the smiley face from the ")" so you can position it Inbetween the ":)" |
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 23 Jun 2016 06:16 PM |
why has nobody mentioned textbounds yet use a localscript and get the textlabel's TextBounds.X, move the image label to UDim2.new(0,text.Position.X.Offset + text.TextBounds.X,0,text.Position.Y.Offset)
|
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 07:12 PM |
Thanks Guys, but I want It directly over the symbol. Just like in XAT, or Twitch's chatboxes.
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|
Borsy
|
  |
| Joined: 31 Jul 2014 |
| Total Posts: 15111 |
|
|
| 23 Jun 2016 07:14 PM |
what are you talking about
|
|
|
| Report Abuse |
|
|
fullajeh
|
  |
| Joined: 30 Jan 2013 |
| Total Posts: 196 |
|
|
| 23 Jun 2016 07:16 PM |
Sorry, i was on the earlier comments lol. Testing the others out right now.
~~~~~~ Big Daddy Long Legs Speaking! ~~~~~~ |
|
|
| Report Abuse |
|
|