please help make an options menu!

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
paritybit
Citizen
Posts: 53
Joined: Thu Sep 06, 2012 3:52 am

Re: please help make an options menu!

Post by paritybit »

Roland_Yonaba wrote: I really like this one. Good job!
Thanks!
Roland_Yonaba wrote: Well, just change line 33 in main.lua:
Thanks, I knew I was being stupid somehow. I just didn't realize how stupid until you pointed it out. Just too tired to see it.

Your suggestions are good, and I agree. For the selected item, I had already taken the fade to another color code from the snippets and plopped it into my color class so that I could do something -- I just haven't done it yet. And I'm definitely trying to figure out the best way to 'animate' transitions; your suggestion will help out a lot as I didn't even know what 'tweening' was -- I've been meaning to look it up every time I see it but you finally made me do it (by accident).
User avatar
qaisjp
Party member
Posts: 490
Joined: Tue Sep 04, 2012 10:49 am
Location: United Kingdom
Contact:

Re: please help make an options menu!

Post by qaisjp »

You shouldn't store like
"set bla val
bla val
" It is inefficient, just store a table.

Nice options menu, paritybit, perhaps keep an interface for mouse interaction too? This means creating a slider scrollbar.
In another Lua framework I have a useful XMB style menu coded in Lua, once I have finished converting my code (my mathematical friend and I created that code for one of my servers) to LOVE I'll release the [long] snippet out.
Lua is not an acronym.
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: please help make an options menu!

Post by Roland_Yonaba »

paritybit wrote: Your suggestions are good, and I agree. For the selected item, I had already taken the fade to another color code from the snippets and plopped it into my color class so that I could do something -- I just haven't done it yet. And I'm definitely trying to figure out the best way to 'animate' transitions; your suggestion will help out a lot as I didn't even know what 'tweening' was -- I've been meaning to look it up every time I see it but you finally made me do it (by accident).
Great.
Let us know if you come up with something.
Easing won't be that hard to implemented. Hopefully, kikito's made a great wrapper around easing functions (Tween interface) that handles the most complicated part.
walia6
Prole
Posts: 5
Joined: Mon Oct 01, 2012 3:15 pm

Re: please help make an options menu!

Post by walia6 »

Thanks everyone! I got it.

But Just wondering how do i change the full screen resolution? like in snayke the love2d game.
I dont wanna do the menu now. just wanna do that in conf.lua
User avatar
paritybit
Citizen
Posts: 53
Joined: Thu Sep 06, 2012 3:52 am

Re: please help make an options menu!

Post by paritybit »

walia6 wrote:But Just wondering how do i change the full screen resolution?

...

just wanna do that in conf.lua
The conf.lua wiki page has all the information you need.

You need to add this to your conf.lua (somewhere among all the other stuff):

Code: Select all

function love.conf(t)
    t.screen.fullscreen = true
end
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: please help make an options menu!

Post by Roland_Yonaba »

paritybit wrote:

Code: Select all

function love.conf(t)
    t.screen.fullscreen = true
end
Hmm, not sure that was what he was asking for.
He didn't mean how to "enable fullscreen", but how to "work with a specific resolution being in fullscreen mode"...?
I think that love.graphics.setMode is what you're looking for.

Example:

Code: Select all

function love.load()
  winr = {800,600} -- windowed resolution
  fsr = {480,272} -- fullscreen resolution
end

function love.draw()
  love.graphics.print(('W: %d, H: %d'):format(love.graphics.getWidth(), love.graphics.getHeight()),10,10)
end

function love.keypressed(key,u)
  if key =='r' then
    love.graphics.setMode(fsr[1],fsr[2],true,false,0)
  elseif key == 'w' then
    love.graphics.setMode(winr[1],winr[2],false,false,0)
  end
end
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], snibo and 4 guests