Windows bubble notifications

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.
PartyCow
Prole
Posts: 18
Joined: Sat Nov 17, 2012 3:12 pm

Windows bubble notifications

Post by PartyCow »

Hey

As the title says, is there a way to replicate a such thing as the windows built in bubble notifications?
(I'm speaking about those classic good ol' windows XP notifications)
Looking to make the window not showing, but notifications still on top.

Really interesting to know if this could work.

Thanks
User avatar
ivan
Party member
Posts: 1915
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Windows bubble notifications

Post by ivan »

I suppose it wouldn't be too hard to draw something similar in the game window using love.graphics.
If you mean an OS notification that is independent of the Love2d window then probably no because it would break compatibility with other platforms like Mac or Linux.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Windows bubble notifications

Post by Jasoco »

ivan wrote:I suppose it wouldn't be too hard to draw something similar in the game window using love.graphics.
If you mean an OS notification that is independent of the Love2d window then probably no because it would break compatibility with other platforms like Mac or Linux.
Both OS X and Linux both have their own notification systems that work the same way. Or at least OS X does.

It would probably be trivial for the Löve devs to implement, but is there a reason to do so?
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Windows bubble notifications

Post by josefnpat »

Jasoco wrote:It would probably be trivial for the Löve devs to implement, but is there a reason to do so?
IMO It would be really hard to do so reliably.

For example, gnome has libnotify, which would do something along these lines;

Code: Select all

os.execute('notify-send Hello World')
But we all know many linux distros don't have gnome, and use alternate notification libraries.

For OSX it's odd because the notification was only included in the last few releases (Mavericks?). Before that one had to use growl.

With the Mavericks, one would use action script;

Code: Select all

os.execute('actionscript-binary "display notification 'Lorem ipsum dolor sit amet' with title 'Title'")
For Windows, I assume you would have to use the windows api;

This would be really hard to reliably get to work cross-platform if you ask me.
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Zeliarden
Party member
Posts: 139
Joined: Tue Feb 28, 2012 4:40 pm

Re: Windows bubble notifications

Post by Zeliarden »

Maybe?
http://luajit.org/ext_ffi.html

Code: Select all

local ffi = require("ffi")
ffi.cdef[[
int MessageBoxA(void *w, const char *txt, const char *cap, int type);
]]
ffi.C.MessageBoxA(nil, "Hello world!", "Test", 0)
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Windows bubble notifications

Post by Positive07 »

You might want to download the nighty builds for LOVE 0.9.2 since this version supports message boxes through the love.window.showMessageBox api, you can get more info here

Or just wait for 0.9.2 to be released but that might take its time
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
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Windows bubble notifications

Post by Jasoco »

Positive07 wrote:You might want to download the nighty builds for LOVE 0.9.2 since this version supports message boxes through the love.window.showMessageBox api, you can get more info here

Or just wait for 0.9.2 to be released but that might take its time

Code: Select all

HTTP ERROR 404

Problem accessing /job/LOVE-OSX/lastSuccessfulBuild/artifact/love-osx.zip. Reason:

    Not Found
Now I'm sad. :cry:

Please fix please! I want 0.9.2 because it fixes an issue I reported about teeny tiny error messages on HighDPI enabled projects on Retina displays.
Last edited by Jasoco on Wed Sep 24, 2014 11:18 pm, edited 2 times in total.
PartyCow
Prole
Posts: 18
Joined: Sat Nov 17, 2012 3:12 pm

Re: Windows bubble notifications

Post by PartyCow »

I'll look into these things, thanks people!
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Windows bubble notifications

Post by Ref »

On my system (windows 7) love.window.showMessageBox( type, title, message ) is a little strange.
I can't really see any difference between types 'info', 'warning' or 'error'.
Also, if the message has a space in it, only the first word is displayed.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Windows bubble notifications

Post by Positive07 »

Jasoco wrote:

Code: Select all

HTTP ERROR 404

Problem accessing /job/LOVE-OSX/lastSuccessfulBuild/artifact/love-osx.zip. Reason:

    Not Found
Now I'm sad. :cry:

Please fix please! I want 0.9.2 because it fixes an issue I reported about teeny tiny error messages on HighDPI enabled projects on Retina displays.
Maybe a little outdated but you can grab it anyway (since the fix you want is there)
Ref wrote:On my system (windows 7) love.window.showMessageBox( type, title, message ) is a little strange.
I can't really see any difference between types 'info', 'warning' or 'error'.
Also, if the message has a space in it, only the first word is displayed.
Can you give us some pictures, love file and/or system info? It would be great to submit an issue on the issue tracker

PS: I recommend downloading directly from hawkthorne since you can be guaranteed that it is up to date with the latest commits
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests