blendman Utilisateur confirmé: Rang **
Messages : 433 Projet Actuel : Crée des jeux, logiciels, BD, Romans et nouvelles.
| Sujet: [resolu]background et background_add (et message_background) Mer 16 Fév 2011 - 17:06 | |
| salut
j'ai remarqué que lorsque l'on charge avec GM8 un background en png directement dans le soft, il prend bien la transparence en compte. Mais si on fait la même chose avec background_add(), il ne la prend pas en compte.
Vous savez comment on peut avoir la transparence du png avec background_add ?
Marciche beaucoup.
Dernière édition par blendman le Mer 16 Fév 2011 - 20:05, édité 1 fois |
|
onilink_ Modérateur
Messages : 9183 Localisation : Montpellier Projet Actuel : Planet Centauri
OniDev
| Sujet: Re: [resolu]background et background_add (et message_background) Mer 16 Fév 2011 - 19:07 | |
| T'est sur ? Y a pas un paramètre pour la transparence ? |
|
robinlife Utilisateur confirmé: Rang ****
Messages : 977
| Sujet: Re: [resolu]background et background_add (et message_background) Mer 16 Fév 2011 - 19:12 | |
| Y'a background_alpha sur GM7 _________________ suivez moi sur ig : @kostozbrr
|
|
blendman Utilisateur confirmé: Rang **
Messages : 433 Projet Actuel : Crée des jeux, logiciels, BD, Romans et nouvelles.
| Sujet: Re: [resolu]background et background_add (et message_background) Mer 16 Fév 2011 - 19:59 | |
| - onilink_ a écrit:
- T'est sur ? Y a pas un paramètre pour la transparence ?
ben normalement c'est soi-disant automatique, mais visiblement c'est encore un joli bug de GM, parce que ça marche pas du tout. - Citation :
background_add(fname,removeback,smooth) Adds the image stored in the file fname to the set of background resources. Many different types of images can be dealt with. When the image has an alpha channel, this is used for transparency. removeback indicates whether to make all pixels with the background color (left-bottom pixel) transparent. smooth indicates whether to smooth the boundaries. The function returns the index of the new background that you can then use to draw it or to assign it to the variable background_index[0] to make it visible in the current room. When an error occurs -1 is returned.
et bien ce qui est en gras ne marche pas chez moi avec mon png. Edit : ah j'ai compris voilà la raison : - Citation :
- message_background(back) Sets the background image for the pop-up box for any of the functions above. back must be one of the backgrounds defined in the game. Unfortunately, alpha values are not taken into account. However, if the left-bottom pixel has an alpha value of 0, all pixels with that color will be considered transparent.
j'utilise le background en tant que background message c'est pour ça. Bon, ben tant pis. |
|
Contenu sponsorisé
| Sujet: Re: [resolu]background et background_add (et message_background) | |
| |
|