I try to put smileys in my chat.
The chatbox is a textbox
I try this:
TextGadget(#edi,10,10,500,300,"")
smile$="This is a text <img src='smile.png' >"
SetGadgetText(#edi,smile)
But the picture is on the left side and the text on the right side.
Then I try this:
smile="This is a text <img src='smile.png' style='float:right ;width:12x;height:12px;'>"
Here the text is left, but the picture is far away on the right side.
I want it like a whats app chat. Text and after text the smily.
Any ideas?
Smiley in Chat
Re: Smiley in Chat
I have found a solution in the german purebasic forum:
"<img src='smile.png' style='float: none;margin: 0;padding: 0;vertical-align: middle;' />"
Thanks a lot to RSBasic!
But now I see unfortunately the image is not transparent. Do anyone know a solution?
"<img src='smile.png' style='float: none;margin: 0;padding: 0;vertical-align: middle;' />"
Thanks a lot to RSBasic!
But now I see unfortunately the image is not transparent. Do anyone know a solution?
Re: Smiley in Chat
Another solution: Emoji
https://unicode.org/emoji/charts/full-emoji-list.html
https://unicode.org/emoji/charts/full-emoji-list.html
Code: Select all
Procedure Emoji(Code.s)
!return String.fromCodePoint(v_code)
EndProcedure
Define font = LoadFont(#PB_Any, "Arial", 25)
OpenWindow(#PB_Any, 0, 0, 0, 0, "Test Smiley unicode", #PB_Window_Background)
TextGadget(0, 20, 20, 400, 30, "")
SetGadgetFont(0, FontID(font))
;Emoji = "0xYourCode" Example 0x1F61C
SetGadgetText(0, "Hello i'm an emoji " + Emoji("0x1F61C"))
➽ Windows 11 - JDK 1.8 - SB 2.40 - Android 13
➽ http://falsam.com
Sorry for my poor english