Announcement

Collapse
No announcement yet.

Display an image thats file name is contained in a variable

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display an image thats file name is contained in a variable

    Anyone know of a way to display an image with a variable?

    This was my thought's, but it didn't work:

    IMG,13,187,55,60,"$icon01$",

    I set the image in a variable in the exectbl.ini, and :ran the code" to test it.

    I tried this:
    "SetIcons","SetVar;Icon01;=dvd.jpg"

    and this:
    "SetIcons","SetVar;Icon01;dvd.jpg"

    both with no luck....

    On another note, if there is a way to make this work, will the image change when the variable is changed/updated? Or will a reloadskin or something be needed.... I hope to not have to use reload the skin!
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  • #2
    I can add support for that to work.. but if you change the variable, you'd have to reload the at least the screen.

    Unsure if this would cut if for you, but you CAN ALREADY do something like this:

    I01,13,187,55,60,"FILE;$icon01$"

    then use commands like:

    "SETVAR;incon01;$skinpath$dvd.jpg"

    This would change on the fly without even needing to reload anything.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

    Comment


    • #3
      Maybe add a "REFRESHSCR" command that would just reload/refresh the current screen?

      Just thinking out loud...
      RideRunner...The #1 FE, PERIOD.

      Current Project: DFXVoice [v1.0 Released]
      Next in line: RRMedia v2.0

      DFX 5.1.1 Skin
      Appstore Link

      My RideRunner Plugins
      RRMedia
      RRExtended
      DFXVoice

      "There are no bugs - only undocumented features."

      Comment


      • #4
        LOADIMG and LDIMG can load variables.
        Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

        Comment


        • #5
          Originally posted by Sal R. View Post
          LOADIMG and LDIMG can load variables.
          That's the purpose of it. I was just thinking in terms of accomplishing what he seemed to want (changing an image by just setting a variable)..
          Ride Runner RR's Myspace

          "Being happy is not about having what you want, it's about wanting what you have."
          "The best things in life are always free - but that doesn't mean money can't buy you good things."

          Comment


          • #6
            Originally posted by guino View Post
            That's the purpose of it. I was just thinking in terms of accomplishing what he seemed to want (changing an image by just setting a variable)..
            A combination of a TIMER and LOADIMG/LDIMG command that is dependent on a variable will also work. At least, that's how I did it w/ my non-standard picviewer skin.

            However, I do like what you suggested. It's clean cut and you don't have to load a "blank" image prior to loading a new image in the same location. I'm gonna have to try out your commands next chance I get.
            Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

            Comment


            • #7
              Originally posted by Sal R. View Post
              A combination of a TIMER and LOADIMG/LDIMG command that is dependent on a variable will also work. At least, that's how I did it w/ my non-standard picviewer skin.

              However, I do like what you suggested. It's clean cut and you don't have to load a "blank" image prior to loading a new image in the same location. I'm gonna have to try out your commands next chance I get.
              Wow, that's thinking outside the box! I didn't even consider the timer event as an option.
              Ride Runner RR's Myspace

              "Being happy is not about having what you want, it's about wanting what you have."
              "The best things in life are always free - but that doesn't mean money can't buy you good things."

              Comment


              • #8
                Thanks again Guino! That should work nicely!
                Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

                My Fiero Build Thread

                Comment


                • #9
                  Originally posted by guino View Post
                  I can add support for that to work.. but if you change the variable, you'd have to reload the at least the screen.

                  Unsure if this would cut if for you, but you CAN ALREADY do something like this:

                  I01,13,187,55,60,"FILE;$icon01$"

                  then use commands like:

                  "SETVAR;incon01;$skinpath$dvd.jpg"

                  This would change on the fly without even needing to reload anything.
                  Awesome! That worked beatifully.

                  My icon viewer has a more picviewer functionality to it AND it maintains the pics aspect ratio (I've been messing w/ that aspect for awhile now).

                  I've got a question, but first here's the skin layout:


                  ...and the skin's code:

                  Code:
                  MEDIACAR Skin
                  MEDIACAR mmi Skin
                  MMI-05_1EMPTY.png,MMI-05_2OFF.png,MMI-05_3ON.png,MMI-05_4DOWN.png
                  
                  /,TMR,001
                  
                  /,INC,File
                  INC,FONTCOLORDEFINITIONS.txt
                  INC,FONTSYTLEDEFINITIONS.txt
                  INC,STANDARDCMDS.skin
                  INC,STANDARDCMDS2.skin
                  INC,THEME_ARTBOX.skin
                  INC,THEME_DLSLIDER.skin
                  INC,THEME_RLIND.skin
                  
                  /, SD, Alignment;Alignment, Disp;MODE, Icon Width, Icon Heigth, Path
                  SD,0,0,50,50,"$skinpath$","*.jpg;*.png;*.gif;*.bmp",TRUE
                  
                  /, B, x, y, w, h, Command;COMMANDCODES, Tooltip
                  B21,0,550,89,50,"EXIT",""
                  B09,600,121,113,50,"PGUP||SETVARBYCODE;imgfilename;LISTTEXT",
                  B10,600,171,113,50,"UP||SETVARBYCODE;imgfilename;LISTTEXT",
                  B13,600,372,114,50,"DOWN||SETVARBYCODE;imgfilename;LISTTEXT",
                  B14,600,422,114,50,"PGDOWN||SETVARBYCODE;imgfilename;LISTTEXT",
                  B18,0,82,87,206,"SETVAR;NEXTSCRN;GPS||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
                  B19,713,82,87,206,"SETVAR;NEXTSCRN;SETUPRR||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
                  B20,0,288,87,206,"SETVAR;NEXTSCRN;SOURCE||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
                  B21,713,288,87,206,"SETVAR;NEXTSCRN;MAIN||BYVAR;showmmipopup;$NEXTSCRN$<<MMIPOPUP",
                  /,B14,356,500,88,50,"SETVARBYCODE;imgfilename;LISTTEXT||SETVAR;TEMPutilicon;$imgfilename$||EXIT",
                  B14,356,500,88,50,"SETVARBYCODE;TEMPutilicon;LISTTEXT||EXIT",
                  
                  /, L, x, y, w, h, color R;RGB, G, B, font size;FONT, font name, Code;LABELCODES, Tooltip;LABELALIGNMENT
                  /,L19,181,92,437,29,#MMITITLER#,#MMITITLEG#,#MMITITLEB#,#MMITITLESIZE01#,#MMITITLEFONT01#,"DLPATH","SCROLL-CENTER"
                  L19,181,92,437,29,#MMITITLER#,#MMITITLEG#,#MMITITLEB#,#MMITITLESIZE01#,#MMITITLEFONT01#,"=Select Application Icon","SCROLL-CENTER"
                  L33,8,494,198,50,#MAINR#,#MAING#,#MAINB#,#MMISIZE01#,#MMIFONT01#,"=Source","Left"
                  L34,594,37,198,50,#MAINR#,#MAING#,#MAINB#,#MMISIZE01#,#MMIFONT01#,"=Setup","Right"
                  L35,8,37,198,50,#MAINR#,#MAING#,#MAINB#,#MMISIZE01#,#MMIFONT01#,"=Navigation","Left"
                  L36,594,494,198,50,#SUBR#,#SUBG#,#SUBB#,#MMISIZE01#,#MMIFONT01#,"=Utilities","Right"
                  L20,356,510,88,30,#SUBR#,#SUBG#,#SUBB#,#MMINAVBARSIZE01#,#MMINAVBARFONT01#,"=Select","Center"
                  
                  /, S, x, y, w, h, fore R;RGB, G, B,  back R;RGB, G, B,  folder R;RGB, G, B,  file R;RGB, G, B, selected R;RGB, G, B, select R;RGB, G, B, trs, font pt;FONT, font name
                  S01,310,135,286,326,#FORER#,#FOREG#,#FOREB#,#DUMMYR#,#DUMMYG#,#DUMMYB#,#FOLDERR#,#FOLDERG#,#FOLDERB#,#FILER#,#FILEG#,#FILEB#,#SELECTEDFORER#,#SELECTEDFOREG#,#SELECTEDFOREB#,#SELECTEDFONTR#,#SELECTEDFONTG#,#SELECTEDFONTB#,true,#LISTSIZE01#,#LISTFONT01#
                  
                  /, J, x, y, w, h
                  I01,155,211,138,148,"FILE;$skinpath$$imgfilename$:A"
                  
                  /, IMG, x, y, w, h, File Name, Option;IMGLAYER
                  IMG,0,500,89,50,"filler1.png",OUT
                  IMG,89,500,89,50,"filler1.png",OUT
                  IMG,178,500,89,50,"filler1.png",OUT
                  IMG,267,500,89,50,"filler1.png",OUT
                  IMG,444,500,89,50,"filler1.png",OUT
                  IMG,533,500,89,50,"filler1.png",OUT
                  IMG,622,500,89,50,"filler1.png",OUT
                  IMG,711,500,89,50,"filler1.png",OUT
                  
                  END
                  Whenever the UP/DOWN/PGUP/PGDOWN buttons are used, it updates the image "I01" just fine. However, if I select an image straight out of the DL list not using the buttons, it won't update.

                  The TMR event that I commented out has this line in the skin's ExecTBL.ini:
                  Code:
                  "TIMER","SETVARBYCODE;imgfilename;LISTTEXT",LOGO_CONFIG_LOGOVIEWER.skin
                  
                  
                  .
                  I tried to use TMR to update the image variable, which it does, but for some reason, the pic does not maintain it's aspect ratio after it fires.

                  Any other ideas to get around this issue? Thanks to you, I'm that much closer to cleaning up the functionality of this skin.



                  EDIT: Nevermind! I editted the wrong TIMER entry in the ExecTBL.ini and it was still loading images using LOADIMG. Corrected the code and all is well.

                  Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

                  Comment


                  • #10
                    You can also use the ONDLCLICK event of that screen to set the variable if you want.
                    Ride Runner RR's Myspace

                    "Being happy is not about having what you want, it's about wanting what you have."
                    "The best things in life are always free - but that doesn't mean money can't buy you good things."

                    Comment


                    • #11
                      Guino, Road Runner never ceases to amaze me! This is sure one easy way to add graphics to a skin! LOL

                      [MEDIA]http://www.youtube.com/watch?v=yKBBXwivgiw[/MEDIA]
                      Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

                      My Fiero Build Thread

                      Comment


                      • #12
                        Originally posted by guino View Post
                        You can also use the ONDLCLICK event of that screen to set the variable if you want.
                        How does ONDLCLICK event work? Is it defined like the TIMER command?
                        Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

                        Comment


                        • #13
                          Originally posted by JohnWPB View Post
                          Guino, Road Runner never ceases to amaze me! This is sure one easy way to add graphics to a skin! LOL

                          [media]http://www.youtube.com/watch?v=yKBBXwivgiw[/media]
                          That's pretty f-in awesome.
                          Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

                          Comment


                          • #14
                            How did you manage to get around losing the image after clicking the button?

                            I assume that the IXX code is surrounded by a BXX code judging from your clip?
                            Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

                            Comment


                            • #15
                              I think the Image area is completely separate from the button area, that's all.
                              Ride Runner RR's Myspace

                              "Being happy is not about having what you want, it's about wanting what you have."
                              "The best things in life are always free - but that doesn't mean money can't buy you good things."

                              Comment

                              Working...
                              X