Author Topic: default "overview" ?  (Read 274 times)

jedione

  • Hero Member
  • *****
  • Posts: 564
  • punktoe
    • View Profile
default "overview" ?
« on: November 01, 2018, 05:46:44 PM »
ya know  in your theme,   you can set default pic, like snap.png
and it will show up if it cant find the right one or missing...

is their a way to have a default overview?    i tryed   overview.txt and put in the theme
but no go...i also tryed puting like snes.txt in the scraper file of the emulator...

would be nice... ;)
help a friend....

keilmillerjr

  • Hero Member
  • *****
  • Posts: 632
    • View Profile
Re: default "overview" ?
« Reply #1 on: November 01, 2018, 06:59:51 PM »
Create a magic function, test if info.overview is an empty string, and return a string based on results.

jedione

  • Hero Member
  • *****
  • Posts: 564
  • punktoe
    • View Profile
Re: default "overview" ?
« Reply #2 on: November 01, 2018, 07:26:58 PM »
i know what your saying, but dont know how to do it,,,,

sorry it seem alot of us here depend on you few...i would love to take my skills to the next level

but dont know were to start,, most of the stuff i have learned..  have been from other peep code :'(

would love to get to the next level  1 up.. thanks   

but i will try. ok

i see the magic func.and use them,,   but how to creat a new one i thought was embedded in AM.exe?

is there a way to make your own,
« Last Edit: November 01, 2018, 07:30:46 PM by jedione »
help a friend....

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: default "overview" ?
« Reply #3 on: November 02, 2018, 01:46:42 AM »
Hi jedione, to increase your coding skills you have to read the squirrel documentation
http://www.squirrel-lang.org/squirreldoc/

Squirrel is very similar to C++ and Java so reading a book of C++ or Java is a good thing.

Inside my HUD there are many functions that write a message "MISSING" if there's no data.
« Last Edit: November 02, 2018, 01:48:47 AM by Giacomo1982 »

keilmillerjr

  • Hero Member
  • *****
  • Posts: 632
    • View Profile
Re: default "overview" ?
« Reply #4 on: November 02, 2018, 02:24:07 AM »
i know what your saying, but dont know how to do it,,,,

sorry it seem alot of us here depend on you few...i would love to take my skills to the next level

but dont know were to start,, most of the stuff i have learned..  have been from other peep code :'(

would love to get to the next level  1 up.. thanks   

but i will try. ok

i see the magic func.and use them,,   but how to creat a new one i thought was embedded in AM.exe?

is there a way to make your own,

Your magic function will be preprended with an apostrophe like [!overviewFormat]. Untested I’m on iPhone -

Code: [Select]
function overviewFormat() {
  fe.game_info(Info.Overview) == “” ? return “;(” : return fe.game_info(Info.Overview);
}

Depending on what you want to send, you might want to break it down into a local variable.

jedione

  • Hero Member
  • *****
  • Posts: 564
  • punktoe
    • View Profile
Re: default "overview" ?
« Reply #5 on: November 02, 2018, 06:53:34 AM »
when i drop that code in the theme, it just breaks it.
help a friend....

keilmillerjr

  • Hero Member
  • *****
  • Posts: 632
    • View Profile
Re: default "overview" ?
« Reply #6 on: November 02, 2018, 01:03:55 PM »
when i drop that code in the theme, it just breaks it.

It’s a start. You need to debug it yourself. I did it from memory on iPhone on workday. Have the function print to terminal. If you can’t get it, I’ll test tomorrow. I have weekend off. Need to spend tonight fixing starter solenoid wire on my truck.

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: default "overview" ?
« Reply #7 on: November 03, 2018, 02:43:29 PM »
Usually I use this function:

function extra_text( index_offset, var ) {
   local text = fe.game_info(Info.Extra, 0);
   if (text != "") return text.toupper();
   else return "MISSING EXTRA";
}

local extra = fe.add_text ( "[!extra_text]", 0, 0, flw, flh );



But I don't know why it doesn't work with Overview, when it miss, returns the previuos Overview

maybe keilmillerjr can tell me why :)
« Last Edit: November 03, 2018, 02:46:09 PM by Giacomo1982 »

jedione

  • Hero Member
  • *****
  • Posts: 564
  • punktoe
    • View Profile
Re: default "overview" ?
« Reply #8 on: November 03, 2018, 03:18:04 PM »
Usually I use this function:

function extra_text( index_offset, var ) {
   local text = fe.game_info(Info.Extra, 0);
   if (text != "") return text.toupper();
   else return "MISSING EXTRA";
}

local extra = fe.add_text ( "[!extra_text]", 0, 0, flw, flh );



But I don't know why it doesn't work with Overview, when it miss, returns the previuos Overview

maybe keilmillerjr can tell me why :)

thanks for your go...im thinking it is just not hard coded to do so?   but thanks

kind of like how you can set an mp3 in the sound option's for "enter"  but not have a .mp4 or .png for a fade into game....
« Last Edit: November 03, 2018, 05:26:01 PM by jedione »
help a friend....