Reply To: 5.2.177 rev

Home Forums General Using Ctrlr 5.2.177 rev Reply To: 5.2.177 rev

#30518
zeoka
Participant
    • Topics: 73
    • Replies: 466
    • Total: 539
    • ★★★

    look&feel seems promising

    if I understand there is possibilities to add design to tab backgrounds or add
    sliders or combos to a custom comp for example
    actually I’m trying to do sliders function to a custom mod , it’s near but crappy

    --
    -- Called when a mouse DOWN (any mouse button) event happens on a component
    -- @comp
    -- @event   http://www.rawmaterialsoftware.com/juce/api/classMouseEvent.html
    --
    
    Glbclick = function(comp, event)
    glbx = event.x
    glby = event.y
       for glv = 0,96,48 do
           if glbx >= 48 and glbx <= 272 and glby >= 48 + glv and glby <= 48 + glv +48 then
              comp:getOwner():setValue(glv/48,false )
          end 
       end
        if glbtab == 0 then 
               if glbx >= 484 and glbx <= 484+96 and glby >= 96 and glby <= 96+24 then
                  gtne = 1
             else gtne = 0     
              end
    elseif glbtab == 1 then
    --to do
       end
    end
    GlbDrag = function(comp, event)
    
    gvl = event:getDistanceFromDragStartY() /2 
    
    gdry = event.y
    ---g0dr = glb0 +  (gdry - glby) 
     if glbtab == 0 then
            if gtne == 1 then 
               if gdry < glby and math.floor(gvl) + glb0  <=84  then 
                  glbdat:setByte(5,glb0 + math.floor(gvl) )
           elseif gdry > glby and glb0 - math.floor(gvl) >=40 then
                  glbdat:setByte(5, glb0 - math.floor(gvl)  )
              end
                  -- if g0dr <= 168 and g0dr >= 80 then 
                      --glbdat:setByte(5, math.floor(g0dr/2) )
                  --end
           end
    end
    panel:getLabelComponent("GlobalData"):setText(glbdat:toHexString(1))
    comp:repaint()
    end

    they are like combo boxes but I would slide them

    Ctrlr