ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#17803 - 03/19/07 09:21 PM BITMAP with Date & Time
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
Hi Guy's,

I have a screen on my Leo 2 that shows the Time in big lettering (in the middle of the screen) and I also have the date in smaller lettering underneath it. I think I must have stolen it from the manual or something like that. I would like to know the following;

- Can I have a bitmap picture underneath the time and date so it looks like a picture, but has the added functionality of telling me the time and date.

- I would also like to know what the code would look like if I wanted it to revert to this screen if nothing was touched on the Leo 2 for say 1 minute regardless what screen I was on. Then when it was touched (anywhere) on that screen, it would jump straight to my main menu screen where I can select my TV, DVD, Home Theatre etc.

Cheer's
Sash

Top
#17804 - 03/20/07 07:17 AM Re: BITMAP with Date & Time [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
I have a hard time picturing exactly what you want to screen to look like but if you're talking about superimposing one thing over another, it can work but you might not like the flickering caused by the screen updating function. If you're talking about using icons for also displaying the date or time, then it could be done if you can get each digit to cover exactly the space occupied by a button (Jim Beersman's TSE 2.0 editor would be handy for this). You could then create ten icons (one for each digit) and have the icons switched by code in order to display the time, or date.

For the second question, you can easily make the Leopard go to a default screen if no buttons have been pressed for a certain time. You can do this:

IF Leopard Touch Button 0 (press anywhere) is pressed //if any button is pressed
THEN Timer #1 = 1 //start or restart timer

IF Timer #1 becomes > 60 //one minute after the last button press
THEN Variable #63 = x //go to default screen x
THEN Timer #1 = 1 //and stop timer
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17805 - 03/20/07 04:36 PM Re: BITMAP with Date & Time [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
"but if you're talking about superimposing one thing over another, it can work but you might not like the flickering caused by the screen updating function."

Thats what I was talking about. Having a picture (BITMAP) and then having the digits superimposed on top of it.

How do you do this?

Cheer's
Sash

Top
#17806 - 03/20/07 08:52 PM Re: BITMAP with Date & Time [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
The screen update routine redraws everything on the screen by increasing object number order. So if you want to play with this, create the button that will hold the bitmap first, and then immediately create the text object that you want to superimpose over it. Note that the object numbers will be consecutive (such as 14 then 15). Then try it and see if the flicker is tolerable to you.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17807 - 03/21/07 09:45 PM Re: BITMAP with Date & Time [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
I'm lost here, can you explain in some more detail exactly how you do this. Remember, I'm only a journeyman.....lol

Cheer's
Sash

Top
#17808 - 03/22/07 06:29 AM Re: BITMAP with Date & Time [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Well given that bitmaps are in fact icons on top of buttons, begin by creating the button on which you want to put the bitmap, and assign the icon to it. Then create the screen text object that will hold the digits you want to display and drag it over the button you just created earlier. Once it is loaded and running, the Leopard will first draw the icon on the button and then draw the text object with the digits. The screen is refreshed continuously and you will notice some flicker because one object will be written on top of another.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17809 - 03/22/07 03:27 PM Re: BITMAP with Date & Time [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
I wonder if we are talking about the same thing here;

I thought you have to load a Bitmap on icon#0 for it to be your startup picture and it has to 320x240 or something. Correct me if I'm wrong.

I want to have my date and time over that picture so when I have not pressed anything for a while, it defaults to that picture with the date and time over it. Much like a screensaver.

Cheer's
Sash

Top
#17810 - 03/22/07 08:08 PM Re: BITMAP with Date & Time [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Ok, I see what you're thinking... The screen 0 bitmap (icon #0) is a display-only image. You cannot add any buttons or screen text objects to it, so you cannot do something like display the time on it. For what you want to do, use a regular screen number (1 to 25) and you can create a large button in the center of the screen, over which you can superimpose a large (full screen size) icon if you like. You could then try superimposing the screen text object on top of it to display the time. A better way would be to use several buttons to display you image as a mosaic of icons (but made to look like a single, large image) that doesn't overlap the screen text object that displays the time. This would avoid the flicker that I was talking about. Finally note that even if you make the icon bigger then the button, you actually need to press the button area itself in order to trigger an action.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie, Bobkat 
Hop to:
Who's Online
0 registered and 65 anonymous users online.
Recent Posts
Ocelot Battery
by ADI Tech Support
Today at 07:38 AM
Comms Retry Error
by HDTVPete
09/18/17 04:04 PM
Cmax Message: Failed to set data for a 'delay'
by HDTVPete
09/16/17 04:36 PM
Shout Box

Newest Members
brigiel, vevevie, zhutree, 416, saiqul
3003 Registered Users
Forum Stats
3003 Members
19 Forums
4002 Topics
23435 Posts

Max Online: 132 @ 11/13/16 10:07 AM
September
Su M Tu W Th F Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30