Skip to content

Commit

Permalink
Some more tweaks to the layout
Browse files Browse the repository at this point in the history
Closes #126
  • Loading branch information
tredfern committed May 29, 2021
1 parent e64a0ea commit cac6f57
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
11 changes: 7 additions & 4 deletions assets/stylesheet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ styles["button-primary"] = {
styles.button_bar = {
display = "inline",
align = "right",
margin = { right = 15 }
margin = { right = 15 },
padding = 0
}

styles.button_bar_button = {
borderColor = "dark_accent",
border = 1,
padding = { left = 5, right = 5, top = 2, bottom = 2 },
border = 5,
padding = { left = 5, right = 5, top = 5, bottom = 5 },
margin = 0,
cornerRadiusX = 0, cornerRadiusY = 0
}

styles.button_increment = {
Expand Down Expand Up @@ -86,7 +89,7 @@ styles.full_screen_panel_title_text = {
fontSize = 24,
color = "light_shade",
margin = { left = 25 },
padding = { left = 9, right = 9, top = 6, bottom = 6 },
padding = { left = 9, right = 9, top = 10, bottom = 5 },
backgroundColor = "background",
}

Expand Down
2 changes: 1 addition & 1 deletion game/ui/world_map/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local WorldMap = Components("world_map", function()

closeScreen = function()
local App = require "game.app"
App.combat()
App.mainScreen()
end,

mounted = function(self)
Expand Down
8 changes: 4 additions & 4 deletions game/ui/world_map/init_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ describe("game.ui.world_map", function()

it("returns to the main screen if the tab key is pushed", function()
local App = require "game.app"
spy.on(App, "combat")
spy.on(App, "mainScreen")

local Moonpie = require "moonpie"
Moonpie.testRender(WorldMap())

local Keyboard = require "moonpie.keyboard"
Keyboard:keyPressed("tab")

assert.spy(App.combat).was.called()
assert.spy(App.mainScreen).was.called()
end)

it("also closes on tab key", function()
local App = require "game.app"
spy.on(App, "combat")
spy.on(App, "mainScreen")

local Moonpie = require "moonpie"
Moonpie.testRender(WorldMap())

local Keyboard = require "moonpie.keyboard"
Keyboard:keyPressed("tab")

assert.spy(App.combat).was.called()
assert.spy(App.mainScreen).was.called()
end)
end)

0 comments on commit cac6f57

Please sign in to comment.