Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
enable audio input, add debug color consts
Browse files Browse the repository at this point in the history
  • Loading branch information
Nordup committed Mar 1, 2024
1 parent 7157b1c commit dc2a69b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions project/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ boot_splash/show_image=false
config/icon="res://app_icon/icon_64.png"
config/windows_native_icon="res://app_icon/icon.ico"

[audio]

driver/enable_input=true

[autoload]

DataSaver="*res://scripts/data_saver.gd"
Expand Down
6 changes: 4 additions & 2 deletions project/scripts/debug-log/debug.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ extends Node
signal logged(msg: String)
signal error(msg: String)

const ERROR_CLR = Color.RED
const WARN_CLR = Color.YELLOW
const SILENT_CLR = Color.DIM_GRAY


func logr(msg) -> void:
print_rich(str(msg))
Expand All @@ -20,5 +24,3 @@ func logclr(msg, color: Color) -> void:
var rich_clr = "[color=%s]%s[/color]" % [color.to_html(), str(msg)]
print_rich(rich_clr)
logged.emit(rich_clr)

# TODO: log category with defined color
2 changes: 1 addition & 1 deletion project/scripts/sandbox/input_sync.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func _ready() -> void:
var viewport_height = ProjectSettings.get_setting("display/window/size/viewport_height", 648)
scale_width = float(render_result.width) / viewport_width
scale_height = float(render_result.height) / viewport_height
Debug.logclr("Mouse position scale: %fx%f" % [scale_width, scale_height], Color.DIM_GRAY)
Debug.logclr("Mouse position scale: %.2fx%.2f" % [scale_width, scale_height], Color.DIM_GRAY)


func start_server() -> void:
Expand Down

0 comments on commit dc2a69b

Please sign in to comment.