Xer0botXer0
Senpai
Hi fellow game devs,
Hope everyone's making some good progress in their game projects!
So I recently implemented the use of a view in my game and the idea is that when when I zoom out my GUI objects should still retain their sizes and not move. The moving part I got right, but when it comes to sizing, Im not exactly sure what's going on.
So here Im decrementing the view width and height which simulates zooming out, it works great but there's objects within the view that shouldn't be effected by this.
So anyone want to pick their brain on this ?
Hope everyone's making some good progress in their game projects!
So I recently implemented the use of a view in my game and the idea is that when when I zoom out my GUI objects should still retain their sizes and not move. The moving part I got right, but when it comes to sizing, Im not exactly sure what's going on.
Code:
//zoom out
if mouse_wheel_down() //outwards
{
if view_hview[0] <= view_hport[0] - 25 && view_wview[0] <= view_wport[0] - 25 //max zoom out set.
{
view_hview[0] = view_hview[0] + 25;
view_wview[0] = view_wview[0] + 25;
}
}
So anyone want to pick their brain on this ?