antiblock
https://i.imgur.com/aJ17bf7.gif
  • Chatbox

    You don't have permission to chat.
    Load More
Sign in to follow this  
obetuno

[Resolvido] Aos Programadores Py !

10 posts in this topic

Preciso de uma tela de login que permita mudar aleatoriamente as backgrounds cada vez que se abre o jogo...

Alguém sabe programar isto ? Deve ser coisa boba...

PS: As backgrounds são 7 ! E elas estão com seus respectivos ficheiros SUB:

EXEMPLO:

Imagem colocada

- login.jpg e login.sub (principal)

- bg1.jpg e login1.sub

- bg2.jpg e login2.sub

- bg3.jpg e login3.sub

e por ai vai...

Me ajudar e dou http://cyber-gamers.org/public/style_emoticons/default/451960.gif Além de uma dedicatória ! ;)

Share this post


Link to post
Share on other sites
antiblock
https://i.imgur.com/aJ17bf7.gif

Algo simples e interessante! Uma boa idéia que vai ajudar muita gente.

Share this post


Link to post
Share on other sites

Aqui tens:

Descompactas o locale_xx .

Depois vais a locale/ xx / ui/

loginwindow.py

Altera:

   	 {			"name" : "bg2", "type" : "expanded_image", "x" : 0, "y" : 0,			"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,			"image" : "locale/pt/ui/login.sub",		},
Por:

   	 {			"name" : "bg2", "type" : "expanded_image", "x" : 0, "y" : 0,			"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,			"delay" : 6,			"images" :			(		   	 "locale/pt/ui/login/1.sub",				"locale/pt/ui/login/2.sub",				"locale/pt/ui/login/3.sub",				"locale/pt/ui/login/4.sub",				"locale/pt/ui/login/5.sub",				"locale/pt/ui/login/6.sub",				"locale/pt/ui/login/7.sub",				"locale/pt/ui/login/8.sub",			)		},
PS: Não tenho a certeza se no name é bg1 ou bg2.

Share this post


Link to post
Share on other sites
Vou testar... Ja vos digo.

Share this post


Link to post
Share on other sites

Vou testar... Ja vos digo.

em prencipios não vai funcionar. Esqueci-me de uma coisa:

   	 {			"name" : "bg2", "type" : "expanded_image", "x" : 0, "y" : 0,			"type" : "ani_image",			"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,			"delay" : 6,			"images" :			(				"locale/loginscreen/ani/1.sub",				"locale/loginscreen/ani/2.sub",				"locale/loginscreen/ani/3.sub",				"locale/loginscreen/ani/4.sub",		   	 "locale/loginscreen/ani/5.sub",		   	 "locale/loginscreen/ani/6.sub",		   	 "locale/loginscreen/ani/7.sub",				"locale/loginscreen/ani/8.sub",			)		},

Share this post


Link to post
Share on other sites

Que http://cyber-gamers.org/public/style_emoticons/default/lol.gif ! funciona sim... Mas o intervalo de tempo para alterar está curto demais ! kkkkk

Será se é no "delay" para mudar ? Vou tentar acá.

Sim, é no delay, Quanto mais aumentas, mais tempo ele demora a rodar ^^.

Share this post


Link to post
Share on other sites

Muito Obrigado ! Me ajudou demais. http://cyber-gamers.org/public/style_emoticons/default/451960.gif por isto...

O meu terminou assim:

{

"name" : "bg2", "type" : "expanded_image", "x" : 0, "y" : 0,

"type" : "ani_image",

"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,

"delay" : 200,

"images" :

(

"locale/de/ui/login1.sub",

"locale/de/ui/login2.sub",

"locale/de/ui/login3.sub",

"locale/de/ui/login4.sub",

"locale/de/ui/login5.sub",

"locale/de/ui/login6.sub",

)

},

Tópico resolvido.

Share this post


Link to post
Share on other sites

Resolvido, fechado

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this