Closed ArekMiszcz closed 4 months ago
Hi. Are you calling Slab.draw() before or after your own draw codes?
Hi, I'm calling Slab.draw() after, because I want to set the background image (not color) to the window so I have to draw it before I call Slab.draw().
I've also improved hiding chars behind password char because it was working only on unfocus event. It was problematic especially when I wanted to record the screen to show to someone what I've did. After those changes password is always hidden behind password char so there is no risk to share the password.
You should set the color before you draw your background image
But then Slab changing the alfa to the different value which hiding my background as well. Its working like that for select box which changing the alfa for scrollbar.
Are you trying to change the color of the slab widget(s)?
What i meant was do this:
lg.setBackgroundColor lg.setColor lg.drawImage
lg.setColor Slab.Draw
It won't help because Slab.Draw will overwrite it. By my changes I basically restoring back the colora after slab widget rendering. Thanks to that it don't impacting other drawings.
May I ask for more information? ( Either a screenshot or small reproduction of the issue or perhaps provide a code snippet reflecting your actual code in your rendering function (the previous code snippet lacks the setting of colors)
We can even make a quick call if that works for you :) if not I'll try to send you a movie on discord
Minimal code or love file would be better so i can run it on my machine as well
Ok, I'll do it
Here is the example of this problem. Just clone the Slab into slab_colors directory. You should be able to see black screen and when you hover over scrollbar then background should fade in.
Yeah the issue is you're not calling any love.graphics.setColor anywhere in your love.draw as I've said previously
Hmm, let me check this but do you think that it's a proper behavior that Slab influence on different drawings? Isn't better to pretend by doing this by reset this color?
And what do you think about the password? If this reset color isn't smth what you would like to implement I can move this password changes into different branch if you like it.
PS: sorry for using different accounts but on my mobile phone I'm logged in on company account.
Well the issue is not exclusive to slab at all. but as the user, you should correctly color and draw your stuff.
The password issue should be a different issue/pr
Ok, so I gonna close this PR and create new one for password issue
I had a problem when I was trying to draw smth next to Slab.draw() into render function, because Slab draw command was overwriting my colors. I've realised that draw command not reset its color so I did it into this PR.