diff --git a/Gemfile b/Gemfile index 1e25e98..ab8c533 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,4 @@ source 'https://rubygems.org' ruby '~> 3.0' -gem 'minigl', '~> 2.3.9' +gem 'minigl', '~> 2.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index d0a1671..aa2a06d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,14 +2,14 @@ GEM remote: https://rubygems.org/ specs: gosu (1.4.1) - minigl (2.3.9) + minigl (2.4.0) gosu (>= 0.11, < 2.0) PLATFORMS x86_64-linux DEPENDENCIES - minigl (~> 2.3.9) + minigl (~> 2.4.0) RUBY VERSION ruby 3.0.1p64 diff --git a/data/text/english.txt b/data/text/english.txt new file mode 100644 index 0000000..47b88b3 --- /dev/null +++ b/data/text/english.txt @@ -0,0 +1,5 @@ +play Play +instructions Instructions +options Options +high_scores High Scores +exit Exit \ No newline at end of file diff --git a/data/text/portuguese.txt b/data/text/portuguese.txt new file mode 100644 index 0000000..3a2e9d1 --- /dev/null +++ b/data/text/portuguese.txt @@ -0,0 +1,5 @@ +play Jogar +instructions Instruções +options Opções +high_scores Recordes +exit Sair \ No newline at end of file diff --git a/src/game.rb b/src/game.rb index b922d69..441dc15 100644 --- a/src/game.rb +++ b/src/game.rb @@ -5,6 +5,7 @@ class << self attr_reader :font def initialize + Localization.initialize @music_volume = 10 @sound_volume = 10 @font = Res.font(:arialRounded, 24) diff --git a/src/menu.rb b/src/menu.rb index ee3bd94..64175c3 100644 --- a/src/menu.rb +++ b/src/menu.rb @@ -6,11 +6,11 @@ def initialize @buttons = { main: [ - Button.new(305, 240, 'Play'), - Button.new(305, 290, 'Instructions'), - Button.new(305, 340, 'Options'), - Button.new(305, 390, 'High Scores'), - Button.new(305, 480, 'Exit') do + Button.new(305, 240, Localization.text(:play)), + Button.new(305, 290, Localization.text(:instructions)), + Button.new(305, 340, Localization.text(:options)), + Button.new(305, 390, Localization.text(:high_scores)), + Button.new(305, 480, Localization.text(:exit)) do exit end, ]