HISE Logo Forum
    • Categories
    • Register
    • Login

    Interface Background

    Scheduled Pinned Locked Moved General Questions
    7 Posts 3 Posters 835 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Tod SlaughterT
      Tod Slaughter
      last edited by

      What's the best way to add a solid interface background colour or should I just use a flat coloured image?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Tod Slaughter
        last edited by

        @tod-slaughter Add a panel and a simple paint routine

        function solidColour(g)
        {
            g.fillAll(0xFF000000); //Replace hex code with colour of choice
        }
        

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • Tod SlaughterT
          Tod Slaughter
          last edited by

          Many thanks 😃

          1 Reply Last reply Reply Quote 0
          • Tod SlaughterT
            Tod Slaughter
            last edited by

            @d-healey said in Interface Background:

            function solidColour(g)
            {
            g.fillAll(0xFF000000); //Replace hex code with colour of choice
            }

            Could you paste the entire json panel so I can see the correct way to implement?

            [
            {
            "type": "ScriptPanel",
            "id": "Panel1",
            "x": 0,
            "y": 0,
            "width": 599,
            "height": 500,
            "borderSize": 10
            }
            function solidColour(g)
            {
            g.fillAll(0xFF000000); //Replace hex code with colour of choice
            }
            ]

            d.healeyD 1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              If you use g.fillAll(this.get(„bgColour“));, you can even use the colour picker from the property editor.

              1 Reply Last reply Reply Quote 1
              • d.healeyD
                d.healey @Tod Slaughter
                last edited by d.healey

                @tod-slaughter I don't mess around in the JSON much, I work in the interface designer as much as possible. Here's a quick demo, just resize the panel to the size you need and change the bgColour property of the panel in the interface designer, when you recompile the panel's fill colour will update to what you set.

                HiseSnippet 813.3ocsU8tSaCCD2tzfV6V2FR6AHpepUhgZYLXZnoA8OLUsQohxP6aHShaiEI1QNN.cHdo1m2CxdL1a.6bbCoYTPzIs7od+t6b+469cmGHENznHgDgKczjPJB+LqgS3Ju1dDFG0qCB+bq8IQJpz1.0ZRHIJh5hv3k9jF.WpHJ462erEwmvcnYPHzwBlC8Kr.lJCcvNel46uGwkdDKXln2XmdNBdaguHF3yRVMPgDmyHio8I5vJXgvK20koDxgJhhFAwzR3NYnm3BtI9iYQrS8oZilngvAYfQs8X9tCRuqQHDt3fra9Rla9qr1m4xtEOqB7xDG1YYLaM.WHOkJliRMuOJsmv2Ue.2C8vyPuhF5sh0PGIKTk4QysmZ0iCMmQDnrOKsLwhJzGa0V.QvUqEPNitmDLtMiZa1nwp1usQi5aWobkxPwORYeNQZGx8aAk9wRQL209C1oGwXppsHHTvAiZUyEUU8YjCYsHpZ.TCUGJhULNs1nXtihI30FW+pwqMBz.656WS4whzGbspmN1z6qVu91WWe6zvsE79BE8.ds5kupboxWW9u8LZz7boIsT36SkyyqV5IefzpwiCNkJWEpG9wzz3ftQ918xOt1sio.NSfBdONScPHcpclfn4bDDnoc.3WesWGhhn0HSwf3BoRESSGbG54v.mQwTxpCM5LkHLI1osMXBWk3sRpdhvo9HF7W+Bqb8OzkYiluemIYFasyELWkGBag+EFg7nrwdJs0O.qSERWpbH664VCXPOj3xhilEmonAoC7kVNEUQuTcWzrXWeV3TUiA6m2XVwbmwGXHV3F6ST4mr0qvl5.Z+4FgziI7HlZxrq3Vfw8Fycbetc2GIcWwZ.S43Me9VXN7ETI+u46zkmUr5NZD0QkQ1hV68s+0MkK.ULKWFuOQIYff0pebvPPM3PAlvAkcjVXVPOAYrans0UlgTtahwMv2TmM013oNal5DEPbjhSbLKFzqmeRBBvIdxKSkfmHAa6lnjkEFdG.uYbhiitP7Zf4yOi0W3LdyBmwFKbFucgyXyENisV3Ld2Cjg9A5ciUh.yXA.LnaxZRLtKm.ppDEH5OvoROVw
                

                Edit: Christoph beat me to it :p

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                1 Reply Last reply Reply Quote 0
                • Tod SlaughterT
                  Tod Slaughter
                  last edited by

                  Thank you both again gentlemen :love-you_gesture:

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post

                  15

                  Online

                  1.8k

                  Users

                  12.1k

                  Topics

                  105.5k

                  Posts