Done and "implemented" locales
Language for now is called 1 time and hardcoded. Solved error on todo and made a coment on every lenguage.
This commit is contained in:
parent
ed253ddb92
commit
1759196f26
|
@ -8,5 +8,3 @@ Locale.ui.pause_screen_exit = "Exit"
|
|||
Locale.entity = {}
|
||||
Locale.entity.fairy = {}
|
||||
Locale.entity.fairy.name = "Ozy"
|
||||
|
||||
return Locale
|
|
@ -22,3 +22,6 @@ require "data/scripts/ui"
|
|||
require "data/scripts/game"
|
||||
require "data/scripts/gameworld"
|
||||
require "data/scripts/editor"
|
||||
|
||||
-- locale
|
||||
require "data/scripts/locale"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
function LocaleLoad(ISO639)
|
||||
local ISO639 = ISO639 or "ENG"
|
||||
dofile("Mothback/data/locale/"..ISO639..".lua")
|
||||
end
|
|
@ -67,7 +67,7 @@ function MenuInit(menu)
|
|||
{false,true},
|
||||
1,
|
||||
{
|
||||
text = "Resume",
|
||||
text = Locale.ui.pause_screen_resume,
|
||||
color = {0,0,0.5},
|
||||
color2 = {1,1,1}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ function MenuInit(menu)
|
|||
{false,true},
|
||||
1,
|
||||
{
|
||||
text = "Options",
|
||||
text = Locale.ui.pause_screen_options,
|
||||
color = {0,0,0.5},
|
||||
color2 = {1,1,1}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ function MenuInit(menu)
|
|||
{false,true},
|
||||
1,
|
||||
{
|
||||
text = "Exit",
|
||||
text = Locale.ui.pause_screen_exit,
|
||||
color = {0,0,0.5},
|
||||
color2 = {1,1,1}
|
||||
}
|
||||
|
@ -101,4 +101,5 @@ function MenuInit(menu)
|
|||
end
|
||||
end
|
||||
|
||||
UIElement = {}
|
||||
require "data/scripts/ui/button"
|
||||
|
|
5
main.lua
5
main.lua
|
@ -13,8 +13,6 @@ function love.load()
|
|||
fps_draw = 0
|
||||
fps_total = 0
|
||||
|
||||
UIElement = {}
|
||||
|
||||
love.graphics.setColor(1,1,1)
|
||||
love.keyboard.setKeyRepeat(true)
|
||||
love.graphics.setDefaultFilter("nearest") -- good pixel
|
||||
|
@ -44,6 +42,9 @@ function love.load()
|
|||
LoadedParticles = {}
|
||||
LevelLoadTiles()
|
||||
|
||||
language = "ENG"
|
||||
LocaleLoad(lenguage)
|
||||
|
||||
main_Player = Player:New(75,50)
|
||||
|
||||
--Kupo:New(100,150)
|
||||
|
|
Loading…
Reference in New Issue