Font drawing is nice now
This commit is contained in:
@ -22,9 +22,9 @@ render :: proc()
|
||||
// Render Screenspace
|
||||
{
|
||||
fps_msg := fmt.tprint( "FPS:", rl.GetFPS() )
|
||||
fps_msg_width := measure_text_size( fps_msg, default_font, points_to_pixels(24.0), 0.0 ).x
|
||||
fps_msg_width := measure_text_size( fps_msg, default_font, 16.0, 0.0 ).x
|
||||
fps_msg_pos := screen_get_corners().top_right - { fps_msg_width, 0 }
|
||||
debug_draw_text( fps_msg, fps_msg_pos, points_to_pixels(24.0), color = rl.GREEN )
|
||||
debug_draw_text( fps_msg, fps_msg_pos, 16.0, color = rl.GREEN )
|
||||
|
||||
debug_text :: proc( format : string, args : ..any )
|
||||
{
|
||||
@ -43,7 +43,7 @@ render :: proc()
|
||||
position.y += debug.draw_debug_text_y
|
||||
|
||||
content := fmt.bprintf( draw_text_scratch[:], format, ..args )
|
||||
debug_draw_text( content, position, points_to_pixels(24.0) )
|
||||
debug_draw_text( content, position, 16.0 )
|
||||
|
||||
debug.draw_debug_text_y += 16
|
||||
}
|
||||
@ -100,6 +100,8 @@ render_mode_2d :: proc() {
|
||||
rl.DrawRectangleRec( rect, box.color )
|
||||
}
|
||||
|
||||
debug_draw_text_world( "This is text in world space", { 0, 0 }, 16.0 )
|
||||
|
||||
if debug.mouse_vis {
|
||||
// rl.DrawCircleV( screen_to_world(input.mouse.pos), 10, Color_GreyRed )
|
||||
}
|
||||
|
Reference in New Issue
Block a user