HISE Logo Forum
    • Categories
    • Register
    • Login

    Preset Browser in CSS

    Scheduled Pinned Locked Moved Unsolved Scripting
    csspreset browserbugzzz
    3 Posts 2 Posters 53 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.
    • HISEnbergH
      HISEnberg
      last edited by

      Full code and snippet are at the bottom.

      I've been abusing CSS lately and wanted to share some findings/bugs. I am really loving CSS for the transformation and blur effects so I hope we can get this more standardized.

      I think the preset browser I am working on best captures some of the issues I am finding.

      Screenshot 2025-08-22 at 8.37.37 AM.png

      1. HISE LAF combined with CSS?

      Is this possible yet? Whenever I have tried to do this in the past something will be overwritten (either the LAF portion of the script or the CSS).

      2. CSS Scripting

      I've noticed a few bugs here (on MacOS). Autofill doesn't work correctly (selecting from the dropdown doesn't fill in the text). The compiler also doesn't function when working on a CSS script (I have to go back to the onInit script to compile, the same is true with F5).

      3. Passing variables to CSS

      I can't seem to pass colour (hex) variables to the CSS renderer. I am not sure if I am doing something wrong here but I assume we would use the setStyleSheetProperty to be able to pass a variable along:

      // Convert to CSS hex variable
      inline function toHex(colorValue)
      {
         local hexString = Engine.intToHexString(colorValue);
         local rgbOnly = hexString.substring(2, hexString.length); // remove the opacity
         return "#" + rgbOnly;
      }
      
      // Colour Variables
      const var c3 = toHex(ft_PresetBrowser.get("itemColour3"));
      Console.print(c3); // This will print something like #ff0000
      css_Laf.setStyleSheetProperty("c3", c3, ""); 
      
      // Then in my CSS style sheet
      .preset-browser
      {    
      background-color: var(--c3); // doesn't work
      

      4. Double Repainting of preset items & buttons

      The gif best captures this, there is a "white flash" that happens on mouse interactions. It might be I am scripting something in the wrong order but I can't account for why this happens

      vid.gif

      5. Preset Tags

      The Preset tags don't display the full text (no matter the length of the text). For some reason flipping the ButtonsInsideBorder boolean will temporarily fix it, but when you recompile the issue reappears.
      tag.gif

      6. Scrollbar

      I am pretty sure this is me but I can't get the scrollbar in bounds (the right side is always cutoff).

      I'll post more of the bugs I come across here then unify them as I come across them. If someone can confirm if any are just my lack of understanding or true HISE bugs it would be appreciated!

      SNIPPET

      HiseSnippet 11017.3oc6bu7bbbbe.GeAIWEI3WxN1woruLl1VdAM.ztKdPPRISPPPPhHRQFBJIqvvhd1cGfcLmclMyLKHfk4gjpxYWUt4SIUk+Dx0TUTkqIGR4a4lujK4jOkqI+5ddr8ryrK.n0Km5KbjD14QOc+qeN89Aw4nXG+dN8dZju6vgNw0pM24ePXPWmnnfvZyM+iNdnSs49x026X+392rusqesc2t1bes5CCchbh2JL34QNg0153g1QQN8pM2bm+1pKZtW6B0z+76t9V1d19ccFenZ0d+.2tN20cfa73i9fMeGWOucr647H2AFW8pata2.+aF3ELRxPmudyZCs69L6CbdWa0kct50ticT+Zyco5Wwo2ZqtQyKeEmlctRy1qXek1qrZm1sZsey8W0dsK2c8qb402nics4dka0yMNHbuX6XmnZycgsB5c7d8CdtexC38cib634n9PqZ6IO4jCuSfWOUQTczZ2ruqWu7HUjD2paD2NeRb6aV+dt8byO9332qqOg036vL.N24Jl8NegrWKyrWSirWEYoyYjktPRV5qWeutgtCiGeFU94KUeW+Xmv8sk5IyrRx0V6b+cmq9MCjqvOd4A1OyYmP4C42Qi0Ws4hVqtZyEt17yK0UQwVGZGZse7SefYiDq21JKMNvI9lACFF3KenwEkKrPqoKJoy3joaTzSuq89F2c2PGIvb2ft1d2MH3Y2vu2NNNdMT2Ux0trjV6Eermyd8cbjGf5vExJKKGQ8TlLKptwRoaZhpJb2x+.WeG0U8dxUmbqOx9f65FE23wW7l8CkeIXX+eTj0MGMniq8EWz5h2ww1y4Xq63NrevP8Abib763DdfkbpCO15dNw1dW7IKbs8G42M1Mv2Jv+cChctueiEl+il+0TAAe4yuqjj5n38j5Mo8uJJ9t4GWU7eMI67NNGq5qD1X7srnUb3HGU9+EyaM4CY+8+D6orusWTEOFU0VXfmm5tUOoINsp2d0mI8Fa3ml9GZ6IEirKTZQWraR8o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mo0UmsT+qqnyXaXloyiPqqO2kmclt7zWIoxky5kztkNYthYWkmq++m.bU4l85YzYIqVqU4QvKVk1LYjroTZFOl0dQRPPVzdG6P0HTt9CGcZFDu0FMGGrVMcfnUSKFiiTpRW1+nOyoZDpS0PtULf15kFPa8BC2aNFT9pBJOZSayQal9hFZmEcatn9+kOTm4.mqpdLRjVGWu59AcGEkEcqXXg0yFCocyzFcW6rUSrd5fuqWplXszgnVqhZhpZ6r9zFNX0pZlmtJI82pUjpcTG8u966XrqM8wXW8Sp1RqWcaoUqb4TaTUSoVENXVG20x9qr6DZfUnacywcqK11ZsEJuhk1ypu+TGNekjt9IUPujSENdD8MxF.rhQzyhumzjgSqU+oZz+OrwRsl57ZEGDrTE+hm7jeEiVujS.Vt.9ROWR0gflyLBL0txajOKvirOP2sc4X6CV5T228JFi7rQVYLsbrxDKTMo4xpyXk7c1n2p62bl8cm7gLk4A1nxE1VYe2RuJvJSedgUVyre6.W+kdt56F3pFKJdf8QYGTxmoi8aDTO082LCsiCcoc2lbXwhgDyXqQyknt1dNMZsby0VX1KKIOwRas9Y+xRLCXm5tbEhXSVFJM.kY3b8Wtku84ebR53l7mcipmaBApy3J2Js9r7nTxvUI+S40Kbld0uSbl070skE6s0+LidqpB0R8SiwsVdkOIVqV9Jh6pHVktd3nrObVirEWIl4q7Tb0xUN8XVnJeF9rwTNkKZ8jFCM6epdMqqkFvZWphJaDs7nxoe8Cazb5KyqTuSiFQEmOLKNrZwcg3z8x0lkwULKiEJQm943KTjlbNdy9RkVuzUNw0DsQ1XTsamFFxZdpPkI4QKO6NNd5t95eKMCW0BgqrGzYaYmls2zOB09MkOcnjwz4gBsFlwR7jIgTEmZi2paemi1w0yQ8837+A+SIZOB
      

      CODE

      Content.makeFrontInterface(640, 440);
      
      const var ft_PresetBrowser = Content.getComponent("ft_presetBrowser");
      const var css_Laf = Content.createLocalLookAndFeel();
      css_Laf.setStyleSheet("css_PresetBrowser.css");
      ft_PresetBrowser.setLocalLookAndFeel(css_Laf);
      
      Engine.setUserPresetTagList(["Christoph's Cumbia", "Healey Hiphop", "Hisenberg Heavy Metal"]);
      
      // Colour Variables
      const var c3 = toHex(ft_PresetBrowser.get("itemColour3"));
      Console.print(c3);
      css_Laf.setStyleSheetProperty("c3", c3, "");
      
      // Convert to CSS hex variable
      inline function toHex(colorValue)
      {
         local hexString = Engine.intToHexString(colorValue);
         local rgbOnly = hexString.substring(2, hexString.length);
         return "#" + rgbOnly;
      }
      

      css_PresetBrowser.css

      /* Main container */
      .preset-browser
      {
          background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
          /*background-color: var(--c3); */ /*This doesn't work*/
          border: 2px solid #333;
          border-radius: 8px;
          padding: 12px;
          box-shadow: inset 0px 1px 3px rgba(255,255,255,0.1);
      }
      
      /* Bank/Column */
      .column
      {
          background: linear-gradient(135deg, rgba(120, 80, 150, 0.3) 0%, rgba(80, 50, 120, 0.2) 100%);
          color: #cccccc;
          border-radius: 10px;
          padding: 4px 6px;
          margin: 1px -9px 1px 1px;
          border: 1px solid rgba(120, 80, 150, 0.4);
      }
      
      /* Preset column */
      #preset
      {
          background: linear-gradient(225deg, rgba(120, 80, 150, 0.3) 0%, rgba(80, 50, 120, 0.2) 100%);
          color: #cccccc;
          border-radius: 10px;
          padding: 10px 10px;
          margin: 1px -9px 1px 8px;
          border: 1px solid rgba(120, 80, 150, 0.4);
      }
      
      /* Items (why is this named tr?) */
      tr
      {
          background: linear-gradient(135deg, rgba(100, 60, 130, 0.2) 0%, rgba(60, 40, 100, 0.1) 100%);
          color: #cccccc;
          border-radius: 3px;
          padding: 3px 6px;
          margin: 2px 5px 10px 40px;
          border: 1px solid rgba(100, 60, 130, 0.3);
          font-size: 11px;
          text-align: left;
          transition: all 0.3s ease;
          transform: translateX(3px) translateY(0px) translateZ(0px);
      }
      
      tr:hover
      {
          background: linear-gradient(135deg, rgba(120, 80, 150, 0.4) 0%, rgba(80, 50, 120, 0.3) 100%);
          border-color: rgba(140, 100, 170, 0.5);
          color: #fff;
          cursor: pointer;
          transform: translateX(6px) translateY(0px) translateZ(-7px);
          box-shadow: 0px 2px 4px rgba(120, 80, 150, 0.2);
      }
      
      tr:active
      {
          background: linear-gradient(135deg, rgba(140, 100, 170, 0.6) 0%, rgba(100, 70, 140, 0.5) 100%);
          color: #fff;
          transform: translateX(4px) translateY(0px);
      }
      
      tr:checked
      {
          background: linear-gradient(135deg, rgba(150, 110, 190, 0.8) 0%, rgba(120, 80, 160, 0.7) 100%);
          color: #fff;
          border: 2px solid rgba(170, 130, 210, 0.9);
          font-weight: bold;
          text-shadow: 1px 1px 1px;
          box-shadow: 0px 0px 8px rgba(150, 110, 190, 0.4);
      }
      
      /* Ssearch bar */
      input
      {
          background: linear-gradient(180deg, rgba(40, 40, 40, 0.9) 0%, rgba(30, 30, 30, 0.9) 100%);
          color: #cccccc;
          border: 1px solid rgba(120, 80, 150, 0.4);
          border-radius: 6px;
          padding: 6px 10px;
          font-size: 12px;
          transition: all 0.2s ease;
          box-shadow: inset 0px 1px 2px rgba(0,0,0,0.3);
          margin: 2px 4px;
      }
      
      input:focus
      {
          border-color: rgba(160, 120, 200, 0.8);
          background: linear-gradient(180deg, rgba(60, 60, 60, 0.9) 0%, rgba(50, 50, 50, 0.9) 100%);
          box-shadow: 0px 0px 6px rgba(120, 80, 150, 0.4);
          color: #fff;
      }
      
      /* Buttons */
      button
      {
          background: linear-gradient(135deg, rgba(120, 80, 150, 0.5) 0%, rgba(80, 50, 120, 0.4) 100%);
          color: #cccccc;
          border: 1px solid rgba(120, 80, 150, 0.6);
          border-radius: 4px;
          padding: 4px 8px;
          font-size: 11px;
          font-weight: 500;
          transition: all 0.2s ease;
          text-shadow: 0px 1px 1px rgba(0,0,0,0.5);
          margin: 1px 2px;
          box-shadow: 0px 0px 4px rgba(120, 80, 150, 0.3);
      }
      
      button:hover
      {
          background: linear-gradient(135deg, rgba(140, 100, 180, 0.7) 0%, rgba(100, 70, 150, 0.6) 100%);
          border-color: rgba(160, 120, 200, 0.8);
          color: #fff;
          transform: translateY(-1px);
          box-shadow: 0px 0px 8px rgba(120, 80, 150, 0.6), 0px 2px 4px rgba(120, 80, 150, 0.3);
      }
      
      button:active
      {
          background: linear-gradient(135deg, rgba(160, 120, 200, 0.8) 0%, rgba(120, 80, 160, 0.7) 100%);
          color: #fff;
          transform: translateY(0px);
          box-shadow: 0px 0px 6px rgba(120, 80, 150, 0.8);
      }
      
      /* Tags */
      .tag-button
      {
          background: linear-gradient(90deg, rgba(80, 120, 160, 0.3) 0%, rgba(60, 100, 140, 0.2) 100%);
          color: #b8d4f0;
          border: 1px solid rgba(80, 120, 160, 0.4);
          border-radius: 8px;
          padding: 3px 8px;
          font-size: 10px;
          margin: 3px;
          transition: all 0.35s ease;
          min-width: 40px;
          max-width: 120px;
      }
      
      .tag-button:hover
      {
          background: linear-gradient(90deg, rgba(100, 140, 180, 0.5) 0%, rgba(80, 120, 160, 0.4) 100%);
          transform: scale(1.05);
          border: 2px solid rgba(120, 160, 200, 0.9);
          font-weight: bold;
          text-shadow: 1px 1px 1px;
          box-shadow: 0px 0px 8px rgba(150, 110, 190, 0.4);
      }
      
      .tag-button:active
      {
          background: linear-gradient(90deg, rgba(120, 160, 200, 0.7) 0%, rgba(100, 140, 180, 0.6) 100%);
          color: #fff;
          border: 2px solid rgba(120, 160, 200, 0.9);
          font-weight: bold;
          text-shadow: 1px 1px 1px;
          box-shadow: 0px 0px 8px rgba(150, 110, 190, 0.4);
      }
      
      /* Notes */
      .notes
      {
          background: linear-gradient(180deg, rgba(30, 30, 30, 0.9) 0%, rgba(20, 20, 20, 0.9) 100%);
          border: 1px solid rgba(100, 60, 130, 0.3);
          border-radius: 4px;
          padding: 6px;
          color: #aaaaaa;
          font-size: 10px;
          line-height: 1.3;
          box-shadow: inset 0px 1px 2px rgba(0,0,0,0.3);
          margin: 2px;
      }
      
      /* Scrollbar */
      scrollbar
      {
          background: linear-gradient(180deg, rgba(60, 60, 60, 0.6) 0%, rgba(40, 40, 40, 0.6) 100%);
          border-radius: 2px;
          width: 1px;
          transition: all 0.2s ease;
          
          border: 1px solid rgba(80, 80, 80, 0.3);
          margin: 2px 5px 2px 2px;
          padding: 0px;
      }
      
      scrollbar:hover
      {
          background: linear-gradient(180deg, rgba(120, 80, 150, 0.7) 0%, rgba(100, 60, 130, 0.7) 100%);
          width: 14px;
          border-color: rgba(140, 100, 170, 0.5);
          margin: 2px 3px 2px 2px;
      }
      
      scrollbar:active
      {
          background: linear-gradient(180deg, rgba(160, 120, 200, 0.9) 0%, rgba(140, 100, 180, 0.9) 100%);
          border-color: rgba(180, 140, 220, 0.7);
      }
      
      /* Compact labels */
      label
      {
          color: #cccccc;
          font-size: 10px;
          text-shadow: 0px 1px 1px rgba(0,0,0,0.5);
          transition: color 0.15s ease;
      }
      
      label:hover
      {
          color: rgba(160, 120, 200, 1.0);
      }
      
      d.healeyD 1 Reply Last reply Reply Quote 7
      • d.healeyD
        d.healey @HISEnberg
        last edited by

        @HISEnberg said in Preset Browser in CSS:

        1. HISE LAF combined with CSS?

        Is this possible yet? Whenever I have tried to do this in the past something will be overwritten (either the LAF portion of the script or the CSS).

        Nope, not there yet. You can use laf and css for the same laf object, but not for the same components.

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

        HISEnbergH 1 Reply Last reply Reply Quote 0
        • HISEnbergH
          HISEnberg @d.healey
          last edited by

          @d-healey Nice thanks for clarifying, that does open up a bit more possibilities.

          I'm trying some things to hack around it so I can get the best of both worlds. For instance, in CSS I am not seeing a way of distinguishing the list items by column. The items in bank > category > preset are all drawn the same in CSS.

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

          20

          Online

          1.9k

          Users

          12.3k

          Topics

          107.4k

          Posts