|
Revision 112, 0.7 kB
(checked in by ashley, 8 months ago)
|
Added pill.r
Scroller fixes
Major color / theme management changes (in progress)
|
| Line | |
|---|
| 1 |
progress: make rebface [ |
|---|
| 2 |
tip: { |
|---|
| 3 |
USAGE: |
|---|
| 4 |
progress |
|---|
| 5 |
progress data .5 |
|---|
| 6 |
|
|---|
| 7 |
DESCRIPTION: |
|---|
| 8 |
A horizontal progress indicator. |
|---|
| 9 |
At runtime face/data ranges from 0 to 1 indicating percentage. |
|---|
| 10 |
} |
|---|
| 11 |
size: 50x5 |
|---|
| 12 |
effect: [draw [pen colors/state-dark fill-pen colors/state-dark box 1x1 1x1]] |
|---|
| 13 |
data: 0 |
|---|
| 14 |
edge: default-edge |
|---|
| 15 |
feel: make default-feel [ |
|---|
| 16 |
redraw: make function! [face act pos] [ |
|---|
| 17 |
all [ |
|---|
| 18 |
act = 'show |
|---|
| 19 |
face/effect/draw/7/x: max 1 face/size/x - 2 - sizes/edge - sizes/edge * face/data: min 1 max 0 face/data |
|---|
| 20 |
] |
|---|
| 21 |
] |
|---|
| 22 |
] |
|---|
| 23 |
action: make default-action [ |
|---|
| 24 |
on-resize: make function! [face] [face/effect/draw/6/y: face/size/y - 2 - sizes/edge - sizes/edge] |
|---|
| 25 |
] |
|---|
| 26 |
init: make function! [] [action/on-resize self] |
|---|
| 27 |
] |
|---|