summaryrefslogtreecommitdiffhomepage
path: root/config/menus/select.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-05 00:58:00 +0200
committerAki <nthirtyone@gmail.com>2017-09-05 00:58:00 +0200
commitdacc12eb824264e4f71e21ebecac4c76c9ad6382 (patch)
tree70a246cc8d40837e8dc6dfca37c1d1aaab01f7c4 /config/menus/select.lua
parent8e51db223ed1e8307d1009e48becc618a924749b (diff)
downloadroflnauts-dacc12eb824264e4f71e21ebecac4c76c9ad6382.zip
roflnauts-dacc12eb824264e4f71e21ebecac4c76c9ad6382.tar.gz
roflnauts-dacc12eb824264e4f71e21ebecac4c76c9ad6382.tar.bz2
Provided icons for nauts selectors
Diffstat (limited to 'config/menus/select.lua')
-rw-r--r--config/menus/select.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/config/menus/select.lua b/config/menus/select.lua
index 937bfd8..9ce7201 100644
--- a/config/menus/select.lua
+++ b/config/menus/select.lua
@@ -15,6 +15,13 @@ if background == nil or not background:is(require "not.MenuBackground") then
end
-- TODO: Temporary group for naut selectors. This isn't production code at any means!
+local atlas = love.graphics.newImage("assets/portraits.png")
+local nauts = require("config.nauts")
+local icons = {}
+for i=0,#nauts-1 do
+ table.insert(icons, love.graphics.newQuad(i*28, 0, 28, 27, 1008, 27))
+end
+
local group = Group(menu)
local
function add (element)
@@ -23,7 +30,10 @@ function add (element)
end
for i,_ in pairs(Controller.getSets()) do
- add(Selector(require("config.nauts"), group, menu)):setPosition(10+48*(i-1), 10)
+ add(Selector(nauts, group, menu))
+ :setPosition(10+48*(i-1), 10)
+ :set("icons_atlas", atlas)
+ :set("icons_quads", icons)
end
local