Changing graphics based upon variables

In this forum you can share tips and tricks on how to use Cinemar products with some program or a task that you want it to do. So no one has to reinvent the wheel if you already did! (No questions in this forum only solutions, questions will be deleted without hesitation.)

Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

Changing graphics based upon variables

Postby Wysocki » Thu May 20, 2004 1:43 pm

The new 2-way features of ML are great for changing text on a screen dynamically but I wanted to have a graphical representation of the power state of my audio and video components. I used the controlicons font and set the variable to the letter corresponding to the icon I wanted. Below is a list of the icons available (lowercase a-z then uppercase A-Z) in controlicons and directions fonts and a screen shot of the icons in action. I set the text color green/red for the on/off characters. Here are the letters I used in the controlicons font:
Audio on: z
Audio off: t
Video on: I
Video off: M
THE CHARACTER SETS:
Image
SCREENSHOT WITH BOTH OFF:
Image
SCREENSHOT WITH BOTH ON:
Image

User avatar
mediastorm
Developer
Developer
Posts: 915
Joined: Fri Feb 07, 2003 1:27 am
Contact:

Re: Changing graphics based upon variables

Postby mediastorm » Thu May 20, 2004 2:25 pm

Wysocki wrote:The new 2-way features of ML are great for changing text on a screen dynamically but I wanted to have a graphical representation of the power state of my audio and video components. I used the controlicons font and set the variable to the letter corresponding to the icon I wanted. Below is a list of the icons available (lowercase a-z then uppercase A-Z) in controlicons and directions fonts and a screen shot of the icons in action. I set the text color green/red for the on/off characters. Here are the letters I used in the controlicons font:
Audio on: z
Audio off: t
Video on: I
Video off: M


Great idea for an innovative short-term workaround.

Where should folks look to find the two fonts you suggested?

Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

Postby Wysocki » Thu May 20, 2004 3:18 pm

That's a VERY good question! I had assumed they're part of ML because that's the only place I see them in my computers. They're not installed in Windows and I see them in both Win98 and Win2k computers that have ML installed. I didn't know (and I'm still not sure) you can use other fonts from your Windows collection. Cinemar has released a fair amount of fonts, but I don't know why since they're all pretty much the same. I'd really like some artsy fonts in ML.

Guest

Postby Guest » Fri May 21, 2004 1:11 pm

Flash does not have access to "system" fonts. They must be embedded in the mainlobby.exe for them to be available to MainLobby; however, I believe they can also be made available via a Library - I'll figure out how and post a tutorial.

Are there are few fonts off the top of your head that you'd like to see included? Perhaps we can get a list of 5-10 together for the next update to ML.

Dan

rscottmcmahon
New Member
New Member
Posts: 49
Joined: Mon May 17, 2004 2:10 pm
Location: Plano, TX
Contact:

Postby rscottmcmahon » Fri May 21, 2004 2:44 pm

I am not sure what this font is called, but I would like to get this "digital clock" look for the time on my screens.

- Scott

Guest

Postby Guest » Fri May 21, 2004 3:01 pm

Try font "LiquidCrystal".

Dan

rscottmcmahon
New Member
New Member
Posts: 49
Joined: Mon May 17, 2004 2:10 pm
Location: Plano, TX
Contact:

Postby rscottmcmahon » Fri May 21, 2004 3:19 pm

Dan,
Are you just telling me what the font name is or are you suggesting that I use the LiquidCrystal font. Because I do not see a LiquidCrystal font in the font menu is MainLobby.

- Scott

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Fri May 21, 2004 3:33 pm

rscottmcmahon,

I'm pretty sure this font (liquidcrystal) was recently added. Unfortunately only Dan and myself have it right now. It will be included in the next update of MainLobby though.
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

Postby Wysocki » Fri May 21, 2004 3:37 pm

If fonts are included in ML, why did Mediastorm want to know where I got the controlicons and directions fonts?

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Fri May 21, 2004 3:39 pm

I imagine just an oversight.
Mario Cascio

Cinemar, Inc.

http://www.cinemaronline.com

User avatar
mediastorm
Developer
Developer
Posts: 915
Joined: Fri Feb 07, 2003 1:27 am
Contact:

Postby mediastorm » Fri May 21, 2004 3:39 pm

Wysocki wrote:If fonts are included in ML, why did Mediastorm want to know where I got the controlicons and directions fonts?


I was interested in finding the original source of the fonts.

Guest

Postby Guest » Fri May 21, 2004 3:43 pm

:oops:

See that's what I get for running a pre-release.

Scott,

On the bright side...you're request will be SERIOUSLY looked at for inclusion in the next release of MainLobby. :)

Dan

User avatar
BraveSirRobbin
Senior Member
Senior Member
Posts: 244
Joined: Tue May 04, 2004 1:47 am
Location: Las Vegas, NV
Contact:

Postby BraveSirRobbin » Sun May 23, 2004 12:24 am

I got totally lost on this one (sorry, new user)! How do you control what text gets displayed based on a device's value? Could you post a screen shot of the button configuration screen for one of your on/off devices?

I would love to use this work around now for some of my Homeseer devices.

Thanks,

BSR
-----------------------------
**** Do You Cocoon? ****

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Postby Krumpy » Sun May 23, 2004 9:04 am

BSR,

IM me and I will help.

Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

Postby Wysocki » Mon May 24, 2004 10:26 am

HOW TO SET GRAPHIC ICONS BASED UPON VARIABLES:
(Refer to photos in first post in this thread)

Setup your AUDIO POWER button with the following MLServeCmd. If the current power state (audpower) is "on", this switches that variable (audpower) "off", sets the charcter for the off state (audpower_off), and clears the character for the power on state (audpower_on). It does the reverse if current power state is "off".:

MLServeCmd.MLConditional|IsEqual##{{audpower}}##on
##Macro|
SetVariable|audpower~off!
SetVariable|audpower_off~t!
SetVariable|audpower_on~!
MLSlinke|denon:poweroff dish:power cd:power_off!
MLHomeseer|ev:BassShakersOFF
##Macro|
SetVariable|audpower~on!
SetVariable|audpower_off~!
SetVariable|audpower_on~z!
MLSlinke|denon:poweron dish:power cd:power_on!
MLHomeseer|ev:BassShakersON

Then Create two SingleLineText fields in whatever size you wish as follows and position them on top of each other. The charcter they will display is based upon the above macro:

Font: controlicons
Label: {{audpower_off}}
Color: Red
Click: Off

Font: controlicons
Label: {{audpower_on}}
Color: Green
Click: Off


Return to “Tips, Tricks and Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest