-
Notifications
You must be signed in to change notification settings - Fork 0
/
hw4-1-1.html
104 lines (94 loc) · 2.23 KB
/
hw4-1-1.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Homework 4-1-1</title>
<style>
canvas {border: 1px solid black}
</style>
</head>
<body>
<canvas id="canvas" width="1000" height="1000"></canvas>
<script src="js/myGUI.js"></script>
<script>
createWindow('canvas',
{
posX: 50,
posY: 50,
width: 200,
height: 200,
title: "MY_WINDOW"
});
createTextBox('canvas',
{
posX: 300,
posY: 150,
width: 200,
height: 100,
font: 'serif',
size: '20px',
text: 'my textbox'
});
createButton('canvas',
{
posX: 400,
posY: 50,
width: 200,
height: 50,
font: 'serif',
size: '20px',
text: 'MY_BUTTON'
});
createMenu('canvas',
{
posX: 100,
posY: 300,
width: 100,
height: 50,
items: ['item1', 'item2', '...', 'itmeN'],
title: 'MY_MENU',
font: 'serif',
size: '20px'
});
createWindow('canvas',
{
posX: 300,
posY: 500,
width: 250,
height: 100,
title: "MY_WINDOW2"
});
createButton('canvas',
{
posX: 600,
posY: 100,
width: 150,
height: 100,
font: 'Arial',
size: '30px',
text: 'MY_BUTTON2'
});
createTextBox('canvas',
{
posX: 300,
posY: 300,
width: 500,
height: 100,
font: 'times',
size: '20px',
text: 'my textbox2'
});
createMenu('canvas',
{
posX: 700,
posY: 450,
width: 200,
height: 60,
title: 'MY_MENU2',
items: ['item4', 'item3', 'item2', 'item1']
});
</script>
</body>
</html>