iwmlib/lib/pixi/text.html

44 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2019-03-21 09:57:27 +01:00
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PIXI Text</title>
<link rel="stylesheet" href="../3rdparty/highlight/styles/default.css">
<link rel="stylesheet" href="../../css/doctest.css">
<script src="../3rdparty/highlight/highlight.pack.js"></script>
2019-05-22 16:03:19 +02:00
<script src="../../dist/iwmlib.3rdparty.js"></script>
2019-03-21 09:57:27 +01:00
2019-05-22 16:03:19 +02:00
<script src="../../dist/iwmlib.js"></script>
<script src="../../dist/iwmlib.pixi.js"></script>
2019-03-21 09:57:27 +01:00
</head>
<body onload="Doctest.run()">
<h1>Text</h1>
<p>
2019-10-09 15:41:16 +02:00
The Button class defines a clickable/touchable button. Use custom button styles for actions in forms, dialogs,
and more with support for multiple sizes, states, and more. Buttons will appear pressed when active. Make
buttons look inactive by setting the disabled state to true. To allow changing the state between active/inactive, set
the button type to "checkbox".
2019-03-21 09:57:27 +01:00
</p>
2019-10-09 15:41:16 +02:00
<p><a href="../../doc/out/Text.html">JavaScript API</a></p>
<p>Let's look at some text examples:</p><br />
2019-03-21 09:57:27 +01:00
<canvas id="canvas" class="interactive"></canvas>
<p>
2019-10-09 15:41:16 +02:00
What you should see: Many texts with very different styling and behaviour.
2019-03-21 09:57:27 +01:00
</p>
<script class="doctest">
const app = new PIXIApp({
view: canvas,
width: 900,
2019-10-09 15:41:16 +02:00
height: 600,
transparent: false
2019-03-21 09:57:27 +01:00
}).setup().run()
2019-10-09 15:41:16 +02:00
const text1 = new Text({x: 10, y: 10})
2019-03-21 09:57:27 +01:00
2019-10-09 15:41:16 +02:00
app.scene.addChild(text1)
2019-03-21 09:57:27 +01:00
</script>
</body>
2019-10-09 15:41:16 +02:00
</html>