Added font file and changed font to be monospace

This commit is contained in:
2026-06-14 20:49:33 -06:00
parent f8d69be2ad
commit 7aea94c224
4 changed files with 15 additions and 13 deletions
+10 -8
View File
@@ -9,6 +9,8 @@ require './producer.rb'
require './consumer.rb'
require './dialouge_box.rb'
FONT_PATH = 'assets/font/Cousine-Regular.ttf'
# Viewport resolution
WIDTH = Gosu::screen_width
HEIGHT = Gosu::screen_height
@@ -238,15 +240,15 @@ class NumFactory < Gosu::Window
dialouge.draw()
end
Gosu::Image.from_text("#{width}, #{height}", 20).draw(1600, 0, 1)
Gosu::Image.from_text("#{mouse_x}, #{mouse_y}", 20).draw(1600, 100, 1)
Gosu::Image.from_text("Tick time: #{((Time.now() - @tick_time).to_f * 1000).to_i}", 20).draw(1600, 25, 1)
Gosu::Image.from_text("FPS: #{Gosu.fps}", 20).draw(1600, 50, 1)
Gosu::Image.from_text("#{width}, #{height}", 20, font: FONT_PATH).draw(1600, 0, 1)
Gosu::Image.from_text("#{mouse_x}, #{mouse_y}", 20, font: FONT_PATH).draw(1600, 100, 1)
Gosu::Image.from_text("Tick time: #{((Time.now() - @tick_time).to_f * 1000).to_i}", 20, font: FONT_PATH).draw(1600, 25, 1)
Gosu::Image.from_text("FPS: #{Gosu.fps}", 20, font: FONT_PATH).draw(1600, 50, 1)
Gosu::Image.from_text("items on screen: #{onscreen_items}", 20).draw(1600, 75, 1)
Gosu::Image.from_text("Camera boxes: #{@camera_boxes}", 20).draw(1600, 175, 1)
Gosu::Image.from_text("Camera location: #{@camera_x}, #{@camera_y}", 20).draw(1600, 200, 1)
Gosu::Image.from_text("Camera zoom: #{@camera_zoom}, #{@camera_x_zoom_offset}", 20).draw(1600, 225, 1)
Gosu::Image.from_text("Camera viewport: (#{@camera_min_x}, #{@camera_min_y}) to (#{@camera_max_x}, #{@camera_max_y})", 20).draw(1600, 250, 1)
Gosu::Image.from_text("Camera boxes: #{@camera_boxes}", 20, font: FONT_PATH).draw(1600, 175, 1)
Gosu::Image.from_text("Camera location: #{@camera_x}, #{@camera_y}", 20, font: FONT_PATH).draw(1600, 200, 1)
Gosu::Image.from_text("Camera zoom: #{@camera_zoom}, #{@camera_x_zoom_offset}", 20, font: FONT_PATH).draw(1600, 225, 1)
Gosu::Image.from_text("Camera viewport: (#{@camera_min_x}, #{@camera_min_y}) to (#{@camera_max_x}, #{@camera_max_y})", 20, font: FONT_PATH).draw(1600, 250, 1)
end
end