Author Topic: KeyboardSearch module  (Read 9438 times)

iOtero

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: KeyboardSearch module
« Reply #45 on: June 23, 2019, 10:24:09 AM »
Run:
Code: [Select]
attract --loglevel debug

launch the keyboardsearch module and put here the last_run.log file.

I'm putting 2 files. One log and the other layout. I put the module script in the last line of the layout file.

The [ ] in the colors must be removed.
And I would leave the function like this:

Code: [Select]
fe.load_module("objects/keyboard-search");
local search_surface = fe.add_surface(fe.layout.width, fe.layout.height)
KeyboardSearch(search_surface)
    .search_key(my_config["user_search_key"])
    .mode(my_config["user_search_method"])
    .text_color(255,0,255,255)
    .keys_color(255,255,255,255)
    .keys_selected_color(255,50,255,255)
    .init()
search_surface.set_pos(0, 0, fe.layout.width, fe.layout.height);

I love that on my laptop the eyes shine to the Alien every time i access the ssd... :D

Wenzon

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: KeyboardSearch module
« Reply #46 on: June 23, 2019, 02:17:34 PM »
Run:
Code: [Select]
attract --loglevel debug

launch the keyboardsearch module and put here the last_run.log file.

I'm putting 2 files. One log and the other layout. I put the module script in the last line of the layout file.

The [ ] in the colors must be removed.
And I would leave the function like this:

Code: [Select]
fe.load_module("objects/keyboard-search");
local search_surface = fe.add_surface(fe.layout.width, fe.layout.height)
KeyboardSearch(search_surface)
    .search_key(my_config["user_search_key"])
    .mode(my_config["user_search_method"])
    .text_color(255,0,255,255)
    .keys_color(255,255,255,255)
    .keys_selected_color(255,50,255,255)
    .init()
search_surface.set_pos(0, 0, fe.layout.width, fe.layout.height);

Thaaaaaaaannnnnnnkkkkkkkkouuuuuuuuu!!!! Wonderful, spectacular, amazing !!! I have no words to thank. I would hardly solve this problem.
I do not think I'm going to stop thanking you. Thank you very much for your time and help.  :)
« Last Edit: June 23, 2019, 02:19:35 PM by Wenzon »

iOtero

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: KeyboardSearch module
« Reply #47 on: June 24, 2019, 04:54:03 AM »
Thanks. I'm glad i was useful.  :-[
I love that on my laptop the eyes shine to the Alien every time i access the ssd... :D

Wenzon

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: KeyboardSearch module
« Reply #48 on: June 25, 2019, 10:13:33 AM »
A doubt.
Can you decrease the font size when you are selecting a letter or number?

iOtero

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: KeyboardSearch module
« Reply #49 on: June 26, 2019, 03:09:18 AM »
A doubt.
Can you decrease the font size when you are selecting a letter or number?

From what i have seen analyzing the module, you can not.
I love that on my laptop the eyes shine to the Alien every time i access the ssd... :D

arthurvalenca

  • Full Member
  • ***
  • Posts: 60
    • View Profile
Re: KeyboardSearch module
« Reply #50 on: July 24, 2019, 01:18:45 PM »
Hello all!
I really like the plugin, but I still have a doubt, as it makes for the search letters to be uppercase, I've tried several ways but could not leave "ABCDE". help please

iOtero

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: KeyboardSearch module
« Reply #51 on: July 25, 2019, 08:30:31 AM »
Hello all!
I really like the plugin, but I still have a doubt, as it makes for the search letters to be uppercase, I've tried several ways but could not leave "ABCDE". help please

You haven't read all the thread, my friend...  8)

My Request:
http://forum.attractmode.org/index.php?topic=1946.msg16685#msg16685

My Solution:
http://forum.attractmode.org/index.php?topic=1946.msg17447#msg17447
I love that on my laptop the eyes shine to the Alien every time i access the ssd... :D

arthurvalenca

  • Full Member
  • ***
  • Posts: 60
    • View Profile
Re: KeyboardSearch module
« Reply #52 on: July 25, 2019, 05:51:12 PM »
Hello all!
I really like the plugin, but I still have a doubt, as it makes for the search letters to be uppercase, I've tried several ways but could not leave "ABCDE". help please

You haven't read all the thread, my friend...  8)

My Request:
http://forum.attractmode.org/index.php?topic=1946.msg16685#msg16685

My Solution:
http://forum.attractmode.org/index.php?topic=1946.msg17447#msg17447

Even after changing the code as you showed I still get lowercase letters, any ideas?


iOtero

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: KeyboardSearch module
« Reply #53 on: July 26, 2019, 06:14:02 AM »
Well, apparently I have not understood exactly what you want to do. As you do not explain yourself better...  8)

What are you talking about? Search results or keyboard appearance?  8)
I love that on my laptop the eyes shine to the Alien every time i access the ssd... :D

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: KeyboardSearch module
« Reply #54 on: July 26, 2019, 07:27:36 AM »
Well, apparently I have not understood exactly what you want to do. As you do not explain yourself better...  8)

What are you talking about? Search results or keyboard appearance?  8)

I think he's looking to make the typed result all uppercase while it's all lowercase at this point.
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

arthurvalenca

  • Full Member
  • ***
  • Posts: 60
    • View Profile
Re: KeyboardSearch module
« Reply #55 on: July 26, 2019, 09:37:01 AM »
Well, apparently I have not understood exactly what you want to do. As you do not explain yourself better...  8)

What are you talking about? Search results or keyboard appearance?  8)

I think he's looking to make the typed result all uppercase while it's all lowercase at this point.

that's right!!!!!!!! result all uppercase.

iOtero

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: KeyboardSearch module
« Reply #56 on: July 26, 2019, 12:45:11 PM »
In module.nut change this line

Code: [Select]
        search_text.msg = ( text == "" ) ? "" : "\"" + text + "\""

for this line

Code: [Select]
        search_text.msg = ( text == "" ) ? "" : "\"" + text.toupper() + "\""

And this line

Code: [Select]
            local rule = "Title contains " + _massage(text);

for this line

Code: [Select]
            local rule = "Title contains " + _massage(text) + "|" + text.toupper();

I don't know if you want it that way for aesthetics or because you have all the names of the games in capital letters. Depending on that, you may have to make some more changes to the module to make it work properly.

And I'm not the creator of the module, so I hope liquid8d doesn't get mad at me for modifying its code so much.
I love that on my laptop the eyes shine to the Alien every time i access the ssd... :D

arthurvalenca

  • Full Member
  • ***
  • Posts: 60
    • View Profile
Re: KeyboardSearch module
« Reply #57 on: July 26, 2019, 01:32:41 PM »
In module.nut change this line

Code: [Select]
        search_text.msg = ( text == "" ) ? "" : "\"" + text + "\""

for this line

Code: [Select]
        search_text.msg = ( text == "" ) ? "" : "\"" + text.toupper() + "\""

And this line

Code: [Select]
            local rule = "Title contains " + _massage(text);

for this line

Code: [Select]
            local rule = "Title contains " + _massage(text) + "|" + text.toupper();

I don't know if you want it that way for aesthetics or because you have all the names of the games in capital letters. Depending on that, you may have to make some more changes to the module to make it work properly.

And I'm not the creator of the module, so I hope liquid8d doesn't get mad at me for modifying its code so much.

Big Thanks iOtero!!!!!!!!!



My last question is how can I expand the background image of the virtual keyboard to full screen without having to change the size of the keyboard?

iOtero

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Re: KeyboardSearch module
« Reply #58 on: July 26, 2019, 02:36:02 PM »
I would advise you not to make any changes. The screen looks great according to the screenshot you've sent. On such a big screen, it's very good like that. Sometimes we want to have our frontend so good that we start doing very unnecessary things, and I know a lot about that, because I've been wrong many times.

At most, what I would do would be to center it on the screen, and if you want to see everything black behind, you just have to use a jpg or png of 1 pixel white and paint with it the whole screen in black or semitransparent with the alpha level you want:

Code: [Select]
local flw = fe.layout.width;
local flh = fe.layout.height;

local search = fe.add_image("objs/pixel_white.png", 0, 0, flw, flh);
search.set_rgb(0,0,0);
search.alpha = 255;

But I insist that I would do nothing, I like it as I see it.
I love that on my laptop the eyes shine to the Alien every time i access the ssd... :D