Hola!
Estoy haciendo una aplicación, que según el ancho y largo de la pantalla del dispositivo que estés usando, se cambie el tamaño y la vista del room.
El código es este (basicamente lo que hace es cambiar el tamaño y view del room y de la ventana):
En mi caso, la pantalla de mi pc es 1366*768
La ventana se cambia bien, a ese tamaño, pero la vista tiene un problema, y no sé cual es! como que se aprieta , y quedan bordes negros. Pueden verlo en la imagen:
http://puu.sh/8tT2T.png
¿Alguna solución? me estoy volviendo loco con esto y no puedo hacerlo funcionar.
Gracias.
Estoy haciendo una aplicación, que según el ancho y largo de la pantalla del dispositivo que estés usando, se cambie el tamaño y la vista del room.
El código es este (basicamente lo que hace es cambiar el tamaño y view del room y de la ventana):
Código [Seleccionar]
room_set_width(rm_principal,global.device_w);
room_set_height(rm_principal,global.device_h);
room_set_view(rm_principal, //What room we want to do everything to
0, //What view number we want to set everything to
1, //Visible or not - Yes we want it visible
0, //Where the view's x should start
0, //Same with y - Not important, cause it will change when following the player
global.device_w, //wview - width of the view
global.device_h, //hview - height of the view
0, //Where the output x should start
0, //Same for y - Just set to 0. Lol.
global.device_w, //wport - How wide we want it to show our game on the device
global.device_h, //hport - Same with height - Of course the height of the screen
0,
0, //These two lines centers the player when moving
-1,
-1, //The speed to move the view - Default -1 = Instant follow
-1); //The object we want to follow
window_set_size(global.device_w, global.device_h);
room_goto(rm_principal);
En mi caso, la pantalla de mi pc es 1366*768
La ventana se cambia bien, a ese tamaño, pero la vista tiene un problema, y no sé cual es! como que se aprieta , y quedan bordes negros. Pueden verlo en la imagen:
http://puu.sh/8tT2T.png
¿Alguna solución? me estoy volviendo loco con esto y no puedo hacerlo funcionar.
Gracias.