I'm trying to implement a system where the player can zoom in and out (set the scale) of a layout. I don't want the player to be able to zoom out so far such that the scaled layout is smaller than the window. So I did this (in pseudo code):
Function zoom (float increment) {
if ((LayerScale("map_layer") + increment) * LayoutWidth >= WindowWidth && (LayerScale("map_layer") + increment) * LayoutHeight >= WindowHeight) {
SetLayerScale("map_layer", LayerScale("map_layer") + increment);
}
}
or C2 events:
However, this doesn't work. The value for LayerScale("map_layer") * LayoutWidth gives the width of the layer when scaled, however I can still produce this:
the layer width says it's 1536 and the window width is 1366, but surely if this were the case, then there is enough of the layer to fill the screen. Why is it that there is a white patch where there is no layout?
EDIT: After testing I have found it's to do with the fullscreen mode. I am using Scale outer, can this work with this mode?