Changes
Page history
Update Getting Started
authored
Oct 17, 2020
by
Moritz Brückner
Hide whitespace changes
Inline
Side-by-side
Getting-Started.md
View page @
cf9e1d5a
...
...
@@ -72,23 +72,25 @@ class Main {
static
function
initialized
(
window
:
kha
.
Window
)
{
kha
.
Assets
.
loadEverything
(
function
()
{
Koui
.
init
();
Koui
.
init
(()
->
{
var
button
=
new
Button
(
"Click me!"
);
button
.
setPosition
(
400
,
180
);
button
.
onMouseClick
(
function
(
e
:
Event
)
{
switch
(
e
.
state
)
{
case
Active
:
button
.
label
=
"Clicking"
;
case
Deactivated
:
button
.
label
=
"Clicked"
;
default
:
button
.
label
=
"Click me!"
;
}
});
Koui
.
add
(
button
);
});
var
button
=
new
Button
(
"Click me!"
);
button
.
setPosition
(
400
,
180
);
button
.
onMouseClick
(
function
(
e
:
Event
)
{
switch
(
e
.
state
)
{
case
Active
:
button
.
label
=
"Clicking"
;
case
Deactivated
:
button
.
label
=
"Clicked"
;
default
:
button
.
label
=
"Click me!"
;
}
});
Koui
.
add
(
button
);
});
}
...
...
@@ -117,23 +119,23 @@ class KouiTrait extends iron.Trait {
super
();
notifyOnInit
(
function
()
{
Koui
.
init
(
);
var
button
=
new
Button
(
"Click me!"
);
button
.
setPosition
(
400
,
180
);
button
.
onMouseClick
(
function
(
e
:
Event
)
{
switch
(
e
.
state
)
{
case
Active
:
button
.
label
=
"Clicking"
;
case
Deactivated
:
button
.
label
=
"Clicked"
;
default
:
button
.
label
=
"Click me!"
;
}
});
Koui
.
add
(
button
);
Koui
.
init
(
()
->
{
var
button
=
new
Button
(
"Click me!"
);
button
.
setPosition
(
400
,
180
);
button
.
onMouseClick
(
function
(
e
:
Event
)
{
switch
(
e
.
state
)
{
case
Active
:
button
.
label
=
"Clicking"
;
case
Deactivated
:
button
.
label
=
"Clicked"
;
default
:
button
.
label
=
"Click me!"
;
}
});
Koui
.
add
(
button
);
}
);
});
}
}
...
...
...
...