This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
extensions:gauge [2013/05/31 10:32] – [SXGauge] daniel | extensions:gauge [2015/09/14 11:13] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~NOTOC~~ | ||
+ | ====== SXGauge ====== | ||
+ | |||
+ | ---- dataentry extension ---- | ||
+ | author_mail | ||
+ | description | ||
+ | lastupdate_dt : 2011-03-12 | ||
+ | compatible | ||
+ | depends | ||
+ | tags : gauge, bar, texture | ||
+ | homepage_url | ||
+ | download_url | ||
+ | ---- | ||
+ | |||
+ | ===== Usage ===== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | This Sparrow extension class displays a texture, trimmed to its left side, depending on a ratio. This can be used to create a progress bar or a rest-time display. | ||
+ | |||
+ | You control the gauge by changing its '' | ||
+ | |||
+ | <code objc> | ||
+ | SXGauge *gauge = [SXGauge gaugeWithTexture: | ||
+ | [self addChild: | ||
+ | |||
+ | gauge.ratio = 0.5f; | ||
+ | </ | ||
+ | |||
+ | In the sample on the right, the gauge is just the yellow texture. By displaying this object in front of a grey background and border, it looks as if this was a container that grows empty. | ||
+ | |||
+ | ===== Changelog ===== | ||
+ | |||
+ | * // | ||
+ | * // | ||
+ | |||
+ | ===== Source Code ===== | ||
+ | |||
+ | %gist(867241)% | ||
+ | |||
+ | ===== Discussion ===== | ||
+ | |||
+ | //No comments so far. Feel free to edit this part of the page.// |