Announcement

Collapse
No announcement yet.

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

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

  • 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?
    www.ssw.com.au

  • #2
    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.

    Comment


    • #3
      Is there any sample code for this?

      Is there more than a couple pages on a wiki? Is there an API document?
      www.ssw.com.au

      Comment


      • #4
        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.

        Comment


        • #5
          No overlays will go over the module after
          module.CreateHostWindow();

          has been called.

          ideas?
          www.ssw.com.au

          Comment


          • #6
            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.

            Comment


            • #7
              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.
              www.ssw.com.au

              Comment


              • #8
                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.

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    YAY

                    thanks thats better.

                    when do you expect the API doco will be released? evan a beta copy?
                    www.ssw.com.au

                    Comment


                    • #11
                      The Streetdeck IDL file should contain descriptions of every method available. More through API documentation won't be available until version 2.0.
                      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