From 118c64c62bb19239a28da08f928c2f8e74655f08 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 22 Sep 2017 18:01:09 +0200 Subject: Split map icons, menu now uses them --- config/maps/205.lua | 2 +- config/maps/404.lua | 4 ++-- config/maps/aiguillon.lua | 2 +- config/maps/alpha.lua | 2 +- config/maps/default.lua | 2 +- config/maps/ribbit.lua | 2 +- config/maps/rill.lua | 2 +- config/maps/sorona.lua | 2 +- config/maps/starstorm.lua | 2 +- config/menus/host.lua | 5 ++--- 10 files changed, 12 insertions(+), 13 deletions(-) (limited to 'config') diff --git a/config/maps/205.lua b/config/maps/205.lua index d0aa1f8..a20fe0a 100644 --- a/config/maps/205.lua +++ b/config/maps/205.lua @@ -2,7 +2,7 @@ return { name = "AI Station 205", theme = "sorona.ogg", - portrait = 1, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/205.png", center = {x = 0, y = 0}, width = 360, height = 240, diff --git a/config/maps/404.lua b/config/maps/404.lua index 44b6c93..6a5b218 100644 --- a/config/maps/404.lua +++ b/config/maps/404.lua @@ -2,7 +2,7 @@ return { name = "AI Station 404", theme = "404.ogg", - portrait = 8, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/404.png", center = {x = 0, y = 0}, width = 360, height = 240, @@ -48,4 +48,4 @@ return platform = "404-small" } } -} \ No newline at end of file +} diff --git a/config/maps/aiguillon.lua b/config/maps/aiguillon.lua index c4f0ee3..e79449f 100644 --- a/config/maps/aiguillon.lua +++ b/config/maps/aiguillon.lua @@ -2,7 +2,7 @@ return { name = "Aiguillon", theme = "aiguillon.ogg", - portrait = 5, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/aiguillon.png", center = {x = 0, y = 10}, width = 370, height = 290, diff --git a/config/maps/alpha.lua b/config/maps/alpha.lua index 795b6cf..3942dde 100644 --- a/config/maps/alpha.lua +++ b/config/maps/alpha.lua @@ -2,7 +2,7 @@ return { name = "Alpha Abyss", theme = "alpha.ogg", - portrait = 7, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/alpha.png", center = {x = 0, y = -80}, width = 360, height = 240, diff --git a/config/maps/default.lua b/config/maps/default.lua index 22c03f6..76cd9d3 100644 --- a/config/maps/default.lua +++ b/config/maps/default.lua @@ -2,7 +2,7 @@ return { name = "default", theme = "default.ogg", - portrait = 1, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/default.png", center = {x = 0, y = 0}, width = 360, height = 240, diff --git a/config/maps/ribbit.lua b/config/maps/ribbit.lua index 08683ac..f5e267e 100644 --- a/config/maps/ribbit.lua +++ b/config/maps/ribbit.lua @@ -2,7 +2,7 @@ return { name = "Ribbit IV", theme = "ribbit.ogg", - portrait = 3, -- TODO: Either separate portraits now or change `iconsList` and `menu/host`. See also both mentioned files. + portrait = "assets/maps/ribbit.png", center = {x = 0, y = 50}, width = 360, height = 240, diff --git a/config/maps/rill.lua b/config/maps/rill.lua index b027923..4644ecc 100644 --- a/config/maps/rill.lua +++ b/config/maps/rill.lua @@ -2,7 +2,7 @@ return { name = "Rill", theme = "rill.ogg", - portrait = 2, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/rill.png", center = {x = 0, y = 75}, width = 400, height = 260, diff --git a/config/maps/sorona.lua b/config/maps/sorona.lua index 4cc87cd..54543c2 100644 --- a/config/maps/sorona.lua +++ b/config/maps/sorona.lua @@ -2,7 +2,7 @@ return { name = "Sorona", theme = "sorona.ogg", - portrait = 6, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/sorona.png", center = {x = 0, y = 0}, width = 360, height = 240, diff --git a/config/maps/starstorm.lua b/config/maps/starstorm.lua index b4fabcd..bb35a08 100644 --- a/config/maps/starstorm.lua +++ b/config/maps/starstorm.lua @@ -2,7 +2,7 @@ return { name = "Starstorm", theme = "starstorm.ogg", - portrait = 4, -- TODO: See `maps/ribbit`. + portrait = "assets/maps/starstorm.png", center = {x = 0, y = -20}, width = 400, height = 260, diff --git a/config/menus/host.lua b/config/menus/host.lua index c8ef4d8..571fc50 100644 --- a/config/menus/host.lua +++ b/config/menus/host.lua @@ -21,7 +21,7 @@ do local i, name = map.portrait, map.name map.filename = path if i then - table.insert(icons, love.graphics.newQuad((i-1)*76, 0, 76, 37, 608, 37)) + table.insert(icons, love.graphics.newImage(map.portrait)) table.insert(maps, map) end end @@ -35,8 +35,7 @@ return { mapSelector :setPosition(width/2-40, 40) :set("shape", Selector.SHAPE_PANORAMA) - :set("icons_quads", icons) - :set("icons_atlas", love.graphics.newImage("assets/maps.png")) + :set("icons", icons) :set("getText", function (self) return self:getSelected().name end) -- cgit v1.1