Interface Background



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



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

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


  • Many thanks 😃



  • @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
    }
    ]


  • administrators

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



  • @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 😛



  • Thank you both again gentlemen 🤟


Log in to reply
 

3
Online

315
Users

914
Topics

5.9k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.