Announcement

Collapse
No announcement yet.

Images with C#

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

  • Images with C#

    Hey there...

    has anybody a clue how the images in streetdeck work?

    I assume something like this

    StreetDeck.ImagePanel panel = (StreetDeck.ImagePanel)module.CreatePanel(StreetDe ck.enumCreatePanelType.eCPTImage,
    "", id, x, y, 400, 400);

    panel.SetImage(???)

    Thank you,
    Lars

  • #2
    Nobody has a clue?

    Comment


    • #3
      This should load an image from the script path called scrnshot.jpg.

      Code:
      StreetDeck.ImagePanel imageTest;
      //Create an image and load a file from our script folder into it
      imageTest = (StreetDeck.ImagePanel)module.CreatePanel(StreetDeck.enumCreatePanelType.eCPTImage, "", "Image", 100, 200, 900, 100);
      //This assumes there is a jpg file called scrnshot.jpg in your script folder
      imageTest.SetImage(module.GetScriptTexture("scrnshot.jpg"));
      You can also load absolute paths like this:
      Code:
      imageTest.SetImage(module.GetScriptTexture("C:\\Windows\\Coffee Bean.bmp"));
      StreetDeck.com Developer (I am Chuck)
      Get StreetDeck at http://www.streetdeck.com
      The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

      Comment

      Working...
      X