Hi,
When I use the following code to display some text according to the view for the x position:
camera_get_view_x(view_camera[0]) + (window_get_width() / 2)
It works fine in windowed mode but when I switch to fullscreen mode it doesn't work correctly and displays the text off screen to the right.
It also does the same thing for the height.
Does anyone know what may be happening?
The values for camera_get_view_x(view_camera[0]) and window_get_width() look to be correct.
The full code is:
global.xview = camera_get_view_x(view_camera[0]);
global.yview = camera_get_view_y(view_camera[0]);
draw_set_color(c_black);
draw_set_font(fnt_large);
draw_set_halign(fa_center);
draw_set_valign(fa_middle);
draw_text(global.xview + (window_get_width() / 2), global.yview + (window_get_height() / 2), "LEVEL COMPLETE");
Thank you
When I use the following code to display some text according to the view for the x position:
camera_get_view_x(view_camera[0]) + (window_get_width() / 2)
It works fine in windowed mode but when I switch to fullscreen mode it doesn't work correctly and displays the text off screen to the right.
It also does the same thing for the height.
Does anyone know what may be happening?
The values for camera_get_view_x(view_camera[0]) and window_get_width() look to be correct.
The full code is:
global.xview = camera_get_view_x(view_camera[0]);
global.yview = camera_get_view_y(view_camera[0]);
draw_set_color(c_black);
draw_set_font(fnt_large);
draw_set_halign(fa_center);
draw_set_valign(fa_middle);
draw_text(global.xview + (window_get_width() / 2), global.yview + (window_get_height() / 2), "LEVEL COMPLETE");
Thank you