Skip to content

Commit

Permalink
Issue #75 and #87 - added filter_offset attribute and filter-grid layout
Browse files Browse the repository at this point in the history
- All filters are now loaded when a display list is first shown
- a filter_offset attribute for script object can now be used in much the
  same way as index_offset, to pull artworks and information from filters
  other than the current filter
- The filter-grid layout has been added, which allows for multiple filters
  to be shown at once (for example, if you set up filters for each letter
  of the alphabet then each column of the grid will contain a letter)
- Includes some fiddling with the scrolling speed when a key is held down
  • Loading branch information
mickelson committed Jan 11, 2015
1 parent e31555a commit d141cd0
Show file tree
Hide file tree
Showing 22 changed files with 1,262 additions and 590 deletions.
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
attract
/attract
*.o
*.a
obj
core
*.dll
*.exe
/*.cfg
/*.am
*.layout
*.depend
/emulators
/layouts
/plugins
/language
/romlists
/sounds
/stats
/modules
/history.idx
39 changes: 39 additions & 0 deletions Layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ Contents
* [`fe.list`](#list)
* [`fe.overlay`](#overlay)
* [`fe.obj`](#obj)
* [`fe.filters`](#filters)
* [`fe.script_dir`](#script_dir)
* [`fe.script_file`](#script_file)
* [Classes](#classes)
* [`fe.LayoutGlobals`](#LayoutGlobals)
* [`fe.CurrentList`](#CurrentList)
* [`fe.Overlay`](#Overlay)
* [`fe.Filter`](#Filter)
* [`fe.Image`](#Image)
* [`fe.Text`](#Text)
* [`fe.ListBox`](#ListBox)
Expand Down Expand Up @@ -500,6 +502,7 @@ Return Value:

fe.game_info( id )
fe.game_info( id, index_offset )
fe.game_info( id, index_offset, filter_offset )

Get information about the selected game.

Expand All @@ -526,6 +529,9 @@ Parameters:
* 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:

Expand Down Expand Up @@ -856,6 +862,13 @@ functionality may be accessed.
`fe.Text` and `fe.ListBox` instances.


<a name="filters" />
#### `fe.filters` ####

`fe.filters` contains information on the available filters. It is an array
of `fe.Filter` instances.


<a name="script_dir" />
#### `fe.script_dir` ####

Expand Down Expand Up @@ -946,6 +959,7 @@ Attributes:
reversed.
* `list_limit` - Get the value of the list limit applied to the current
list.
* `filter_index` - Get/set the current filter index.

<a name="Overlay" />
#### `fe.Overlay` ####
Expand Down Expand Up @@ -978,6 +992,20 @@ Member Functions:
This could be useful to provide feedback during time-intensive operations.


<a name="Filter" />
#### `fe.Filter` ####

This class is a container for information about the avaiable filters. Instances
of this class are contained in the `fe.filters` array. This class cannot
otherwise be instantiated in a script.

Attributes:

* `name` - Get the filter name.
* `index` - Get the index of the currently selected game in this filter.
* `size` - Get the size of the game list in this filter.


<a name="Image" />
#### `fe.Image` ####

Expand Down Expand Up @@ -1011,6 +1039,10 @@ Attributes:
for the artwork to display. For example, set to -1 for the image
corresponding to the previous list entry, or 1 for the next list entry,
etc. Default value is 0.
* `filter_offset` - [artwork only] Get/set filter offset from current
filter for the artwork to display. For example, set to -1 for an image
indexed in the previous filter, or 1 for the next filter, etc. Default
value is 0.
* `skew_x` - Get/set the amount of x-direction image skew (in layout
coordinates). Default value is 0. Use a negative value to skew the
image to the left instead.
Expand Down Expand Up @@ -1154,6 +1186,10 @@ Attributes:
* `index_offset` - Get/set offset from current game selection for text
info to display. For example, set to -1 to show text info for the
previous list entry, or 1 for the next list entry. Default value is 0.
* `filter_offset` - Get/set filter offset from current filter for the
text info to display. For example, set to -1 to show text info for
a selection in the previous filter, or 1 for the next filter, etc.
Default value is 0.
* `bg_red` - Get/set red colour level for text background. Range is
[0 ... 255]. Default value is 0.
* `bg_green` - Get/set green colour level for text background. Range is
Expand Down Expand Up @@ -1220,6 +1256,9 @@ Attributes:
* `alpha` - Get/set alpha level for text. Range is [0 ... 255].
Default value is 255.
* `index_offset` - Not used.
* `filter_offset` - Get/set filter offset from current filter for the
text info to display. For example, set to -1 to show info for the
previous filter, or 1 for the next filter, etc. Default value is 0.
* `bg_red` - Get/set red colour level for background. Range is
[0 ... 255]. Default value is 0.
* `bg_green` - Get/set green colour level for background. Range is
Expand Down
Binary file added config/layouts/filter-grid/frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d141cd0

Please sign in to comment.