Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] EditBox background image transparency

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Apr 2019 21:49 Edited at: 3rd Apr 2019 21:49
Does anyone know how i can get a background image with transparency to work with Edit Boxes?
Currently it looks like this


I have attached the project for anyone to have a look at

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Apr 2019 22:24 Edited at: 4th Apr 2019 01:31
This post has been marked by the post author as the answer.
Solved! You have to SetEditBoxBorderColor(id, 0, 0, 0, 0) to transparent, even if you have SetEditBoxBorderSize() to zero

Also if you use SetEditBoxBackgroundImage() in conjunction with GetEditBoxBorderImage() it works
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 3rd Apr 2019 22:27 Edited at: 3rd Apr 2019 22:28
I would've thought transparency images would've just worked by default
but you could use SetEditBoxBackgroundColor (id,255, 255,255, alpha)
if that's the effect your after


Edit: your too quick lol I just posted but you beat me to it
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Apr 2019 23:24 Edited at: 4th Apr 2019 02:33
I'm too slack! I should investigate more before posting
Another question I have is this;
I am using a background image which has rounded corners. Is there a way i can shift the text to the right so that it doesn't interfere with the rounded border.
Not a good example i know but in the second image the text is moved to the right

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-28 18:44:30
Your offset time is: 2024-03-28 18:44:30