forked from fuse-open/fuse-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainView.ux
More file actions
43 lines (38 loc) · 1.26 KB
/
MainView.ux
File metadata and controls
43 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<App ux:Class="MyApp" ClearColor="1,1,1,1">
<JavaScript>
</JavaScript>
<ClientPanel>
<Grid ColumnCount="2">
<!-- a simple pin entry -->
<StackPanel Padding="5" ItemSpacing="5" Color="#AAA" Alignment="Center">
<Panel Padding="5">
<Rectangle Layer="Background" Color="#FFF" CornerRadius="10"/>
<Text TextAlignment="Center" ux:Name="TheStatic" FontSize="40"/>
</Panel>
<NumberEntry Output="TheStatic"/>
</StackPanel>
<!-- an example of reusing the NumberPad component -->
<StackPanel Padding="5" ItemSpacing="5" Color="#AAA" Alignment="Center">
<JavaScript>
var Observable = require("FuseJS/Observable")
exports.current = Observable(" ")
exports.selected = function(args) {
exports.current.value = args.number
OneShot.pulseBackward()
}
</JavaScript>
<Panel Padding="5">
<Rectangle Layer="Background" Color="#FFF" CornerRadius="50"/>
<Text TextAlignment="Center" FontSize="80" Value="{current}" Opacity="0"
ux:Name="OneShotText"/>
<Timeline ux:Name="OneShot">
<Change OneShotText.Opacity="1" Duration="0.7"/>
</Timeline>
</Panel>
<NumberPad>
<NumberSelected Handler="{selected}"/>
</NumberPad>
</StackPanel>
</Grid>
</ClientPanel>
</App>