Change TP Palette dynamically in code
Hi All,
Does anyone know of a command that exists to select a TP palette in code (G4 and G5 panels)? I know you can switch and select the active palette through TPD directly but I'd like to dynamically set the active palette in code. I've searched through AMX-PI and can't find a command for this so I'm assuming one doesn't exist. Thought I'd check though. Seems like something that would be useful to have...
Thanks!
Does anyone know of a command that exists to select a TP palette in code (G4 and G5 panels)? I know you can switch and select the active palette through TPD directly but I'd like to dynamically set the active palette in code. I've searched through AMX-PI and can't find a command for this so I'm assuming one doesn't exist. Thought I'd check though. Seems like something that would be useful to have...
Thanks!
0
Comments
http://www.amxforums.com/forum/technical-forum/amx-user-interfaces/4788-touchpanel-themes
We pack 24 radically different themes in every panel, user select-able or by preset user preferences. To ship an entire panel with hundreds of pages/pops (every button, background, page, and pop) from one theme to another takes only about 5 seconds on an old G4 and TPControl, 2 on an XG4. You don't have to do it by palette. We just riff through a lookup table with the addresses and send them by range when possible, and singly when not.
Here's the same page, same panel, seconds apart.
Well, I see the first one is from a different build batch, but you get the idea.
Not a huge deal but I just figured since I already have the palettes set up, why not make use of them, you know?
Here's a snippet for an example:
SWITCH(sUI[iUI_Indx].nResolution) { CASE UI_RESI_1280x768://17" 1280 X 768 SCREEN {//CB = btn border, CF = btn fill, CT = txt color, EC = txt effect color, JB = bitmap justification, P = bitmap filename //main buttons SEND_COMMAND dvUI_Arry[iUI_Indx].NUMBER:5:0,"'^BMF-299,0,%CB',BG_BTN_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CF',BG_FILL_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CT',BG_TXT_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%EC',BG_TXT_EFF_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd]"; //'%JB0 -156,-225', //'%P'"; //,BG_PIC_ARRY[sUI[iUI_Indx].nBkGrnd]"; //back ground changer SEND_COMMAND dvUI_Arry[iUI_Indx],"'^BMF-321,1,%CB',BG_BTN_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CF',BG_FILL_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CT',BG_TXT_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%EC',BG_TXT_EFF_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%JB0 -250,-692', '%P',BG_PIC_ARRY[sUI[iUI_Indx].nBkGrnd]"; //main page SEND_COMMAND dvUI_Arry[iUI_Indx],"'^BMF-320,1,%CB',BG_BTN_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CF',BG_FILL_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CT',BG_TXT_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%EC',BG_TXT_EFF_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%JB0 0,0', '%P',BG_PIC_ARRY[sUI[iUI_Indx].nBkGrnd]"; (*//caller ID log SEND_COMMAND dvUI_Arry[iUI_Indx],"'^BMF-319,1,%CB',BG_BTN_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CF',BG_FILL_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CT',BG_TXT_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%EC',BG_TXT_EFF_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%JB0 -250,-8', '%P',BG_PIC_ARRY[sUI[iUI_Indx].nBkGrnd]"; *)//utilities SEND_COMMAND dvUI_Arry[iUI_Indx],"'^BMF-318,0,%CB',BG_BTN_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CF',BG_FILL_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CT',BG_TXT_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%EC',BG_TXT_EFF_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%JB0 -1041,-6', '%P',BG_PIC_ARRY[sUI[iUI_Indx].nBkGrnd]"; //EPC Select change offsets for res SEND_COMMAND dvUI_Arry[iUI_Indx],"'^BMF-319,0,%CB',BG_BTN_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CF',BG_FILL_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%CT',BG_TXT_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%EC',BG_TXT_EFF_COLOR_ARRY[sUI[iUI_Indx].nBkGrnd], '%JB0 -156,-206', '%P',BG_PIC_ARRY[sUI[iUI_Indx].nBkGrnd]"; continued ......