Imperial
Member
If we are using a surface
How to make the surface scale with the view when we Zoom In/Out with this Code
thanks man for help
Code:
surface = surface_create(view_wview,view_hview);
Code:
if mouse_wheel_up()
{
center_of_space_x = view_xview+view_wview/2;
center_of_space_y = view_yview+view_hview/2;
view_wview -= view_wview * zoom_factor;
view_hview -= view_hview * zoom_factor;
view_xview = center_of_space_x - view_wview/2;
view_yview = center_of_space_y - view_hview/2;
}