Comunidad Game Maker

Ayuda => Preguntas y respuestas => Mensaje iniciado por: yokaiworld en Agosto 10, 2014, 07:32:52 AM

Título: el tamaño de la letra cambia cuando reinicio el juego
Publicado por: yokaiworld en Agosto 10, 2014, 07:32:52 AM
hola cuando creo un menu, funciona bien pero cuando le doy game_restart (para reiniciar el juego y todos los valores) me cambia el tamaño de las letras:

Information about object: menucontrol
Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

Create Event:

execute code:

menu_options[1] = "Fight...";
menu_options[2] = "Biografy";
menu_options[3] = "Credits";
menu_options[4] = "EndGame";

selector = 1;

Step Event:

execute code:

if keyboard_check_released(vk_up)
     {if (selector>1) selector-=1}
if keyboard_check_released(vk_down)
     {if (selector<4) selector+=1}
if keyboard_check_released(vk_enter)
     {if selector=1 then room_goto(rm_char_select)
      if selector=2 then room_goto(options)
      if selector=3 then game_load('save')
      if selector=4 then game_end()}

Draw Event:

execute code:

for( i=1; i<=4; i+=1)
{
//draw_text( 370, 25 * i + 420, menu_options );
draw_text_transformed_color(370, 25 * i + 420, menu_options,1, 1, 0, c_white,c_white, c_yellow, c_yellow, 1);
}

//draw_text(350, 25 * selector + 420, ">" );
draw_text_transformed_color(350, 25 * selector + 420, ">",1, 1, 0, c_white, c_white, c_yellow, c_yellow, 1);

Título: Re:el tamaño de la letra cambia cuando reinicio el juego
Publicado por: Guacusio en Agosto 10, 2014, 10:19:25 PM
Hay algunas cosas no aclaradas:

-menu_options es un array, ¿por qué en las sentencias draw lo usas sin indicar el subíndice?

-Estás dibujando varios textos, ¿todos tienen el tamaño de letras cambiados?

-¿usas algún font?
Título: Re:el tamaño de la letra cambia cuando reinicio el juego
Publicado por: Kamikaze en Agosto 11, 2014, 11:51:23 AM
Donde uses draw_text() seteale antes la fuente deseada con draw_set_font() y proba nuevamente.. Por ejemplo en el codigo draw que publicaste, agregalo ahi

draw_set_font(font0); // font0 seria la fuente a usar

for( i=1; i<=4; i+=1)
{
//draw_text( 370, 25 * i + 420, menu_options );
draw_text_transformed_color(370, 25 * i + 420, menu_options,1, 1, 0, c_white,c_white, c_yellow, c_yellow, 1);
}

//draw_text(350, 25 * selector + 420, ">" );
draw_text_transformed_color(350, 25 * selector + 420, ">",1, 1, 0, c_white, c_white, c_yellow, c_yellow, 1);
Título: Re:el tamaño de la letra cambia cuando reinicio el juego
Publicado por: yokaiworld en Agosto 12, 2014, 07:15:57 AM
gracias a los 2 era eso