If you do want to be pedantic, then realize the choice is still there, you basically just hinted semantic sugar all over it; i'm truly sorry though, you thinking the current generation lacking the necessary capacity to understand a simple multiple-choice question with the most basic answer words.CherryBit wrote: ↑Wed Feb 22, 2017 2:19 pmJust to be pedantic: using "Yes"/"No" choices for dialogs is poor UX design and requires the user to read and think more. Using actions ("Save", "Don't Save") as the button labels is much clearer and allows the user to make choices with less reading. It may seem minor but users are easily frustrated, especially when you're forcing them to make a choice.Positive07 wrote: ↑Wed Feb 22, 2017 1:45 pm Do you wanna save before quitting?
Yes / No / Cancel
[...]
bugs in showMessageBox
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: bugs in showMessageBox
Me and my stuff True 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.
Re: bugs in showMessageBox
Thanks for that info -- I'll give it a try. Do you have a working project or .love file I could download to see it in action?Positive07 wrote: ↑Wed Feb 22, 2017 1:45 pm Also there is lua-nativefiledialog which I have compiled and used fine with LÖVE.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: bugs in showMessageBox
Nope, I have actually erased my dll... Not sure why. I should compile it again, it was pretty useful and nice. I need to recompile anyway since I have moved to a 64bits system since then
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: bugs in showMessageBox
Ok, I've got nativefiledialog working on my Macs (using LOVE 0.9.2 on Mac OS 10.6 and LOVE 0.10.2 on Mac OS 10.12). I had to fix a few bugs so I've put the resulting nfd.so on my website in case other folks want to use it. (It would be great if somebody could make their nfd.dll file available and save me the hassle of having to build it! hint hint...)
At the top of my main.lua file I do this:
Then I call nfd.open like this:
And nfd.save like this:
Note the need to call love.event.clear() to remove any keypressed events. Presumably due to the same Mac-specific bug that's in showMessageBox.
At the top of my main.lua file I do this:
Code: Select all
maindir = love.filesystem.getRealDirectory("main.lua")
if love.system.getOS() == "OS X" then
package.cpath = maindir.."/nfd-mac/?.so;"..package.cpath
elseif love.system.getOS() == "Windows" then
package.cpath = maindir.."/nfd-win/?.dll;"..package.cpath -- TODO: build nfd.dll!!!
elseif love.system.getOS() == "Linux" then
package.cpath = maindir.."/nfd-gtk/?.so;"..package.cpath -- TODO: build nfd.so for GTK-3!!!
end
local nfd = require("nfd") -- native open/save file dialogs
-- initial directory for nfd.open and nfd.save
initdir = love.filesystem.getSaveDirectory()
Code: Select all
function OpenGame()
-- let user open a previously saved game
local filepath = nfd.open("cc", initdir)
-- clear any keypressed events (happens on Mac OS 10.12)
love.event.clear()
if not filepath then
return -- user hit Cancel button
end
-- strip off filename and set initdir for the next nfd.open/nfd.save call
initdir = filepath:gsub("[^/\\]+$","")
ReadGame(filepath)
end
Code: Select all
function SaveGame()
-- let user save the current game in a specified file and location
local filepath = nfd.save("cc", initdir)
-- clear any keypressed events (happens on Mac OS 10.12)
love.event.clear()
if not filepath then
return false -- user hit Cancel button
end
-- strip off filename and set initdir for the next nfd.open/nfd.save call
initdir = filepath:gsub("[^/\\]+$","")
WriteGame(filepath)
return true
end
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests