Autor Tema: Ayuda para compilar AM desde Ubuntu  (Leído 1987 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado machiminax

  • VIP
  • *
  • Mensajes: 1849
  • Gracias 112
  • Ciudad: indefinida
  • Pais: desconocido
Re:Ayuda para compilar AM desde Ubuntu
« Respuesta #15 en: Junio 10, 2018, 09:37:30 pm »
Advertisement
No se decirte exactamente el porqué pero a veces tengo que usar "object" para hacer estas funciones de show - hide

Código: [Seleccionar]
/////////////////////
// PopUpSnap
/////////////////////
::OBJECTS <- {
obg = fe.add_image ("black.png",0,0,flw, flh),
osbg = fe.add_image ("white.png", flx*0.249,fly*0.187,flw*0.501, flh*0.667),
osbg2 = fe.add_image("black.png", flx*0.252,fly*0.19,flw*0.496, flh*0.66),
osnap = fe.add_artwork("snap", flx*0.252,fly*0.019,flw*0.496, flh*0.66),
osoverview = fe.add_text("[Overview]", flx*0.05,fly*0.7,flw*0.9, flh*0.5),
oshadow = fe.add_image("oshadow.png", flx*0.252,fly*0.19,flw*0.496, flh*0.66),
oTitle = fe.add_text("[Title]",flx*0.01, fly*0, flw*0.26, flh*0.12),
}

OBJECTS.osnap.trigger = Transition.EndNavigation;
OBJECTS.osnap.preserve_aspect_ratio = true;
OBJECTS.osoverview.charsize = 18;
OBJECTS.osoverview.align = Align.Left;
OBJECTS.osoverview.word_wrap = true;
OBJECTS.osoverview.alpha = 255;
OBJECTS.oTitle.align = Align.Left;
OBJECTS.oTitle.word_wrap = true;
OBJECTS.oTitle.charsize = 24;

OBJECTS.obg.visible=false;
OBJECTS.osbg.visible=false;
OBJECTS.osbg2.visible=false;
OBJECTS.osnap.visible=false;
OBJECTS.osoverview.visible=false;
OBJECTS.oshadow.visible=false;
OBJECTS.oTitle.visible=false;

class displayPreview{

_trigger="Custom1";

constructor()
{
fe.add_signal_handler( this, "on_signal" )
_trigger=fe.get_config()["preview"].tolower();
}

function on_signal( signal )
{
if ( signal == _trigger )
{
local previewClick = fe.add_sound("previewClick.mp3")
previewClick.playing=true
display_preview();
return true;
}
return false;
}
}

displayPreview();

function display_preview()
{

if (OBJECTS.obg.visible == false) {

OBJECTS.obg.visible=true;
OBJECTS.osbg.visible=true;
OBJECTS.osbg2.visible=true;
OBJECTS.osnap.visible=true;
OBJECTS.osoverview.visible=true;
OBJECTS.oshadow.visible=true;
OBJECTS.oTitle.visible=true;

local shrink_ogb = {
    property = "scale", start = 0.1 end = 1.0, time = 500 tween = Tween.Quad,
 }

local alpha_ogb = {
    property = "alpha", start = 0 end = 180, time = 1 time = 1000 tween = Tween.Quad,
 }
 
local shrink_osbg = {
    property = "scale", start = 0.1 end = 1.0, time = 1500 tween = Tween.Quad,
 }

local move_osbg_y = {
    property = "y", start = fly*2 end = fly*0.016, time = 300
 }

local move_osbg2_y = {
    property = "y", start = fly*2 end = fly*0.019, time = 300
 }

local move_osnap_y = {
    property = "y", start = fly*2 end = fly*0.019, time = 1000 tween = Tween.Quad,
 }
 
local shrink_osnap = {
    property = "scale", start = 1.4 end = 1.0, time = 1500 tween = Tween.Quad,
 }
 
local move_osoverview_y = {
    property = "y", start = fly*2 end = fly*0.63, time = 1000
 }

local move_oshadow_y = {
    property = "y", start = fly*2 end = fly*0.019, time = 300
 }

local move_oTitle_y = {
    property = "y", start = fly*2 end = fly*0.02, time = 1000 tween = Tween.Quad,
 }

local move_oPreview_y = {
    property = "y", start = fly*2 end = fly*0.165, time = 300
 }

animation.add( PropertyAnimation( OBJECTS.obg, shrink_ogb ) );
animation.add( PropertyAnimation( OBJECTS.obg, alpha_ogb ) );
animation.add( PropertyAnimation( OBJECTS.osbg, shrink_osbg ) );
animation.add( PropertyAnimation( OBJECTS.osbg, move_osbg_y ) );
animation.add( PropertyAnimation( OBJECTS.osbg2, move_osbg2_y ) );
animation.add( PropertyAnimation( OBJECTS.osnap, shrink_osnap ) );
animation.add( PropertyAnimation( OBJECTS.osnap, move_osnap_y ) );
animation.add( PropertyAnimation( OBJECTS.osoverview, move_osoverview_y ) );
animation.add( PropertyAnimation( OBJECTS.oshadow, move_oshadow_y ) );
animation.add( PropertyAnimation( OBJECTS.oTitle, move_oTitle_y ) );

}

else if (OBJECTS.obg.visible == true) {

OBJECTS.obg.visible=false;
OBJECTS.osbg.visible=false;
OBJECTS.osbg2.visible=false;
OBJECTS.osnap.visible=false;
OBJECTS.osoverview.visible=false;
OBJECTS.oshadow.visible=false;
OBJECTS.oTitle.visible=false;
}
}

Esto lo tengo en el Layout , pero lo he despiezado para otras historias y suele funcionar mejor que "a pelo".

P.D. Hace un tiempo le pase yo una modificacion de su layout con el "cd" dando vueltas , creo que era esto lo que le puse , por si lo quereis añadir.

Código: [Seleccionar]
// Load image based up emulator
local system_art = fe.add_image("../../media/Jukebox/artist/[Extra]", flx*0, fly*0, flw, flh );
system_art.alpha=100;
system_art.preserve_aspect_ratio = true;

//cdart
//////////////////////////////////////

local cdart = fe.add_artwork("cdart", flx*0.1, fly*0.35 flw*0.45, flh*0.45);
cdart.preserve_aspect_ratio = true;
cdart.alpha = 255;

 local cdart_rotation_onload = {
    when = When.StartLayout|Transition.ToNewList ,property = "rotation", start = 0, end = 360, time = 3000, loop = true
 } 

local cdart_x_onload = {
    when = When.StartLayout|Transition.ToNewList ,property = "x", start = flx*0.01, end = flx*0.1, time = 1500,
 } 
 
 local cdart_rotation = {
    when = Transition.EndNavigation ,property = "rotation", start = 0, end = 360, time = 3000, loop = true
 } 
 
 local cdart_x = {
    when = Transition.ToNewSelection ,property = "x", start = flx*0.01, end = flx*0.1, time = 1000,
 }
 
 animation.add( PropertyAnimation( cdart, cdart_rotation_onload ) );
 animation.add( PropertyAnimation( cdart, cdart_x_onload ) );
 animation.add( PropertyAnimation( cdart, cdart_rotation ) );
 animation.add( PropertyAnimation( cdart, cdart_x ) ); 

//backbox
//////////////////////////////////////

local backbox = fe.add_artwork("backbox", flx*-0.05, fly*0.35 flw*0.45, flh*0.45);
backbox.preserve_aspect_ratio = true;
backbox.alpha = 255;


Desconectado iOtero

  • VIP
  • *
  • Mensajes: 2961
  • Gracias 104
  • Ciudad: Uno de Bilbao en Villanueva de la Cañada (Madrid)
  • Pais: España
  • Iniciales nick: ioc
Re:Ayuda para compilar AM desde Ubuntu
« Respuesta #16 en: Junio 10, 2018, 10:12:39 pm »
Yo no he usado nunca objetos, así que no sé si digo una tontería, pero después de leer tu código, no veo por ninguna parte cómo meter el array en pantalla. Lo de animarlo, sería una cosa posterior, la prioridad principal es poner un array en pantalla pulsando una tecla. Y eso no lo veo...

Y en cuanto a lo del cd, no sé que decirte... Josepzin ha diseñado un modelo y yo otro... al final no sé qué dejaremos. El mío está en la pagina 4 de este hilo, y el de josepzin en la página 3, por si lo quieres ver y decirme dónde pondríamos lo del cd:

http://arcadespain.info/Foro/index.php?topic=4969.60

« Última modificación: Junio 10, 2018, 10:14:48 pm por zlagos »

Desconectado machiminax

  • VIP
  • *
  • Mensajes: 1849
  • Gracias 112
  • Ciudad: indefinida
  • Pais: desconocido
Re:Ayuda para compilar AM desde Ubuntu
« Respuesta #17 en: Junio 10, 2018, 10:47:16 pm »
Lo mejor casi es crear otro post xq si no despues dejamos aqui cosas que con el titulo no se asociannal tema.

Con ese codigo dejas en visible tru o false pulsando una tecla.
Tanto textos com imagenes y artworks.

Haz un post nuevo o lo pegamos en el jukebox.

class displayPreview{

   _trigger="Custom1";

   constructor()
   {
      fe.add_signal_handler( this, "on_signal" )
      _trigger=fe.get_config()["preview"].tolower();
   }

   function on_signal( signal )
   {
      if ( signal == _trigger )
      {
         local previewClick = fe.add_sound("previewClick.mp3")   
         previewClick.playing=true
         display_preview();      
         return true;
      }
      return false;
   }
}

displayPreview();

function display_preview()
{

if (OBJECTS.obg.visible == false) {

OBJECTS.obg.visible=true;
OBJECTS.osbg.visible=true;
OBJECTS.osbg2.visible=true;
OBJECTS.osnap.visible=true;
OBJECTS.osoverview.visible=true;
OBJECTS.oshadow.visible=true;
OBJECTS.oTitle.visible=true;

Desconectado iOtero

  • VIP
  • *
  • Mensajes: 2961
  • Gracias 104
  • Ciudad: Uno de Bilbao en Villanueva de la Cañada (Madrid)
  • Pais: España
  • Iniciales nick: ioc
Re:Ayuda para compilar AM desde Ubuntu
« Respuesta #18 en: Junio 10, 2018, 11:17:10 pm »
Creo un nuevo hilo... :P

 


* Salón Recreativo #56 - Olympics 2024 (01-07-2024 / 21-07-2024)  Autor: periko Foro: Salón Recreativo FaseBonus 03/07/2024 (23:37)
* Reto 202 - Track & Field - jordani11 76050 puntos  Autor: Zael Foro: Competiciones y concursos 03/07/2024 (20:54)
* [Recomendación] Cine para los findes en casa (bueno, bonito y barato)  Autor: arquillos Foro: Offtopic 01/07/2024 (19:47)
* ¿A qué estáis jugando ahora mismo?  Autor: joselopez Foro: Offtopic 26/06/2024 (00:38)
* Reto Amiguero 11 - Abu Simbel Profanation The Full Adventura 1.1  Autor: Zael Foro: Commodore Amiga 23/06/2024 (16:30)
* Están muy callados los culerdos, no?  Autor: daninuyusio Foro: Offtopic 22/06/2024 (21:43)
* La revolución que suponen las IA generativas de imágenes a partir de texto  Autor: zzgus Foro: Offtopic 22/06/2024 (19:11)
* [N3DS] Red Viper - Emulando Virtual Boy como Dios manda  Autor: Zael Foro: Noticias de emuladores 17/06/2024 (14:11)
* Reto 321 - Joust 2 - Survival of the Fittest  Autor: Zael Foro: Competiciones y concursos 16/06/2024 (11:37)
* M.A.L.A147+Mame0.153 64/32 bits +35 Roms + Layout Tron_MameV1   Autor: Zael Foro: MALA 16/06/2024 (11:32)
* ZX Touch o el timo de la estampita  Autor: sirdrak Foro: Retroconsolas 12/06/2024 (15:00)
* Lección de vida  Autor: Zael Foro: Offtopic 10/06/2024 (13:13)
* MPAGD (Multi Platform Arcade Game Designer)  Autor: empardopo Foro: Creación de juegos 09/06/2024 (14:37)
* El megapost del ZX Spectrum  Autor: empardopo Foro: Offtopic 09/06/2024 (14:25)
* Ayuda con configuración emulador PXSX2  Autor: empardopo Foro: Emuladores 09/06/2024 (14:20)
* Amiga Games + 1.9.7  Autor: empardopo Foro: Emuladores 09/06/2024 (14:12)
* Salón Recreativo #55 (27-04-2024 / 26-05-2024)  Autor: hoz3 Foro: Salón Recreativo FaseBonus 04/06/2024 (05:52)
* ASUS, ¿me engaña, me tima o se rie de mí?  Autor: empardopo Foro: Offtopic 03/06/2024 (20:09)
* [PS4] PS4 5.05 - Should I Stay or Shoud I Go?  Autor: empardopo Foro: Consolas actuales 03/06/2024 (20:07)
* Retro Portable Maker ArcadeSpain (RPMA)  Autor: empardopo Foro: Otros programas 03/06/2024 (20:03)
* Volante PXN V9 - ¿Ganga... o tongo?  Autor: Zael Foro: Reviews tecnológicas 01/06/2024 (12:08)
* Ofertas Amazon  Autor: empardopo Foro: Offtopic 30/05/2024 (19:35)
* Reto 320 - Wizard of wor  Autor: empardopo Foro: Competiciones y concursos 28/05/2024 (20:58)
* GB-Operator (Emulador GB/GBC/GBA en PC)  Autor: Zael Foro: Retroconsolas 28/05/2024 (20:12)
* Salón Recreativo FaseBonus - Preparativos y Sugerencias  Autor: Zael Foro: Salón Recreativo FaseBonus 24/05/2024 (10:21)
* Música y artistas aptos para nuestra jukebox  Autor: empardopo Foro: Offtopic 22/05/2024 (20:02)
* [Recomendacion] Series para ver  Autor: empardopo Foro: Offtopic 20/05/2024 (20:21)
* Van dos y se cae el del medio - Hilo de cachondeo general  Autor: joselopez Foro: Offtopic 16/05/2024 (00:56)

Reto 320: Wizard of Wor
Buscaunchollo.click