Skip to content

Commit

Permalink
little fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nagolove committed Jun 18, 2021
1 parent 19b4d3a commit 93fdca5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 18 deletions.
10 changes: 6 additions & 4 deletions fonts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local t = {
help = {
font = lg.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 2),
baseSize + 20),

gooi = lg.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
Expand All @@ -33,6 +33,7 @@ local t = {
baseSize + 2),

nback = {

font = love.graphics.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 12),
Expand All @@ -47,16 +48,17 @@ local t = {

setupmenu = lg.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 17),
baseSize + 35),

},

languageSelector = love.graphics.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 12),
baseSize + 35),

menu = love.graphics.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 19),
baseSize + 35),

}

Expand Down
10 changes: 6 additions & 4 deletions fonts.tl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local t = {
help = {
font = lg.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 2
baseSize + 20
),
gooi = lg.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
Expand All @@ -33,6 +33,7 @@ local t = {
baseSize + 2
),
nback = {
-- где используется?
font = love.graphics.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 12
Expand All @@ -47,16 +48,17 @@ local t = {
),
setupmenu = lg.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 17
baseSize + 35
),
},
-- выбор языка
languageSelector = love.graphics.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 12
baseSize + 35
),
menu = love.graphics.newFont(
SCENEPREFIX .. "gfx/DejaVuSansMono.ttf",
baseSize + 19
baseSize + 35
),
}

Expand Down
11 changes: 6 additions & 5 deletions help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,16 @@ end

function Help:mousepressed(_, _, _, _)
print("help:mousepressed()")
self.mainMenuBtn:mousePressed()
if self.mainMenuBtn.mousePressed then
self.mainMenuBtn:mousePressed()
end
end

function Help:mousereleased(_, _, _, _)
print("help:mousereleased()")
self.mainMenuBtn:mouseReleased()
if self.mainMenuBtn.mouseReleased then
self.mainMenuBtn:mouseReleased()
end
end

function Help:keypressed(key)
Expand All @@ -174,8 +178,5 @@ function Help:keypressed(key)
end
end




help = Help.new()
print('hello from bottom of Help module.')
11 changes: 6 additions & 5 deletions help.tl
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,16 @@ end

function Help:mousepressed(_: number, _: number, _: number, _: boolean)
print("help:mousepressed()")
self.mainMenuBtn:mousePressed()
if self.mainMenuBtn.mousePressed then
self.mainMenuBtn:mousePressed()
end
end

function Help:mousereleased(_: number, _: number, _: number, _: boolean)
print("help:mousereleased()")
self.mainMenuBtn:mouseReleased()
if self.mainMenuBtn.mouseReleased then
self.mainMenuBtn:mouseReleased()
end
end

function Help:keypressed(key: string)
Expand All @@ -174,8 +178,5 @@ function Help:keypressed(key: string)
end
end

--return {
--new = Help.new
--}
global help = Help.new()
print('hello from bottom of Help module.')
2 changes: 2 additions & 0 deletions languageselector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ function LanguageSelector:keypressed(key)
elseif key == "space" or key == "return" then
print("select")
self.locale = self.languages[self.selected].locale
elseif key == "escape" then
love.event.quit()
end
end

Expand Down
2 changes: 2 additions & 0 deletions languageselector.tl
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ function LanguageSelector:keypressed(key: string)
elseif key == "space" or key == "return" then
print("select")
self.locale = self.languages[self.selected].locale
elseif key == "escape" then
love.event.quit()
end
end

Expand Down

0 comments on commit 93fdca5

Please sign in to comment.