How to create a new window?

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.
User avatar
Khranos
Prole
Posts: 30
Joined: Tue Aug 11, 2015 1:22 am

Re: How to create a new window?

Post by Khranos »

Rickton wrote:-Cut-
Depending on how these loophole solutions work out, I'll likely be doing that in the end (it would much easier of course). However, I'm mostly trying to keep true windows in the usage because it seems a bit more novel and unique (to me, at least). Of course, novel will have its price, but I can see more people being interested.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: How to create a new window?

Post by Positive07 »

zorg wrote:[wiki]love.graphics.newScreenshot[/wiki]
That just takes a screenshot of the contents of the window, not the entire desktop unfortunately

You could just make them borderless and use something like this

Its not transparent but you dont have the annoying title bar on top which is nicer
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to create a new window?

Post by zorg »

Positive07 wrote:
zorg wrote:[wiki]love.graphics.newScreenshot[/wiki]
That just takes a screenshot of the contents of the window, not the entire desktop unfortunately
Sure, but apart from that one issue, the windows themselves would be "transparent" to each other, since the bottom one would be rendered by the top one, in a 2-window case.

Though borderless windows are indeed a good idea, just keep in mind, that you can only drag them if the cursor is inside the window; löve doesn't expose sdl2's SDL_GetGLobalMouseState, that would be needed for real borderless dragging (in windows, at least); then again, i did try to implement this, and it didn't work on osx, only on windows (didn't test any linux sadly), so yeah.
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
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: How to create a new window?

Post by Rucikir »

I really don't know if LOVE could work that way, but perhaps you link it with a gui framework, and use it as an OpenGL context to embed it in a window - or multiple windows, but transmitting inputs, events to LOVE, I don't know if it is possible.
This would require knowledge of C/C++ and the Lua C API.
You can try with Qt (C++, portable), this example might be somewhere to start.
Good luck !
rafaellonghi
Prole
Posts: 2
Joined: Tue Apr 14, 2020 10:26 pm

Re: How to create a new window?

Post by rafaellonghi »

Rickton wrote: Thu Aug 13, 2015 3:05 pm otherwise you'd have to deal with them being different on different OSs.
This is not the theme of this thread but I would like to add that you can make a borderless window and make your own menubar on top, so it wont change in each os and you can draw on it.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to create a new window?

Post by zorg »

rafaellonghi wrote: Fri May 08, 2020 6:47 pm
Rickton wrote: Thu Aug 13, 2015 3:05 pm otherwise you'd have to deal with them being different on different OSs.
This is not the theme of this thread but I would like to add that you can make a borderless window and make your own menubar on top, so it wont change in each os and you can draw on it.
2015
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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 2 guests