
-----------------------------------
conbunthedestroyer
Thu Jun 08, 2017 7:58 pm

Font being covered by box
-----------------------------------
What is it you are trying to achieve?
Make the font not be covered by the box when it's being drawn


What is the problem you are having?
The font is being covered by the box


Describe what you have tried to solve this problem
Tbh, not much, but I can't really think of anything to do other than put the font draw inside the loop, which is a problem in and of itself (for reasons, I don't want it to be inside the loop). Like, I understand that the box is being drawn over the text, but is there any way to stop that from happening? Can I make the box not be drawn on top without putting the Font.Draw inside the loop?


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)



var testFont : int  := Font.New ("serif:30")
var mouseX, mouseY, b : int

setscreen ("graphics: max;max")

proc testDrawing
Font.Draw ("Shibbity boop", 130, 590, testFont, white)
end testDrawing

proc boxDrawing
Draw.FillBox (70, 530, 570, 680, white)
    Draw.FillBox (75, 535, 565, 675, 18)

    Draw.FillBox (670, 530, 1170, 680, white)
    Draw.FillBox (675, 535, 1165, 675, 18)

    Draw.FillBox (70, 330, 570, 480, white)
    Draw.FillBox (75, 335, 565, 475, 18)

    Draw.FillBox (670, 330, 1170, 480, white)
    Draw.FillBox (675, 335, 1165, 475, 18)
    
    loop
        Mouse.Where (mouseX, mouseY, b)
        if mouseX >= 75 and mouseX = 535 and mouseY = 675 and mouseX = 535 and mouseY = 75 and mouseX = 335 and mouseY = 675 and mouseX = 335 and mouseY = 75 and mouseX = 535 and mouseY 