Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

How to highlight a row in a menu screen

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
decsim
Posts: 4
Joined: March 4th, 2007, 2:41 pm
Location: UK

How to highlight a row in a menu screen

Post by decsim »

I am building and coding an mp3 player that pulls audio files over a network and plays them through a hifi, I am using LCD Smartie to display information on a HD44780 20x4 LCD. I have made a smartie plugin that reads text files, and my software spits out what it wants displayed into these text files. The problem is that I have a menu system that needs to show what row you are on. I could do it like this-

>Menu 1<
Menu 2
Menu3
Menu4

But it's a bit messy, what I wanted to do was highlight the row using something like the Block character but I can see no way of getting it to work when you have text that needs to be in the same place. I am sure the lcd has the option to highlight but can't figure it out. Any ideas?
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Please give more information about your project:
I can't understand the menu highlighting.. :(

How you can scroll in to menus? Do you own a special LCD type with buttons?
How do you send the command to your system? Are you using the button command of LCD Smartie?
What kind of text are you going to display? Is this a specific menu received by another software?


As far as I know there is no highlight command on HD44780 based LCD's, excepting the μC based display modules.
decsim
Posts: 4
Joined: March 4th, 2007, 2:41 pm
Location: UK

Post by decsim »

limbo wrote:How you can scroll in to menus? Do you own a special LCD type with buttons?
OK, the project is written in Java, the Java accepts inputs from buttons (attached to the serial port) and outputs what it needs displayed as 4 lines in a text file. I wrote a plugin for LCD Smartie that reads this text and displays it on the screen. Although looks like I didn't need to as you pointed out I can use $File(C:\file.txt,1).
limbo wrote:How do you send the command to your system? Are you using the button command of LCD Smartie?
Nope, see above :)
limbo wrote:What kind of text are you going to display?
It varies from 3 lines to infinite, I have a menu structure in place but when you get to selecting an MP3 by Artist, Album etc it is a list of available songs that could be a million long if you wanted. They also vary in length and could be long names so the auto scroll on LCDSmartie is very helpful!
limbo wrote:As far as I know there is no highlight command on HD44780 based LCD's, excepting the μC based display modules.
What I was thinking of was something like the block character but across a whole row, of course you still need to have text there as well. I think I may be out of luck on this though. If their is no way for this to work then I figure making 2 custom characters would be best, a normal menu arrow and a highlighted menu arrow.
decsim
Posts: 4
Joined: March 4th, 2007, 2:41 pm
Location: UK

Post by decsim »

Example screens-

Image

Image

Image

This is the mock up I use during testing, as you can see it highlights the row you are on-

Image
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

What do you think about coverting your code to write the file with the selected text already highlighted?

Is this possible?
Lets say that the file contains this:

Code: Select all

Play MP3
Play CD
Rip CD
you have to covert the contents of of the file to

Code: Select all

->Play MP3
Play CD
Rip CD
on play cd selection

Is this possible?



BTW: can you give this application for public use?
decsim
Posts: 4
Joined: March 4th, 2007, 2:41 pm
Location: UK

Post by decsim »

I had come round to that way of thinking, if I make 2 custom characters then I can do it like so-

Image

So solid arrow is current row you are on, hollow arrow is other rows. At least that way it won't jump about as you scroll up and down, only the arrow will change.


Application for public use, maybe, only problem is that at the moment you need to install and configure about 4 different programs to make it work and it's a bitch to do. I am working on reducing this down and making my program handle more but it takes time. I have to hand this in soon (university project) so for now it will stay as it is but after that when I have some spare time I hope to improve and streamline it a lot. When I'll get round to it is another matter :) But I can ask other people to help work on it then, that would be good.
Post Reply