diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2022-11-15 20:58:24 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2022-11-15 20:58:24 -0500 |
commit | f892f3c3afb4a3795dc3ba5c26cacd1f8088b902 (patch) | |
tree | 6fa688072f1e146b834f68ffa31d98d27df76935 | |
parent | be993f55f5d93150b8b418b031d2e9c8d88978b2 (diff) |
text on top of dialog box
-rw-r--r-- | Scripts/init.lua | 23 | ||||
-rw-r--r-- | src/ui.cpp | 2 |
2 files changed, 12 insertions, 13 deletions
diff --git a/Scripts/init.lua b/Scripts/init.lua index 441cc2a..7ac9160 100644 --- a/Scripts/init.lua +++ b/Scripts/init.lua @@ -4,33 +4,32 @@ player = { Player = 0, EventListeners = { MoveLeftPressed = function(self) - --self.Velocity.x = self.Velocity.x - 3.0 - self.Velocity.y = self.Velocity.y - 1.0 + self.Velocity.x = self.Velocity.x - 3.0 + --self.Velocity.y = self.Velocity.y - 1.0 self.Render.flipx = true; end, MoveLeftReleased = function(self) - -- TODO can't put text at world coordinates right now - --game.puts("default", self.Position.x, self.Position.y+100, "Hey. Hag?") - --self.Velocity.x = self.Velocity.x + 3.0 - self.Velocity.y = self.Velocity.y + 1.0 + self.Velocity.x = self.Velocity.x + 3.0 + --self.Velocity.y = self.Velocity.y + 1.0 end, MoveRightPressed = function(self) - --self.Velocity.x = self.Velocity.x + 3.0 - self.Velocity.y = self.Velocity.y + 1.0 + self.Velocity.x = self.Velocity.x + 3.0 + --self.Velocity.y = self.Velocity.y + 1.0 self.Render.flipx = false; end, MoveRightReleased = function(self) - --self.Velocity.x = self.Velocity.x - 3.0 - self.Velocity.y = self.Velocity.y - 1.0 + self.Velocity.x = self.Velocity.x - 3.0 + --self.Velocity.y = self.Velocity.y - 1.0 end, JumpKeyPressed = function(self) if self.Physics.standing == true then game.play(self.Position, self.Audio) - self.Velocity.y = self.Velocity.y + 9 + --self.Velocity.y = self.Velocity.y + 9 end end, JumpKeyReleased = function(self) - game.dialog(30, -150, 400, 100) + game.dialog(30, 150, 400, 100) + game.puts("default", 36, 52, "Hey. Hag?") end }, Position = { @@ -15,7 +15,7 @@ void UISystem::configure(entityx::EntityManager&, entityx::EventManager&) void UISystem::createDialogBox(float x, float y, float w, float h) { // Queue for generation in the main thread. - m_boxes.emplace_back(0, x, y, w, h); + m_boxes.emplace_back(0, x, -y, w, h); } void UISystem::update(entityx::EntityManager&, |