How do you draw text on top of a rectangle that is already drawn?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
edgemaster1
Prole
Posts: 1
Joined: Sun Apr 02, 2017 2:40 am

How do you draw text on top of a rectangle that is already drawn?

Post by edgemaster1 »

I want to make little tooltips on this little interactive thing i'm making that is informative on historic events.
So, what I did was that I created a background image, added little areas that when your mouse hovers over them, draws a rectangle and is supposed to draw text over that rectangle. But that doesn't happen for some reason. oddly, I can draw another rectangle over that rectangle, but I can't draw text.

Can someone explain why this is the case and how to fix this?
Attachments
oof.love
(6.59 MiB) Downloaded 148 times
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: How do you draw text on top of a rectangle that is already drawn?

Post by Jasoco »

First, you packaged the .love file wrong. You need to zip the contents, not the folder.

Second, you forgot to set the color of the text so it's drawing in the same color as the rectangle, as far as I can tell without actually having to unpackage it and package it correctly myself.
User avatar
mtdev
Prole
Posts: 20
Joined: Mon Feb 20, 2017 5:10 am
Location: Midwest US

Re: How do you draw text on top of a rectangle that is already drawn?

Post by mtdev »

Think you are rotating the text off the screen.

Just give it the x and y

Code: Select all

love.graphics.draw(slide_1_caption, 928,145)
:P
Post Reply

Who is online

Users browsing this forum: slime and 5 guests