Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: jedione on December 07, 2019, 07:50:16 AM
-
this is in the layout.txt
could someone show me how you would scrip this!
i just want it to display a different filter than the one im on, in text on the screen...
---------------------------------------------------------------------
<a name="game_info" />
#### `fe.game_info()` ####
fe.game_info( id )
fe.game_info( id, index_offset )
fe.game_info( id, index_offset, filter_offset )
Get information about the selected game.
Parameters:
* id - id of the information attribute to get. Can be one of the
following values:
- `Info.Name`
- `Info.Title`
- `Info.Emulator`
- `Info.CloneOf`
- `Info.Year`
- `Info.Manufacturer`
- `Info.Category`
- `Info.Players`
- `Info.Rotation`
- `Info.Control`
- `Info.Status`
- `Info.DisplayCount`
- `Info.DisplayType`
- `Info.AltRomname`
- `Info.AltTitle`
- `Info.Extra`
- `Info.Favourite`
- `Info.Tags`
- `Info.PlayedCount`
- `Info.PlayedTime`
- `Info.FileIsAvailable`
- `Info.System`
- `Info.Overview`
* index_offset - the offset (from the current selection) of the game to
retrieve info on. i.e. -1=previous game, 0=current game, 1=next game...
and so on. Default value is 0.
* filter_offset - the offset (from the current filter) of the filter
containing the selection to retrieve info on. i.e. -1=previous filter,
0=current filter. Default value is 0.
Return Value:
* A string containing the requested information.
-
''filter_offset''
http://forum.attractmode.org/index.php?topic=1517.0
// Category
local categoryW = floor( bth * 2.5 )
local categoryH = floor( bth * 0.25 )
local categoryX = floor(( flw - crw ) * 0.5 - categoryW * 0.5 + flx)
local categoryY = floor( bth * 0.5 ) - floor( categoryH * 0.5 )
local category = fe.add_text("[FilterName]", categoryX, categoryY, categoryW, categoryH )
category.align = Align.Centre
category.filter_offset = 0
category.style = Style.Regular
category.charsize = floor(category.height * 1000/701)
category.font = "BebasNeueBold.otf"
local categoryLeft = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryLeft.align = Align.Centre
categoryLeft.filter_offset = -1
categoryLeft.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryLeft.style = Style.Regular
categoryLeft.charsize = floor(category.height * 1000/700)
categoryLeft.font = "BebasNeueBook.otf"
local categoryRight = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryRight.align = Align.Centre
categoryRight.filter_offset = 1
categoryRight.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryRight.style = Style.Regular
categoryRight.charsize = floor(category.height * 1000/701)
categoryRight.font = "BebasNeueBook.otf"
local categoryLeft2 = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryLeft2.align = Align.Centre
categoryLeft2.filter_offset = -2
categoryLeft2.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryLeft2.style = Style.Regular
categoryLeft2.charsize = floor(category.height * 1000/701)
categoryLeft2.alpha = 0
categoryLeft2.font = "BebasNeueBook.otf"
local categoryRight2 = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryRight2.align = Align.Centre
categoryRight2.filter_offset = 2
categoryRight2.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryRight2.style = Style.Regular
categoryRight2.charsize = floor(category.height * 1000/701)
categoryRight2.alpha = 0
categoryRight2.font = "BebasNeueBook.otf"
-
dude you always come through..
thanks for the help..ill try it when i get off work :)