Skip to content
This repository has been archived by the owner on Dec 16, 2018. It is now read-only.

Add conf.lua support #3

Open
Svetomech opened this issue May 21, 2014 · 5 comments
Open

Add conf.lua support #3

Svetomech opened this issue May 21, 2014 · 5 comments

Comments

@Svetomech
Copy link
Contributor

There are a lot of love.conf(t) function features renamed or simply missing in 0.8.0 if comparing to 0.9.0
Request some feature support for them. For renamed ones at least.
P.S. I'll see what I myself can do, of course.

@kyleconroy
Copy link
Member

Can you include some examples?

@Svetomech
Copy link
Contributor Author

  1. t.window.title = 'AppName' in 0.9.x == t.title = 'AppName' in 0.8.0
  2. t.window.resizable doesn't exist in 0.8.0 yet
    ...and so on

@kyleconroy
Copy link
Member

Hmm, I'm not entire sure how we could fix that. Do you have any ideas?

@Svetomech
Copy link
Contributor Author

A new small library specially for that. Because changing 't' to 'glove' is not very convenient.
Or we can just create a new set of functions inside glove. And name the table something like 'g'.

@pablomayobre
Copy link
Contributor

you could make a file called gloveconf that returns a function which takes t and modifies it to use it in 0.9.X

function love.conf (t)
    t.screen.fullscreen = true
    t = require("gloveconf")(t) --Althought the "return t" part could be ommited
end

The code for gloveconf.lua could be something like:

return function (t)
    t.window.title = t.title or "Unnamed"
    t.window.fullscreen = t.screen.fullscreen or false
    ...
    return t --As said before this part could be ommited
end

Or it could be part of glove itself and you would need to call glove.conf

require "glove"
love.conf = function (t)
    ...
    glove.conf(t)
end

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants