Use persistent hash for config

This commit is contained in:
2020-01-29 18:18:46 -06:00
parent 201ddabbcc
commit 4f1b490600
14 changed files with 40 additions and 31 deletions

View File

@@ -40,9 +40,9 @@ class IMICFPS
@camera.update
if $debug.get(:stats)
if window.config.get(:debug_options, :stats)
@text.text = update_text
elsif $debug.get(:fps)
elsif window.config.get(:options, :fps)
@text.text = "FPS: #{Gosu.fps}"
else
@text.text = ""

View File

@@ -55,7 +55,7 @@ class IMICFPS
when :model
ModelLoader.new(manifest: hash[:manifest], entity: @dummy_entity)
when :shader
if $debug.get(:use_shaders)
if window.config.get(:debug_options, :use_shaders)
shader = Shader.new(name: hash[:name], includes_dir: "shaders/include", vertex: "shaders/vertex/#{hash[:name]}.glsl", fragment: "shaders/fragment/#{hash[:name]}.glsl")
else
warn "Skipping shader: #{hash[:name]}..."