Search Unity

Unity UI Help:Modyfying a Sliders behaviour and visuals?

Discussion in 'UGUI & TextMesh Pro' started by welwordion, Oct 6, 2019.

  1. welwordion

    welwordion

    Joined:
    Jan 14, 2019
    Posts:
    9
    I have structured my population and workforce into groups, differing by species work etc.
    To allow easy transfer from one group to another I come up with an idea for a sliderlike UI element representing a workforce.
    The bar of the slider would be seperated into segments representing the different groups doing the work, if you grab the handle the behaviour would be normal transfering population from and to idle groups, however if you leftclick on the bar you would select population from that segment only and if you rightclick you would attempt to transfer to that segment or if you clicked the handle to that work.

    Problem I am not sure how to go about this, will triggers simple overwrite the default behaviour of UI elements? where can I change the sliders looks? Should I try to write a new element instead of modyfing a slider?
     
  2. welwordion

    welwordion

    Joined:
    Jan 14, 2019
    Posts:
    9
    Ok I have created a Graphic class to generate a Slider however I had to use a Monobehaviour class for the handle and I feel as if this is suboptimal, however when I try to make this a Graphic class I can not get it to display on top.