Home AMX User Forum AMX Control Products
Options

Touchpanel Themes

I was wondering, if custom designed themes are used for TP's, are provisions written into the code to allow the user to switch between themes?

Comments

  • Options
    a_riot42a_riot42 Posts: 1,624
    I was wondering, if custom designed themes are used for TP's, are provisions written into the code to allow the user to switch between themes?

    What do you mean by 'provisions written into the code'? If you write the code, then yes.
    Paul
  • Options
    Sorry. Maybe I should have been more specific. I have come across several websites from companies that specialize in custom touch panel designs. I thought several of them were really cool. That was what prompted my question. I was wondering if a TP, for example had a Sci-Fi theme, a Retro theme, and an Art Deco theme, all loaded on it at once, what would be the easiest way to allow the user to change the theme? My initial thought was to have a Settings type page that would provide those options. The page flips for the various themes would be put into the buttons via TPD4. Like if the user was using the Retro theme, once they selected DVD, the Retro themed DVD navigations pop up would appear.

    The easiest way I could see to accomplish this, from a programming and design perspective, would be to use TPD4 to program all of the page flips, show pop-ups, and hide pop-ups. Another way that I was thinking it could be handled purely through the code, would be to turn on page tracking and create a buffer for the TP. Name all of the pages or pop-ups something like Retro-DVD, SciFi-DVD, Art_Deco-DVD and then do string manipulation from the buffer to do the page flips.

    I am new to custom designed themed touch panels. Having multiple themes on a single TP might not even be something that is routinely done. What I am trying to ask, first, are multiple themed TP's a common thing, and second, if multi themed TP's are common, what is the best way to control the page flips and pop-ups?
  • Options
    a_riot42a_riot42 Posts: 1,624
    I think you might be making it more complicated than it is. If you have three UIs on a TP that have different themes, then provide a button somewhere to get to each one, and your are done. You can do page flips in code or in the TP or both as it doesn't really have anything to do with the themes. I generally do all or most page flips from code but that is just my preference. I have found that using page tracking has mixed results so I don't use it, nor do I try and parse the page flip strings sent with tracking on.
    Paul
  • Options
    DHawthorneDHawthorne Posts: 4,584
    TPDesign doesn't have the kind of architecture (at least not exposed) that would allow you to switch themes like you switch palettes. Integrating the designs as Paul suggested is the only way I can think to accomplish it, and in most cases I would certainly not go through the trouble ... I lay out the choices in the design phase, and if the customer wants to change it later, it's billable ...
  • Options
    That would be neat if TPD offered something like style sheets. Using CSS with webpages makes work much easier. Having some sort of .css file with a TP design would be pretty cool.

    IRT themed TP's, that is new ground for me. In the past, I had always used flat style buttons, but had always loaded several different backgrounds on the TP's that the user could change via a settings button. All they could do really was change the color of the screen or the bitmap, everything else stayed the same. I was wondering if there was an easy way to do that with themed TP's as well. From the responses here and from deeper thought about it, it appears the correct answer would be: it's do-able, however it will take a lot of work to make everything work seamlessly, and in the end is it really worth it?

    Kind of slightly changing the subject, themed TP's can get quite pricey. Some of the ones I was looking at ranged from $300 to $599. That being the case, buying or paying some one to design several themes for one TP could rapidly get expensive. Cost factor alone would probably change someone's mind about having multiple themes on one TP.
  • Options
    JeffJeff Posts: 374
    Its actually fairly simple to do themes and allow the customer to change it. There are two ways, one of which is way more involved than the other.

    The first, and what I think you've already described, is just based on page flip names. As long as the entire functionality is the same, and the only different thing you have is graphics, then you just name the pages different things.

    So you have the following pages

    Retro Main Page
    Retro Title Page
    SciFi Main Page
    SciFi Title Page
    Enviro Main Page
    Enviro Title Page

    And the following popup pages

    Retro DVD Controls
    Retro TV Controls
    SciFi DVD Controls
    SciFi TV Controls
    Enviro DVD Controls
    Enviro TV Controls.

    Then in your code, you just have a couple of variables and base your page flips on them.
    define_device
    
    dvTP	=	10001:1:0
    
    
    define_variable
    
    non_volatile	integer		nActiveTheme
    non_volatile	char		cThemePrefix[3][10]
    
    define_constant
    
    integer		btnStart			=	1
    integer		btnShutDown			=	2
    integer		btnDVD				=	3
    integer		btnTV				=	4
    integer		btnChangeTheme[]	=	{5,6,7}
    
    define_start
    
    cThemePrefix[1]='Retro'
    cThemePrefix[2]='SciFi'
    cThemePrefix[3]='Enviro'
    
    define_event
    
    button_event[dvTP,btnStart]
    {
    	push:
    	{
    		send_command button.input.device,"'PAGE-',cThemePrefix[nActiveTheme],' Main Page'"
    	}
    }
    
    button_event[dvTP,btnShutDown]
    {
    	push:
    	{
    		send_command button.input.device,"'PAGE-',cThemePrefix[nActiveTheme],' Title Page'"
    	}
    }
    
    button_event[dvTP,btnDVD]
    button_event[dvTP,btnTV]
    {
    	push:
    	{
    		switch(button.input.channel)
    		{
    			case btnDVD:send_command button.input.device,"'@PPN-',cThemePrefix[nActiveTheme],' DVD Controls'"
    			case btnTV:send_command button.input.device,"'@PPN-',cThemePrefix[nActiveTheme],' TV Controls'"
    	}
    }
    
    button_event[dvTP,btnChangeTheme]
    {
    	push:
    	{
    		nActiveTheme=get_last(btnChangeTheme)
    		send_command button.input.device,"'PAGE-',cThemePrefix[nActiveTheme],' Main Page'"
    	}
    }
    

    If you wanted to get fancy, you could also make nActiveTheme an array, and allow different touchpanels to have different themes, so the kids can have a super space theme of some sort in the entertainment room but dad can have classy wood tones in his study.

    I dumbed down the code a lot to make the example, obviously you'd use a source array and your theme change probably wouldn't occur on the Main page, but you get the point.

    Alternately, if you're just looking to change things up a bit, just do all of your popup pages with transparent background and pick some buttons that look good universally, and then use the ^BMF command to change the background. I like doing my popup pages with partially transparent backgrounds so you don't really focus on the background, but its there. I haven't allowed users to change backgrounds before like this, but I do have a G4 panel I designed that does all the flips in Panel Preview that allows users to change the background, so that my sales guys can show clients different backgrounds on the same panel.

    You can make it as easy or as difficult as you want. Just remember that if you do have 3 different themes on the panel, every time you change text or a button number, you have to do it on 3 different pages.

    J
  • Options
    jjamesjjames Posts: 2,908
    I'm kinda doing that right now, except with the backgrounds. I just simply put a dynamic text address to the page & popup and just send which image needs to be in the background. Not sure if that helps . . . :D You could potentially have the same address assigned to all the buttons too if you have different bitmaps for the buttons.
Sign In or Register to comment.