Keep love window on top?

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
User avatar
rougan
Citizen
Posts: 58
Joined: Wed Aug 12, 2015 10:30 am

Keep love window on top?

Post by rougan »

Is there a way to keep the love game window on top of other windows regardless of it's focus?
Thanks!
User avatar
Vimm
Party member
Posts: 113
Joined: Wed Mar 16, 2016 8:14 pm

Re: Keep love window on top?

Post by Vimm »

rougan wrote:Is there a way to keep the love game window on top of other windows regardless of it's focus?
Thanks!
I'm not 100% sure on this but maybe try having a function that checks if the window is visible and if it isn't make it visible.

Sometime like

Code: Select all

function love.load()
	visible = love.window.isVisible()
end

function love.update(dt)
	setVisible()
end

function setVisible()
	if not visible then
		visible = true
	end
end
I'm new to programming and love and have also not tested this, but I assume the concept works, if not im sorry lol
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Keep love window on top?

Post by zorg »

It won't work; visibility means whether it's minimized to the tray or not.
Also, SDL doesn't give you that functionality either. See this thread.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
rougan
Citizen
Posts: 58
Joined: Wed Aug 12, 2015 10:30 am

Re: Keep love window on top?

Post by rougan »

Ah right, sorry should've done a more thorough search before I posted!
Thanks zorg (and Vimm) :nyu:
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest