Results 1 to 8 of 8

Thread: Make a switch button

  1. #1
    Newbie
    Join Date
    Nov 2006
    Location
    Annapolis,MD
    Posts
    8

    Make a switch button

    I'm trying to customize the simplistique gps skins to free up more screen space for iguidance. What I am trying to do is remove the top bar of information and buttons in the red box then move them down to the yellow box. I want to accomplish this by making a switch button shown in red on the bottom right. This button would work similarily to the switch button in Chuck's skin but I could not find the code in his skin and I did not really understand the instructions in the one thread I found. In the skin commands.txt file I saw the "SWITCHBUTTON" command but im not sure if that is the command I need and what other code will allow me to switch button presets from gps controls to audio controls and vice versa.
    Attached Images Attached Images  

  2. #2
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,617
    switchbutton is normally used to switch a single button function between different options.

    ie

    b01,x,y,h,w,"dothisonfirtspress||SWITCHBUTTON;1>>d othisonsecondpress||SWITCHBUTTON;1>>dothisonthirdp ress||SWITCHBUTTON;1>>",""




    edit

    maybe have a look at these commands



    "SETBUTTON" - This allows you to replace the command on any button. The Button number follows the same fashion
    of switchlabel (actual button line number). The parameters are the button number and the new code.
    Example: "SETBUTTON;3;PLAY"
    (to set the button code of the third Bxx,xxx line of the skin to "PLAY")

    "SETBUTTONID" - This allows you to replace the command on any button, but using the button ID to specify the button.
    Example: "SETBUTTONID;B02;PLAY" (to set the button code defined by B02,xxx,... to "PLAY")

    Whatever you do it will be complicated.

  3. #3
    Low Bitrate jnorion's Avatar
    Join Date
    Aug 2004
    Location
    Portland, OR
    Posts
    90
    Probably the easiest way would be to have two screens and just switch between the two.
    ~ Joel

  4. #4
    Newbie
    Join Date
    Nov 2006
    Location
    Annapolis,MD
    Posts
    8
    I was debating that option, but I didnt want the whole screen to have to close and reopen. I just sorta wanted the buttons to change so that I wouldn't have to reload the screen. I wanted to have a smoother transition but after looking through Chuck's code I only have a little idea of how his works. I've done some programming before but its been awhile and its not clicking in right now.
    Epia MII1000, 512,slim dvdrw, 60gig, gps, 7" lilliput

  5. #5
    Low Bitrate jnorion's Avatar
    Join Date
    Aug 2004
    Location
    Portland, OR
    Posts
    90
    The transition should be pretty quick and smooth once you've done it the first time. When you load it the whole thing loads into memory so it's virtually instant after that.
    ~ Joel

  6. #6
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,617
    The way I have done the various FreeDrive menus in iDrive is different screens, and yes the first swicth is RR's usual slow but once done it does swicth quicker the second time.

    Maybe LS can enlighten us

  7. #7
    Maximum Bitrate kpjuk's Avatar
    Join Date
    Dec 2003
    Location
    West Midlands
    Posts
    474
    I have been playing around with this, and I think it is quicker. here is an example.

    /, ================================================== =================================
    /, This section defines the commands for the top Menu Bar
    /, For the Audio / Visual Menu's etc see sections below
    /, ================================================== =================================

    /, This line defines MenuSwap Command, and sets the variable to swap between 3 values.
    /, 2 line option, and remove the comments from the 3 line option. Then add coomands
    /, to the cM2B2 etc lines below
    /,
    /, "MNUSwap",“BYVAR;MenuSwap;MNU1<<MNU2<<MNU0||BYVAR; MenuSwap;SETVAR;MenuSwap;1<<SETVAR;MenuSwap;2<<SET VAR;MenuSwap;0” This line for third Menu

    /, This line defines MenuSwap Command, and sets the variable to swap between 2 values.
    "MNUSwap",“BYVAR;MenuSwap;MNU1<<MNU0||BYVAR;MenuSw ap;SETVAR;MenuSwap;1<<SETVAR;MenuSwap;0”

    /, This section calls the button image comands for each Menu Line
    "MNU0","ImageMenu1||MNUBTN1"
    "MNU1","ImageMenu2||MNUBTN2"

    /, This section loads the button images in the right places, and sizes
    "ImageMenu1","LOADIMG;1;0;800;60;Menu1.gif;Out||LO ADIMG;1;0;800;60;Menu1.gif;Off||LOADIMG;1;0;800;60 ;Menu1-d.gif;Down||LOADIMG;1;0;800;60;Menu1.gif;On"
    "ImageMenu2","LOADIMG;1;0;800;60;Menu2.gif;Out||LO ADIMG;1;0;800;60;Menu2.gif;Off||LOADIMG;1;0;800;60 ;Menu2-d.gif;Down||LOADIMG;1;0;800;60;Menu2.gif;On"

    /, This section sets the button and label commands
    "MNUBTN1","SWITCHLABEL;3||SWITCHLABEL;4||SWITCHLAB EL;5||SETBUTTON;2;cM1B2||SETBUTTON;2;cM1B2||SETBUT TON;3;cM1B3||SETBUTTON;4;cM1B4||SETBUTTON;5;cM1B5| |SETBUTTON;6;cM1B6||SETBUTTON;7;cM1B7||SETBUTTON;8 ;MNUSwap"
    "MNUBTN2","SWITCHLABEL;3||SWITCHLABEL;4||SWITCHLAB EL;5||SETBUTTON;2;cM2B2||SETBUTTON;3;cM2B3||SETBUT TON;4;cM2B4||SETBUTTON;5;cM2B5||SETBUTTON;6;cM2B6| |SETBUTTON;7;cM2B7||SETBUTTON;8;MNUSwap"

    /, This section defines the button commands, to keep the above section readable.
    "cM1B2","PREVTRACK"
    "cM1B3","PLAY"
    "cM1B4","NEXTTRACK"
    "cM1B5","VOL-"
    "cM1B6","MUTE"
    "cM1B7","VOL+"
    "cM1B8","MNUSwap"
    "cM2B2","AUDIOMENU"
    "cM2B3","VISUALMENU"
    "cM2B4","LOAD;www.Skin"
    "cM2B5","APPSMENU"
    "cM2B6","LOAD;Weather.Skin"
    "cM2B7","LOAD;External_GPS.skin;!QWidget;C:\Progra m Files\Navigator4_4\Navigator.exe;Navigator - ["
    "cM2B8","MNUSwap"

    /, ================================================== =================================
    /, This section defines the commands for the Audio Menu Bar
    /,
    /, ================================================== =================================

    /, This section Loads the button images and commands for the Audio Menu
    "AUDIOMENU","AudioImages||AUDIOBTN0"

    /, This section loads the button images in the right places, and sizes
    "AudioImages","LOADIMG;1;0;800;60;Audio.gif;Out||L OADIMG;1;0;800;60;Audio.gif;Off||LOADIMG;1;0;800;6 0;Audio-d.gif;Down||LOADIMG;1;0;800;60;Audio.gif;On"

    /, This section sets the button and label commands
    "AUDIOBTN0","SETBUTTON;2;cA1B2||SETBUTTON;3;cA1B3| |SETBUTTON;4;cA1B4||SETBUTTON;5;cA1B5||SETBUTTON;6 ;cA1B6||SETBUTTON;7;cA1B7||SETBUTTON;8;cA1B8"

    /, This section defines the button commands, to keep the above section readable.
    "cA1B2","SETVAR;MenuSwap;0||LOAD;Audio_Player.skin "
    "cA1B3","SETVAR;MenuSwap;0||LOAD;Audio_Browser.ski n"
    "cA1B4","SETVAR;MenuSwap;0||LOAD;Radio.Skin"
    "cA1B5","SETVAR;MenuSwap;0||LOAD;XM.skin"
    "cA1B6","SETVAR;MenuSwap;0||LOAD;Sirius.skin"
    "cA1B7","SETVAR;MenuSwap;0||LOAD;Mixer.skin"
    "cA1B8","SETVAR;MenuSwap;0||LOAD;Menu.skin||MNUSwa p"

    /, ================================================== =================================
    /, This section defines the commands for the Video Menu Bar
    /,
    /, ================================================== =================================

    /, This section Loads the button images and commands for the Video Menu
    "VISUALMENU","VisualImages||VISUALBTN0"

    /, This section loads the button images in the right places, and sizes
    "VisualImages","LOADIMG;1;0;800;60;Visual.gif;Out| |LOADIMG;1;0;800;60;Visual.gif;Off||LOADIMG;1;0;80 0;60;Visual-d.gif;Down||LOADIMG;1;0;800;60;Visual.gif;On"

    /, This section sets the button and label commands
    "VISUALBTN0","SETBUTTON;2;cV1B2||SETBUTTON;3;cV1B3 ||SETBUTTON;4;cV1B4||SETBUTTON;5;cV1B5||SETBUTTON; 6;cV1B6||SETBUTTON;7;cV1B7||SETBUTTON;8;cV1B8"

    /, This section defines the button commands, to keep the above section readable.
    "cV1B2","SETVAR;MenuSwap;0||LOAD;TV.skin"
    "cV1B3","SETVAR;MenuSwap;0||LOADVD.skin"
    "cV1B4","SETVAR;MenuSwap;0||LOAD;Video.Skin"
    "cV1B5","SETVAR;MenuSwap;0||LOAD;PICS.skin"
    "cV1B6","SETVAR;MenuSwap;0||LOAD;www.skin"
    "cV1B7","VISU"
    "cV1B8","SETVAR;MenuSwap;0||LOAD;Menu.skin||MNUSwa p"

    You really need to print this out and work through it, but it works ok. You will still need to load files, and as jnorion says, the pain is only the first time (where have I heard that before lol).

    Cheers
    KPJUK
    M1000, 512MB, 512MB CF, 6GB Disk (4200rpm),
    DVD/RW, Dynamix 8" screen, M2-ATX, Custom case,Too many hours building and rebuilding and rebuild.......

  8. #8
    Newbie
    Join Date
    Nov 2006
    Location
    Annapolis,MD
    Posts
    8
    Awesome, thanks for the post. Now I have to see if I can make this work in my skin.
    Epia MII1000, 512,slim dvdrw, 60gig, gps, 7" lilliput

Similar Threads

  1. Relocating computer power button
    By King_Xerxes in forum General Hardware Discussion
    Replies: 8
    Last Post: 02-21-2007, 09:15 PM
  2. Replies: 7
    Last Post: 01-24-2007, 09:31 AM
  3. Replies: 47
    Last Post: 05-03-2005, 12:28 PM
  4. Replies: 2
    Last Post: 04-04-2005, 03:45 PM
  5. how can I make my own lilliput power button
    By bmwperson in forum LCD/Display
    Replies: 1
    Last Post: 09-09-2004, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •