Skip to content

Commit

Permalink
migration to cherry/ | removed loader.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdugne committed Aug 21, 2017
1 parent 0cdef99 commit 0ca8da0
Show file tree
Hide file tree
Showing 118 changed files with 230 additions and 212 deletions.
19 changes: 0 additions & 19 deletions cherry.lua

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ end

function Background:init(options)
options = options or {}
local lightImage = options.light or 'Cherry/assets/images/background-light.jpg'
local darkImage = options.dark or 'Cherry/assets/images/background-dark.jpg'
local lightImage = options.light or 'cherry/assets/images/background-light.jpg'
local darkImage = options.dark or 'cherry/assets/images/background-dark.jpg'

self.time = options.time or 700

Expand Down
6 changes: 3 additions & 3 deletions src/components/banner.lua → cherry/components/banner.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------

local Text = require 'text'
local Text = require 'cherry.libs.text'
local Banner = {}

--------------------------------------------------------------------------------
Expand All @@ -14,7 +14,7 @@ function Banner:large(options)

display.newImageRect(
banner,
'Cherry/assets/images/gui/banners/banner.png',
'cherry/assets/images/gui/banners/banner.png',
options.width,
options.height
);
Expand Down Expand Up @@ -50,7 +50,7 @@ function Banner:simple(options)

display.newImageRect(
banner,
'Cherry/assets/images/gui/banners/banner.simple.png',
'cherry/assets/images/gui/banners/banner.simple.png',
options.width,
options.height
);
Expand Down
10 changes: 5 additions & 5 deletions src/components/button.lua → cherry/components/button.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--------------------------------------------------------------------------------

local animation = require 'animation'
local gesture = require 'gesture'
local file = _G.file or require 'file'
local animation = require 'cherry.libs.animation'
local gesture = require 'cherry.libs.gesture'
local file = _G.file or require 'cherry.libs.file'

local Button = {}

Expand All @@ -19,7 +19,7 @@ function Button:round(options)
options.parent:insert(button)
end

local path = 'Cherry/assets/images/gui/buttons/'.. (options.type or '') .. '.png'
local path = 'cherry/assets/images/gui/buttons/'.. (options.type or '') .. '.png'
if(not file.exists(path)) then
_G.log('Button:round(): invalid options.type | check: ' .. path)
return nil
Expand Down Expand Up @@ -53,7 +53,7 @@ end
function Button:icon(options)
options = options or {}

local path = 'Cherry/assets/images/gui/buttons/'.. (options.type or '') .. '.png'
local path = 'cherry/assets/images/gui/buttons/'.. (options.type or '') .. '.png'
if(not file.exists(path)) then
_G.log('Button:icon(): invalid options.type | check: ' .. path)
return nil
Expand Down
30 changes: 15 additions & 15 deletions src/components/chapters.lua → cherry/components/chapters.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
--------------------------------------------------------------------------------

local _ = require 'underscore'
local analytics = require 'analytics'
local animation = require 'animation'
local Text = require 'text'
local gesture = require 'gesture'
local Screen = require 'components.Screen'
local Scroller = require 'components.scroller'
local Panel = require 'components.panel'
local GUI = require 'components.gui'
local Button = require 'components.button'
local Profile = require 'components.profile'
local Banner = require 'components.banner'
local _ = require 'cherry.libs.underscore'
local analytics = require 'cherry.libs.analytics'
local animation = require 'cherry.libs.animation'
local Text = require 'cherry.libs.text'
local gesture = require 'cherry.libs.gesture'
local Screen = require 'cherry.components.Screen'
local Scroller = require 'cherry.components.scroller'
local Panel = require 'cherry.components.panel'
local GUI = require 'cherry.components.gui'
local Button = require 'cherry.components.button'
local Profile = require 'cherry.components.profile'
local Banner = require 'cherry.components.banner'

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -175,7 +175,7 @@ function Chapters:hellBarEntrance(options)

display.newImage(
hellbar,
'Cherry/assets/images/gui/houses/hell.png',
'cherry/assets/images/gui/houses/hell.png',
panel.width*0.2, 0
)

Expand Down Expand Up @@ -409,7 +409,7 @@ end
function Chapters:buyButton(options)
local button = display.newImage(
options.parent,
'Cherry/assets/images/gui/buttons/buy.png'
'cherry/assets/images/gui/buttons/buy.png'
);

button.x = options.x
Expand All @@ -425,7 +425,7 @@ function Chapters:lock(options)

local lock = display.newImage(
options.parent,
'Cherry/assets/images/gui/items/lock.png'
'cherry/assets/images/gui/items/lock.png'
);

lock.x = options.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function Cooldown:prepare(cooldown)

cooldown.leftCircle = display.newImage(
cooldown.parent,
'Cherry/assets/images/cooldown/half.left-' .. cooldown.alpha .. '.png'
'cherry/assets/images/cooldown/half.left-' .. cooldown.alpha .. '.png'
)

cooldown.leftCircle.x = cooldown.x
Expand All @@ -71,16 +71,16 @@ function Cooldown:prepare(cooldown)

cooldown.rightCircle = display.newImage(
cooldown.parent,
'Cherry/assets/images/cooldown/half.left-' .. cooldown.alpha .. '.png'
'cherry/assets/images/cooldown/half.left-' .. cooldown.alpha .. '.png'
)

cooldown.rightCircle.rotation = 180
cooldown.rightCircle.x = cooldown.x
cooldown.rightCircle.y = cooldown.y
cooldown.rightCircle:scale (cooldown.scale, cooldown.scale)

cooldown.leftMask = graphics.newMask( 'Cherry/assets/images/cooldown/mask.png' )
cooldown.rightMask = graphics.newMask( 'Cherry/assets/images/cooldown/mask.png' )
cooldown.leftMask = graphics.newMask( 'cherry/assets/images/cooldown/mask.png' )
cooldown.rightMask = graphics.newMask( 'cherry/assets/images/cooldown/mask.png' )

cooldown.leftCircle:setMask ( cooldown.leftMask )
cooldown.rightCircle:setMask ( cooldown.rightMask )
Expand Down
14 changes: 7 additions & 7 deletions src/components/focus.lua → cherry/components/focus.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

local _ = require 'underscore'
local group = require 'group'
local gesture = require 'gesture'
local _ = require 'cherry.libs.underscore'
local group = require 'cherry.libs.group'
local gesture = require 'cherry.libs.gesture'

--------------------------------------------------------

Expand Down Expand Up @@ -103,7 +103,7 @@ return function(object, options)
if(options.all or options.up) then
local upY = -object.height / 2 - 20

local up = display.newImage(focus, 'Cherry/assets/images/gui/items/arrow.right.png')
local up = display.newImage(focus, 'cherry/assets/images/gui/items/arrow.right.png')
up.x = 0
up.y = upY
up:scale(0.5, 0.5)
Expand All @@ -126,7 +126,7 @@ return function(object, options)

if(options.all or options.left) then
local leftY = -object.width / 2 - 20
local left = display.newImage(focus, 'Cherry/assets/images/gui/items/arrow.right.png')
local left = display.newImage(focus, 'cherry/assets/images/gui/items/arrow.right.png')
left.x = leftY
left.y = 0
left:scale(0.5, 0.5)
Expand All @@ -147,7 +147,7 @@ return function(object, options)

if(options.all or options.bottom) then
local bottomY = object.height / 2 + 20
local bottom = display.newImage(focus, 'Cherry/assets/images/gui/items/arrow.right.png')
local bottom = display.newImage(focus, 'cherry/assets/images/gui/items/arrow.right.png')
bottom.x = 0
bottom.y = bottomY
bottom:scale(0.5, 0.5)
Expand All @@ -170,7 +170,7 @@ return function(object, options)

if(options.all or options.right) then
local rightX = object.width / 2 + 20
local right = display.newImage(focus, 'Cherry/assets/images/gui/items/arrow.right.png')
local right = display.newImage(focus, 'cherry/assets/images/gui/items/arrow.right.png')
right.x = rightX
right.y = 0
right:scale(0.5, 0.5)
Expand Down
18 changes: 9 additions & 9 deletions src/components/gui.lua → cherry/components/gui.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--------------------------------------------------------------------------------

local _ = require 'underscore'
local animation = require 'animation'
local Text = require 'text'
local Banner = require 'components.banner'
local _ = require 'cherry.libs.underscore'
local animation = require 'cherry.libs.animation'
local Text = require 'cherry.libs.text'
local Banner = require 'cherry.components.banner'

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -36,7 +36,7 @@ function GUI:bigIcon(options)

display.newImage(
icon,
'Cherry/assets/images/gui/items/circle.container.on.png',
'cherry/assets/images/gui/items/circle.container.on.png',
0, 0
)

Expand All @@ -56,7 +56,7 @@ end
function GUI:miniIcon(options)
local icon = display.newImage(
options.parent,
'Cherry/assets/images/gui/items/' .. options.type .. '.icon.png'
'cherry/assets/images/gui/items/' .. options.type .. '.icon.png'
);

if(options.disabled or options.status == 'off') then
Expand All @@ -82,7 +82,7 @@ function GUI:iconText(options)

display.newImage(
icon,
'Cherry/assets/images/gui/items/circle.container.on.png',
'cherry/assets/images/gui/items/circle.container.on.png',
0, 0
)

Expand Down Expand Up @@ -118,7 +118,7 @@ end

function GUI:multiplier(options)
local icon = self:bigIcon(_.extend({
image = 'Cherry/assets/images/gui/items/' .. options.item .. '.icon.png',
image = 'cherry/assets/images/gui/items/' .. options.item .. '.icon.png',
parent = options.parent,
x = options.x,
y = options.y,
Expand All @@ -127,7 +127,7 @@ function GUI:multiplier(options)

local multiply = display.newImage(
options.parent,
'Cherry/assets/images/gui/items/multiply.png',
'cherry/assets/images/gui/items/multiply.png',
options.x + icon.width * 0.55,
options.y
)
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions src/components/level.lua → cherry/components/level.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--------------------------------------------------------------------------------

local _ = require 'underscore'
local animation = require 'animation'
local gesture = require 'gesture'
local Panel = require 'components.panel'
local GUI = require 'components.gui'
local _ = require 'cherry.libs.underscore'
local animation = require 'cherry.libs.animation'
local gesture = require 'cherry.libs.gesture'
local Panel = require 'cherry.components.panel'
local GUI = require 'cherry.components.gui'

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -95,7 +95,7 @@ function Level:buildLock()

self.lock = display.newImage(
self.parent,
'Cherry/assets/images/gui/items/lock.png'
'cherry/assets/images/gui/items/lock.png'
);

self.lock.x = self.x + self.bg.width * 0.32
Expand Down Expand Up @@ -180,7 +180,7 @@ function Level:buildStars()
if(self.stars == 7) then
local star = display.newImage(
self.parent,
'Cherry/assets/images/gui/items/star-special.icon.png'
'cherry/assets/images/gui/items/star-special.icon.png'
);

star.x = self.x + self.bg.width * 0.32
Expand Down
6 changes: 3 additions & 3 deletions src/components/options.lua → cherry/components/options.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--------------------------------------------------------------------------------

local Text = require 'text'
local Button = require 'components.button'
local Screen = require 'components.screen'
local Text = require 'cherry.libs.text'
local Button = require 'cherry.components.button'
local Screen = require 'cherry.components.screen'

--------------------------------------------------------------------------------

Expand Down
8 changes: 4 additions & 4 deletions src/components/panel.lua → cherry/components/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local Panel = {}
function Panel:vertical(options)
options = options or {}

local image = options.image or 'Cherry/assets/images/gui/panels/panel.vertical.png'
local image = options.image or 'cherry/assets/images/gui/panels/panel.vertical.png'
local panel = display.newImageRect(
image,
options.width or 0,
Expand All @@ -29,7 +29,7 @@ end
function Panel:small(options)
options = options or {}

local image = options.image or 'Cherry/assets/images/gui/panels/panel.horizontal.png'
local image = options.image or 'cherry/assets/images/gui/panels/panel.horizontal.png'
local panel = display.newImageRect(
image,
options.width or 0,
Expand All @@ -53,7 +53,7 @@ function Panel:level(options)
options.status = options.status or 'on'

local panel = display.newImage(
'Cherry/assets/images/gui/panels/level.panel.' .. options.status .. '.png'
'cherry/assets/images/gui/panels/level.panel.' .. options.status .. '.png'
)

if(options.parent) then
Expand All @@ -73,7 +73,7 @@ function Panel:chapter(options)
options.status = options.status or 'on'

local panel = display.newImageRect(
'Cherry/assets/images/gui/panels/chapter.panel.' .. options.status .. '.png',
'cherry/assets/images/gui/panels/chapter.panel.' .. options.status .. '.png',
options.width or 0,
options.height or 0
)
Expand Down
8 changes: 4 additions & 4 deletions src/components/profile.lua → cherry/components/profile.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--------------------------------------------------------------------------------

local _ = require 'underscore'
local file = require 'file'
local ProgressBar = require 'components.progress-bar'
local _ = require 'cherry.libs.underscore'
local file = require 'cherry.libs.file'
local ProgressBar = require 'cherry.components.progress-bar'

--------------------------------------------------------------------------------

Expand All @@ -25,7 +25,7 @@ function Profile:status(options)
path = 'assets/images/gui/items/'.. options.item ..'.icon.png'

if(not file.exists(path)) then
path = 'Cherry/assets/images/gui/items/'.. options.item ..'.icon.png'
path = 'cherry/assets/images/gui/items/'.. options.item ..'.icon.png'
end
end

Expand Down
Loading

0 comments on commit 0ca8da0

Please sign in to comment.