Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to set the zindex of the back and home buttons?

  1. #1
    Low Bitrate
    Join Date
    Sep 2006
    Location
    Sydney
    Posts
    101

    How to set the zindex of the back and home buttons?

    Iím new to SD scripting. Iím just trying to make a simple app.

    I have a module that creates an Host window.
    hWndHost = (int)module.CreateHostWindow();

    That is fine however how do I set the zindex of the back and home buttons to be above this window?

  2. #2
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    You can', you have to cut regions out of the host window that you don't want to cover up StreetDeck.
    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.

  3. #3
    Low Bitrate
    Join Date
    Sep 2006
    Location
    Sydney
    Posts
    101
    Is there any sample code for this?

    Is there more than a couple pages on a wiki? Is there an API document?

  4. #4
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    The call is the windows API call ::SetWindowsRgn. It may be easier for you to just make an overlay that is restricted to your module though and put duplicate Home and back buttons on it. Overlays will automatically be cut out of the embedded window by StreetDeck.
    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.

  5. #5
    Low Bitrate
    Join Date
    Sep 2006
    Location
    Sydney
    Posts
    101
    No overlays will go over the module after
    module.CreateHostWindow();

    has been called.

    ideas?

  6. #6
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    Did you follow the instructions in the tutorial?
    http://www.mp3car.com/wiki/index.php...od_%28Addin%29

    If you play a music item, then goto the example digitalmod in the tutorial, does the playing media item show up in the lower left cut out of the embedded window?
    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.

  7. #7
    Low Bitrate
    Join Date
    Sep 2006
    Location
    Sydney
    Posts
    101
    Yes I have read that and I did use the example as a base.

    My problem is that after I call
    module = app.CreateModule("StreetDeckDestinatorAddin");
    I have a white window with nothing except the media arrow and track name on the bottom of the screen.

    The overlay I created with
    StreetDeck.Panel btnShowOverlay = (StreetDeck.Panel)module.CreatePanel(StreetDeck.en umCreatePanelType.eCPTButton, "BUTTONOVERLAY.BACK",
    "DestinatorBack", //This is the function name that will be given back to us in any OnExec call and for all intents and purposes is the name of this panel
    app.GetSystemMetric(StreetDeck.enumSystemMetrics.e SMGenericModuleClientX),
    app.GetSystemMetric(StreetDeck.enumSystemMetrics.e SMGenericModuleClientY),
    96, 96);
    Does NOT go over the white background.

    I would just like my overlay (the back button) to stay on top like the media section at the bottom of the page.

  8. #8
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    Do other system overlays show up though like the media tray overlay?
    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.

  9. #9
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    Quote Originally Posted by Deadeye View Post
    Yes I have read that and I did use the example as a base.

    My problem is that after I call
    module = app.CreateModule("StreetDeckDestinatorAddin");
    I have a white window with nothing except the media arrow and track name on the bottom of the screen.

    The overlay I created with
    StreetDeck.Panel btnShowOverlay = (StreetDeck.Panel)module.CreatePanel(StreetDeck.en umCreatePanelType.eCPTButton, "BUTTONOVERLAY.BACK",
    "DestinatorBack", //This is the function name that will be given back to us in any OnExec call and for all intents and purposes is the name of this panel
    app.GetSystemMetric(StreetDeck.enumSystemMetrics.e SMGenericModuleClientX),
    app.GetSystemMetric(StreetDeck.enumSystemMetrics.e SMGenericModuleClientY),
    96, 96);
    Does NOT go over the white background.

    I would just like my overlay (the back button) to stay on top like the media section at the bottom of the page.
    You are also not creating an overlay there. You are just creating a button. An overlay is on the same level as a module... it contains other panels (controls) in it. To have a button show above your embedded window, you would have to create an overlay, then create a button on it.

    This would look something like this:
    Code:
    StreetDeck.ScriptOverlay overlayRecognition;
    
    //Create an overlay that will contain the other controls.  Overlays are global and will be shown
    //above every other module
    overlayRecognition = app.CreateOverlay("VoiceShowRecognitionOverlay");
    
    StreetDeck.Panel btnShowOverlay = (StreetDeck.Panel)overlayRecognition.CreatePanel(StreetDeck.enumCreatePanelType.eCPTButton, "BUTTONOVERLAY.BACK",
                              "DestinatorBack", //This is the function name that will be given back to us in any OnExec call and for all intents and purposes is the name of this panel 
                              app.GetSystemMetric(StreetDeck.enumSystemMetrics.eSMGenericModuleClientX),
                              app.GetSystemMetric(StreetDeck.enumSystemMetrics.eSMGenericModuleClientY),
                              96, 96);
    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.

  10. #10
    Low Bitrate
    Join Date
    Sep 2006
    Location
    Sydney
    Posts
    101
    YAY

    thanks thats better.

    when do you expect the API doco will be released? evan a beta copy?

Page 1 of 2 12 LastLast

Similar Threads

  1. Indexing music in 1.0.9.8 Failed
    By hovalistic in forum StreetDeck
    Replies: 0
    Last Post: 07-07-2007, 11:19 AM
  2. Left arrow key has 'back' function associated with it
    By S4Per in forum StreetDeck Bug Reports
    Replies: 9
    Last Post: 03-17-2007, 01:06 AM
  3. fabricating dash xenarc 700tsv buttons help
    By michaelrj9 in forum Fabrication
    Replies: 4
    Last Post: 03-16-2005, 04:34 PM
  4. I'm Back, It feels good to be home
    By Kinnish in forum General MP3Car Discussion
    Replies: 3
    Last Post: 06-26-2002, 06:00 PM

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
  •