RealyUniqueName / StablexUI

UI engine for Haxe OpenFL designed to give as much freedom as possible in customizing UI
http://ui.stablex.ru/doc
Other
337 stars 80 forks source link

How to change scroll look? #105

Open hopewise opened 10 years ago

hopewise commented 10 years ago

I need to change the following please:

scroll color ( the dragable sprite ) current;y, scroll sprite is rounded, how to make it rectangle

Also, is there example for texturing the scroll (the dragable sprite)

Thank you very much

RealyUniqueName commented 10 years ago

You need to adjust skins of vBar and hBar which are Slider widgets

hopewise commented 10 years ago

Thank, I did:

hBar-slider-skinName="'componentsSlider'"

Then

<componentsSlider:Paint color="0xb4b0b4" border = "Utils.DPS(12)" padding="Utils.DPS(2.8)" borderColor="0xdddddd"/>

But, how to set the image tile inside slider?

RealyUniqueName commented 10 years ago

You can use skins like Tile, Slice9, Img or Layer to draw images instead/on-top of plain color fill.

Or you can add some image to display list of a slider:

   <Scroll ... on-create="$this.hBar.slider.addChild(new flash.display.Bitmap($Assets.getBitmapData('image')));"/>