Author Topic: ArcadeBliss - Info Overload Edition  (Read 61673 times)

bundangdon

  • Sr. Member
  • ****
  • Posts: 212
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #45 on: April 02, 2016, 07:46:08 AM »
I'm really loving this theme, so I decided to make a few of my own personal alterations. I came across one problem while doing this and hopefully there's a quick fix? When I change the resolution in the "layout.nut" file to 1920x1080, I get a much cleaner look with a lot more space to work with. However, the selected screen (video) is not in the center anymore. The selected/highlighted screen is about 1 step to the left. I looked through the entire layout.nut file and tried several setting changes but couldn't get it back in the center. Any help would be very appreciated :)

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: New Theme - ArcadeBliss
« Reply #46 on: April 02, 2016, 01:41:44 PM »
Thanks a lot verion! I wish I had your design chops.

Your design is pretty good - I would increase bottom margin thou. Now it kinda look like you've run out of space.
Also the player counter is only for two digits - and looks bad if you played a game 100+ times (like I did with my fav games).

Other than that - it's great!

And something to think about:
While I appreciate the enormous effort in creating history.dat, but I'm not a fan, because history.dat entries are not that great (or at least of various quality). Personally - I would add an option to disable history.dat listing and make fanart more visible. It would also benefit those with emulator that doesn't have history.dat

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #47 on: April 04, 2016, 10:37:09 AM »
I'm really loving this theme, so I decided to make a few of my own personal alterations. I came across one problem while doing this and hopefully there's a quick fix? When I change the resolution in the "layout.nut" file to 1920x1080, I get a much cleaner look with a lot more space to work with. However, the selected screen (video) is not in the center anymore. The selected/highlighted screen is about 1 step to the left. I looked through the entire layout.nut file and tried several setting changes but couldn't get it back in the center. Any help would be very appreciated :)

All of the resting positions along the x-axis for the conveyour (Sliding TVs) are located in this array:

Code: [Select]
static x_lookup = [ -560, -360, -160, 80, 280, 440, 640, 840, 1000, 1200, 1440, 1640, 1840 ];
just put in the ones that fit best for you. Do not alter the number of resting positions e.g.: 8 instead of 13 - just adjust the values. In a 3 TV layout, there are actual 5 - 2 are offscreen so that the animation apears to flow instead of new ones just popping up.

Afterwards, let me have a copy so that I may have a look. Thanks.

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #48 on: April 05, 2016, 04:52:24 AM »
Hey ArcadeBliss,

I'm currently working on implementing an overlay menu in a layout that I'm working on at the moment, and was wondering how you got the "Options Menu" to show up?

I can't find a specific key in the controls options in AM that would let me trigger such a menu.  The closest thing that I can find is the standard "Configure" option (set to TAB by default), but this menu doesn't seem to trigger the ShowOverlay/HideOverlay events.

Are you able to shed some light on this?

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #49 on: April 05, 2016, 08:56:38 AM »
When I get home,  I will send you the code and how I did this. A little hint,  think outside of the box (eh layout   ;) )

-- So chrisvg I am home now. A little background first, my cab has 4 admin buttons to ease frontend use for guests. They are MENU, SELECT, QUIT/BACK, PAUSE.

In Attractmode, I set MENU to open the Menu plugin. The menu you see in my video/screenshot is showing those options. I wanted to make sure, all options someone would use can be set using only those admin buttons.

The menu code used in my layout is here - it works for all menus that are not called using the tab key e.g.: displays hot key or the plugin menu hotkey.
Code: [Select]
////////////////////////////////////////
//
//Configure Custom Menu
//
///////////////////////////////////////
// Overall Surface
local overlaySurface = fe.add_surface(1280,1024);
overlaySurface.visible = false;

// translucent background
local overlayBackground = overlaySurface.add_image("images/overlaymenu/black.png",0,0,1280,1024);
overlayBackground.alpha = 225;

// create extra surface for the menu
local overlayMenuSur = overlaySurface.add_surface(322,328);
overlayMenuSur.set_pos(480,359);
overlayMenuSur.add_image("images/overlaymenu/menuframe.png",0,40,321,256); // Add the menu frame
local overlay_lb = overlayMenuSur.add_listbox(1,40,320,256); //Add the listbox
overlay_lb.rows = 6; // the listbox will have 6 slots
overlay_lb.charsize  = 22;
overlay_lb.set_rgb( 128, 128, 128 );
overlay_lb.sel_style = Style.Bold;
overlay_lb.set_sel_rgb( 255, 255, 255 );
overlay_lb.set_selbg_rgb( 255, 165, 0 );
local overlayMenuTitle = overlayMenuSur.add_text("[DisplayName]",0,0,322,35); //Add the menu title
overlayMenuTitle.charsize=30;
overlayMenuTitle.style = Style.Bold;
overlayMenuTitle.set_rgb(255,165,0);

//clone the menu surface for the bartop picture
overlaySurface.add_image("images/overlaymenu/black.png",330,480,100,240);
local overlayClone = overlaySurface.add_clone(overlayMenuSur);
overlayClone.set_pos(354,559,102,90);
overlayClone.skew_x=12;
overlayClone.pinch_y=8;
overlayClone.alpha=250;
local overlayBartop = overlaySurface.add_image("images/overlaymenu/menuBartop.png"); //add the bartop picutre
overlayBartop.set_pos(300,480);

// Show the up time
local ut = overlaySurface.add_text( "ELASPED TIME: ", 460, 655, 280, 24 );
ut.set_rgb( 128, 128, 128 );
ut.align = Align.Right;
ut.charsize=15;

local ut = overlaySurface.add_text( "", 725, 655, 280, 25 );
ut.set_rgb( 255, 165, 0 );
ut.align = Align.Left;
ut.charsize=15;

// Function to update the time
function update_uptime( ttime )
{
local mil = fe.layout.time;
local seconds = ((mil / 1000) % 60) ;
local minutes = ((mil / (1000*60)) % 60);
local hours   = ((mil / (1000*60*60)) % 24);
//ut.msg= hours+":"+minutes+":"+seconds;
ut.msg = format("%02d", hours ) + ":" + format("%02d", minutes) + ":" + format("%02d", seconds )
}
fe.add_ticks_callback( this, "update_uptime" );

// tell Attractmode we are using a custom overlay menu
fe.overlay.set_custom_controls( overlayMenuTitle, overlay_lb );

Attached you will find my altered menu plugin script with my menu options. The file goes in your plugin folder, the code is here for reference.

Code: [Select]
///////////////////////////////////////////////////
//
// Attract-Mode Frontend - Control Menu plugin
//
///////////////////////////////////////////////////
//
// Define use configurable settings
//

const OPT_HELP="The text to show in the menu for this item";
const CMD_HELP="The command to run when this item is selected.  Use @<script_name.nut> to run a squirrel script that is located in the Utility Menu's plugin directory.";

class UserConfig </ help="Calls a Attract Mode Control Menu for Arcade Setups with limited buttons " /> {
</ label="Control", help="The control to press to display the Attract Mode Control Menu", is_input=true, order=1 />
button="U";
}

local config=fe.get_config();
local my_dir = fe.script_dir;
local items = [];

const MAX_OUTPUT_LINES = 40;

fe.load_module( "submenu" );

class AnyCommandOutput extends SubMenu
{
m_t = "";

constructor()
{
base.constructor();
m_t = fe.add_text( "", 0, 0, fe.layout.width, fe.layout.height );
m_t.charsize=fe.layout.height / MAX_OUTPUT_LINES;
m_t.align=Align.Left;
m_t.word_wrap=true;
m_t.bg_alpha=180;
m_t.visible = false;
}

function on_show() { m_t.visible = true; }
function on_hide() { m_t.visible = false; }
function on_scroll_up() { m_t.first_line_hint--; }
function on_scroll_down() { m_t.first_line_hint++; }

function show_output( msg )
{
m_t.msg = msg;
m_t.first_line_hint=0;

show( true );
}
};
fe.plugin[ "Attract Mode Control Menu" ] <- AnyCommandOutput();

//
// Load the menu with the necessary commands
//


items.append("Choose Emulator");
items.append("Configure System");
items.append("Display Filters");
items.append("Add/Remove Favorites");
items.append("Power Off");

//
// Add a cancel/back option
//
items.append( "Back" );

//
// Create a tick function that tests if the configured button is pressed and runs
// the corresponding script or command if it is.
//
fe.add_ticks_callback( "control_menu_plugin_tick" );

function control_menu_plugin_tick( ttime )
{
if ( fe.get_input_state( config["button"] ) )
{

local res = fe.overlay.list_dialog( items, "Options Menu", items.len() / 2 );
if ( res < 0)
return;

if (res ==2) {
fe.signal("filters_menu");

} else if (res ==3) {
fe.signal("add_favourite");

} else if (res ==0) {
fe.signal("displays_menu");
} else if (res ==1) {
fe.signal("configure");
} else if (res ==4) {
fe.signal("exit_no_menu");
}
}
}

Hmmmm, now that I think of it, I could have put this in my layout as well. But hey, I like to keep things seperate. The plugin will still work when I get tired of my own layout and change it one day.
« Last Edit: April 05, 2016, 08:23:14 PM by ArcadeBliss »

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #50 on: April 05, 2016, 09:06:31 PM »
Thanks for confirming that I was simply barking up the wrong tree!

bundangdon

  • Sr. Member
  • ****
  • Posts: 212
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #51 on: April 06, 2016, 01:35:31 AM »
I'm really loving this theme, so I decided to make a few of my own personal alterations. I came across one problem while doing this and hopefully there's a quick fix? When I change the resolution in the "layout.nut" file to 1920x1080, I get a much cleaner look with a lot more space to work with. However, the selected screen (video) is not in the center anymore. The selected/highlighted screen is about 1 step to the left. I looked through the entire layout.nut file and tried several setting changes but couldn't get it back in the center. Any help would be very appreciated :)

All of the resting positions along the x-axis for the conveyour (Sliding TVs) are located in this array:

Code: [Select]
static x_lookup = [ -560, -360, -160, 80, 280, 440, 640, 840, 1000, 1200, 1440, 1640, 1840 ];
just put in the ones that fit best for you. Do not alter the number of resting positions e.g.: 8 instead of 13 - just adjust the values. In a 3 TV layout, there are actual 5 - 2 are offscreen so that the animation apears to flow instead of new ones just popping up.

Afterwards, let me have a copy so that I may have a look. Thanks.

Great stuff! Thank you once again :) I finally got it centered after several attempts to adjust the values that you mentioned, and came up with this setup: static x_lookup = [ -270, -70, 170, 370, 570, 770, 970, 1070, 1370, 1570, 1770, 1970, 2280 ];
This only looks good at the moment with 5 on the screen at one time, but I'll get by with it  ::) As you can see, I made some other adjustments through photoshop with a new color scheme and design with the boxes on the bottom and the video placed on the left side as shown in the screenshot below. I hope you don't mind that I made some of my own personal adjustments, only for my own individiual use of course

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #52 on: April 06, 2016, 03:51:44 AM »
Cool,  I am glad it worked for you. Regarding using the theme, feel free to change and do with it what you like,  even distribute it. I just found it cool that someone finds use of something I made. Would you mind packing the theme up and distributing the zip file? I like the system logo you made. Btw take a look at the menu plug in in this thread. It might be of interest to. My next project will be a search plugin across all filters simultaneously.
« Last Edit: April 06, 2016, 06:07:54 AM by ArcadeBliss »

bionictoothpick

  • Sr. Member
  • ****
  • Posts: 320
  • He who laughs lasts.
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #53 on: April 06, 2016, 04:18:21 AM »
I especially like the center box being larger (in the middle bottom).

bundangdon

  • Sr. Member
  • ****
  • Posts: 212
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #54 on: April 06, 2016, 06:48:29 AM »
Cool,  I am glad it worked for you. Regarding using the theme, feel free to change and do with it what you like,  even distribute it. I just found it cool that someone finds use of something I made. Would you mind packing the theme up and distributing the zip file? I like the system logo you made. Btw take a look at the menu plug in in this thread. It might be of interest to. My next project will be a search plugin across all filters simultaneously.

Sure, no problem! As for the system logo, I just redesigned the original background.png file with a new color scheme, along with the system and its logo (Nintendo NES). However, I included my modified photoshop .psd file so that anyone can easily change the colors, system and logo in its same folder. And please keep in mind that it's only well centered with the 5 box arrangement. When I set it to 7, 9, 11, or 13 it doesn't look quite so nice ::)


[attachment deleted by admin]

bionictoothpick

  • Sr. Member
  • ****
  • Posts: 320
  • He who laughs lasts.
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #55 on: April 06, 2016, 05:33:48 PM »
Could you help me with the unknown-emulator?

I want it to pull the emulator name from the emulator chosen and just add an image in the folder you have for that emulator.

For example: if I call the emulator file retroarch-nes I want retroarch-nes.png to show.

___RESOLVED_____Malfacine's code provided the solution. Just need an emulator.png matching the name of the chosen emulator to work.
local clogo = fe.add_image("clogos/[Emulator]", flx*0.67, fly*0.02, 0, 0 );
« Last Edit: April 07, 2016, 03:02:17 AM by bionictoothpick »

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #56 on: April 07, 2016, 08:41:48 AM »
Could you help me with the unknown-emulator?

I want it to pull the emulator name from the emulator chosen and just add an image in the folder you have for that emulator.

For example: if I call the emulator file retroarch-nes I want retroarch-nes.png to show.

___RESOLVED_____Malfacine's code provided the solution. Just need an emulator.png matching the name of the chosen emulator to work.
local clogo = fe.add_image("clogos/[Emulator]", flx*0.67, fly*0.02, 0, 0 );

I'll give the info when I get home. Stay tuned

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #57 on: April 07, 2016, 10:42:38 PM »
That is a much more elegent solution than what I implemented. Will have to use this to simplify things. Thanks for posting.

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #58 on: April 08, 2016, 10:41:03 AM »
Yeah, there is a bunch of different ways to do it, this probably being the simplest. I might need to update mine as well.

That said, I wish there was more documentation other than electric imp on squirrel out there. I wanted to create a 3d cube that would flip to a new video or image on its z axis on transition. But, this is beyond my skill set. I think there are some c++ libraries that accomplish this already which would make things a lot easier. So, if anyone is up to the task?

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 195
    • View Profile
Re: New Theme - ArcadeBliss
« Reply #59 on: April 25, 2016, 01:57:54 AM »
I will be updating this theme soon. I am in the process of creating a new theme and in doing so, there are some optimization I would like to do here:

Planned optimizations:
  • the favorites icon
  • horizontal navigation
  • snap video sound
  • emulator icon display