Author Topic: [HELP] Custom overlay Menu  (Read 1827 times)

arthurvalenca

  • Sr. Member
  • ****
  • Posts: 125
    • View Profile
[HELP] Custom overlay Menu
« on: March 14, 2021, 07:46:55 AM »
Hello everyone, I would like to know if there is any way to transform the default configuration menu, which comes in the AM, in a personalized menu, I know that Favorites, Tag's and Exit Attractmode can, but I have been breaking my head for many days and not I can come up with a solution, could someone help?


this works well with Favorites, Tags and Exit AttractMode.

Code: [Select]
##########################
## Menu Overall Surface ##
##########################

local overlaySurface = fe.add_surface(flw,flh);
overlaySurface.visible = false;

// translucent background
local overlayBackground = overlaySurface.add_image("images/overlaymenu/black.png",flx*0.0,fly*0.0,flw,flh);
overlayBackground.alpha = 240;

// create extra surface for the menu
local overlayMenuSur = overlaySurface.add_surface(flx*0.600,fly*0.800);
overlayMenuSur.set_pos(flw*0.290,flh*0.210); //tamanho da caixa
overlayMenuSur.add_image("images/overlaymenu/menuframe.png",flx*0.060,fly*0.085,flw*0.300,flh*0.250); // Add the menu frame

local overlay_lb = overlayMenuSur.add_listbox(flx*0.065,fly*0.100,flw*0.291,flh*0.200); //Add the listbox
overlay_lb.rows = 3; // the listbox will have 6 slots
overlay_lb.charsize  = 32;
overlay_lb.font="Geforce Bold";
overlay_lb.set_rgb( 128, 128, 128 );
overlay_lb.align = Align.Centre;
//overlay_lb.sel_style = Style.Bold;
overlay_lb.set_sel_rgb( 111, 174, 0 );
overlay_lb.set_selbg_rgb( 0, 0, 0 );

local overlayMenuTitle = overlayMenuSur.add_text("",flx*0.010,fly*-0.125,flw*0.400,flh*0.35); //Add the menu title
overlayMenuTitle.charsize=35;
overlayMenuTitle.style = Style.Bold;
overlayMenuTitle.set_rgb(255,255,255);

local overlayBartop = overlaySurface.add_image("images/overlaymenu/arrow.gif"); //add the bartop picutre
overlayBartop.set_pos(flx*0.385,fly*0.385,flw*0.035,flh*0.050);

// Show the up time
local ut = overlaySurface.add_text( "ELASPED TIME: ", flx*0.512, fly*0.515, flw*0.100, flh*0.024 );
ut.set_rgb( 190, 190, 190 );
ut.align = Align.Right;
ut.charsize=12;

local ut = overlaySurface.add_text( "", flx*0.607, fly*0.515, flw*0.055, flh*0.024 );
ut.set_rgb( 255, 165, 0 );
ut.align = Align.Left;
ut.charsize= 14;
ut.font = "Geforce Light";



« Last Edit: March 14, 2021, 07:49:25 AM by arthurvalenca »

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1235
    • View Profile
    • My deviantart page
Re: [HELP] Custom overlay Menu
« Reply #1 on: March 14, 2021, 09:28:55 AM »
As far as I know, there's no way to customize the main Attract Mode menu as you can do instead for favorites, tags, displays, filters and exit AM. Even if you define your own menu system, some of the functions that are in the main AM menu are not available from inside the layout and you'll have to rewrite all the code yourself (that is, editing the emulator files, the attract.cfg etc). I'm not saying it's impossible, but it's probably a bit overkill because it's like writing your own Attract Mode inside an Attract Mode layout :D
« Last Edit: March 14, 2021, 09:31:49 AM by zpaolo11x »