forked from Munksgaard/rbbg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rbbtegner.html
83 lines (83 loc) · 3.71 KB
/
rbbtegner.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
<!DOCTYPE html>
<html>
<head>
<title>Racerbilebanetegneren</title>
<script src="js/rbbtegner.js"></script>
<script type="text/javascript" src="downloadify/swfobject.js"></script>
<script type="text/javascript" src="downloadify/downloadify.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body onload="init()">
<h1>Racerbilebanetegneren</h1>
Current color: <span id="colortext"></span>
<input type="text" size="1" disabled="true" id="colorindicator"/>
<br/>
<input type="color" id="hexcolor" name="hexcolor"></input>
<input type="submit" value="Change color"
onclick="clickChangeColor()"></input>
<br />
Preset colors:
<div style="clear: both;"></div>
<div class="presetColor" style="height: 25px;
width: 25px; border: 1px solid
#d4d4d4; background-color: white;
float: left;"
onmouseover="this.style.cursor='pointer'"
onclick='color_set("white")'></div>
<div class="presetColor" style="height: 25px;
width: 25px; border: 1px solid
#d4d4d4; background-color: blue;
float: left;"
onmouseover="this.style.cursor='pointer'"
onclick='color_set("blue")'></div>
<div class="presetColor" style="height: 25px;
width: 25px; border: 1px solid
#d4d4d4; background-color: red;
float: left;"
onmouseover="this.style.cursor='pointer'"
onclick='color_set("red")'></div>
<div class="presetColor" style="height: 25px;
width: 25px; border: 1px solid
#d4d4d4; background-color: green;
float: left;"
onmouseover="this.style.cursor='pointer'"
onclick='color_set("green")'></div>
<div class="presetColor" style="height: 25px;
width: 25px; border: 1px solid
#d4d4d4; background-color: black;
float: left;"
onmouseover="this.style.cursor='pointer'"
onclick='color_set("black")'></div>
<div style="clear: both;"></div>
Width (in hexagons): <input type="text" id="hexwidth"/>
Heigth (in hexagons): <input type="text" id="hexheight"/>
<input type="submit" value="Change grid size"
onclick="size_set()"/><br/>
Draw white hexagons in the SVG? <input type="checkbox" id="drawWhiteHexagons" /> <br/><br/>
<span id="downloadify">
You need flash to download the svg...
</span>
<script type="text/javascript">
Downloadify.create('downloadify',{
filename: 'racerbilebane.svg',
data: function() {
return generateSVG();
},
onComplete: function(){ alert('Your File Has Been Saved!'); },
onCancel: function(){ alert('You have cancelled the saving of this file.'); },
onError: function(){ alert('You must put something in the File Contents or there will be nothing to save!'); },
transparent: false,
swf: 'downloadify/downloadify.swf',
downloadImage: 'downloadify/download.png',
width: 100,
height: 30,
transparent: true,
append: false
});
</script>
<input type="submit" value="Reset"
onclick="init_hexgrid()">
<br/>
Tip: Hold down ctrl to delete a hexagon (paint it white)<br/>
</body>
</html>