From 3ec0067799e0a8e25312312e113553d20869722d Mon Sep 17 00:00:00 2001 From: Paul Liverman III Date: Thu, 24 Nov 2016 21:32:04 -0800 Subject: [PATCH] some basics wip stuff --- .gitmodules | 3 +++ elements/element.lua | 2 +- elements/element.moon | 2 +- lib/middleclass | 1 + main.moon | 2 ++ 5 files changed, 8 insertions(+), 2 deletions(-) create mode 160000 lib/middleclass diff --git a/.gitmodules b/.gitmodules index 84387eb..b2c3e90 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "lib/bitser"] path = lib/bitser url = https://github.com/gvx/bitser +[submodule "lib/middleclass"] + path = lib/middleclass + url = https://github.com/kikito/middleclass.git diff --git a/elements/element.lua b/elements/element.lua index 0d5eb84..2d0953a 100644 --- a/elements/element.lua +++ b/elements/element.lua @@ -39,7 +39,7 @@ do local _exp_1 = self.data.vertical if "center" == _exp_1 then self.data.y = self.data.y + ((self.parent.data.h - self.data.h) / 2) - elseif "right" == _exp_1 then + elseif "bottom" == _exp_1 then self.data.y = self.data.y + (self.parent.data.h - self.data.h) end if toPixel then diff --git a/elements/element.moon b/elements/element.moon index e47eec2..4291f3c 100644 --- a/elements/element.moon +++ b/elements/element.moon @@ -62,7 +62,7 @@ class element switch @data.vertical when "center" @data.y += (@parent.data.h - @data.h) / 2 - when "right" + when "bottom" @data.y += @parent.data.h - @data.h if toPixel diff --git a/lib/middleclass b/lib/middleclass new file mode 160000 index 0000000..27a64f1 --- /dev/null +++ b/lib/middleclass @@ -0,0 +1 @@ +Subproject commit 27a64f107e61532006030a6168e4fe6a71eee9a2 diff --git a/main.moon b/main.moon index c223478..aade4d7 100644 --- a/main.moon +++ b/main.moon @@ -6,3 +6,5 @@ pop = require "" --- @todo write this! print(pop, pop.elements) --NOTE TEMPORARY + +return --this is to prevent default returning of last statement