Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: markoattract on August 15, 2018, 11:09:05 AM
-
Hello all Guys !
I'm an italian retrogaming-fan, so i'm sorry for my english :D
I'm just entering into the world of Attract mode and it's AWESOME !
I don't know squirrel language but i want to learn ... meanwhile i want to integrate into "Cosmo" theme , the module for the on-screen keyboard search ...
Please can you help me to modify the "layout.nut" file so i can use it ??
I'v already downloaded the "keyboard-search" module and put it into "Modules" folder ... Now what i have to write into layout.nut ???
tank you for your cooperation.
- Mark - ;)
-
At the beginning where the options are listed add
</ label="Search Key", help="Choose the key to initiate a search", options="custom1,custom2,custom3,custom4,custom5,custom6", order=10 /> user_search_key="custom1";
</ label="Search Results", help="Choose the search method", options="show_results,next_match", order=11 /> user_search_method="show_results";
Near the beginning (where the modules are loaded) add
fe.load_module("objects/keyboard-search");
Near the middle (after the pointers section) add
// search
local search_surface = fe.add_surface(fe.layout.width * 0.5, fe.layout.height)
KeyboardSearch(search_surface)
.keys_pos([ 0.05, 0.4, 0.9, 0.5 ])
.search_key( my_config["user_search_key"] )
.mode( my_config["user_search_method"] )
.init()
You also need to configure one of the "Custom buttons" in AM Configure-->Controls-->Custom X = ? and also in the layout options.
-
Thank you very much Progets !!
I will try this ! :D