Unnamed Fossil Project

Check-in [29ee9c1008]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:variables for zoom in and out buttons.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:29ee9c1008b8da215f249c27a3acb49cd3b5bc98
User & Date: Derek 2013-02-24 21:55:47
Context
2013-02-26
17:38
first version of encode lines seems to be working. check-in: 5f984ad9e3 user: Derek tags: trunk
2013-02-24
21:55
variables for zoom in and out buttons. check-in: 29ee9c1008 user: Derek tags: trunk
15:57
moved the call to load until after the creation of the mazecanvas. check-in: 183e7b325c user: Derek tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to maze.html.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

136
137
138
139
140
141
142
143
</style><script>//<!--

//globals
var canvas,ctx,mazecanvas,menudiv,
arr=[],width=30,height=30,pxsize=2,maxpxdimsum=800,
x,y,goalx,goaly,startx,starty,
dx=0,dy=0,
screenblocks=33,
dt=30,speed=12,turbofactor=1.75,pcolor="#2b2",
keys=[],mousedown=null,mouseloc=null,mousejoystickradius=80;edit=false,testonly=false,brush=1,victory=false,
savetime=10000,
helpmsg="Help Message goes here.";

function save(){
localStorage.saved=false;
................................................................................

function addbutton(txt,c,f){
var b=crElem("input",menudiv,"menubutton");
b.type="button";b.value=txt;b.onclick=f;
if(c)b.style.backgroundColor=c;
crElem("br",menudiv);return b;}

var eb=null;//editbutton
function playmode(){edit=false,eb.value="Edit";eb.style.backgroundColor="#fb6";pcolor=testonly?"#fe4":"#2b2";}
function editmode(){edit=true,eb.value="Test";eb.style.backgroundColor="#fea";pcolor="#f82";victory=false;}

var _=addbutton;
_("Start","#cfc",function(){x=startx+0.5,y=starty+0.5;victory=false;testonly=false;playmode();});
_("File","#cbf",function(){});
eb=_("Edit","#fb6",function(){edit?playmode():(editmode(),testonly=true);});
_("Reset","#faa",function(){reset(200,100);});
_("Help","#acf",function(){alert(helpmsg);});
zi=_("+",0,function(){screenblocks*=0.8;});
zo=_("-",0,function(){screenblocks/=0.8;});

zi.className+=" bigtxt";zo.className+=" bigtxt";
}

// onload
window.onload=function(){
canvas=crElem("canvas",document.body);
mazecanvas=crElem("canvas");
function resize(){canvas.width=window.innerWidth-2;canvas.height=window.innerHeight-2;}







|







 







|







|



>
|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
</style><script>//<!--

//globals
var canvas,ctx,mazecanvas,menudiv,
arr=[],width=30,height=30,pxsize=2,maxpxdimsum=800,
x,y,goalx,goaly,startx,starty,
dx=0,dy=0,
screenblocks=33,//controls zoom
dt=30,speed=12,turbofactor=1.75,pcolor="#2b2",
keys=[],mousedown=null,mouseloc=null,mousejoystickradius=80;edit=false,testonly=false,brush=1,victory=false,
savetime=10000,
helpmsg="Help Message goes here.";

function save(){
localStorage.saved=false;
................................................................................

function addbutton(txt,c,f){
var b=crElem("input",menudiv,"menubutton");
b.type="button";b.value=txt;b.onclick=f;
if(c)b.style.backgroundColor=c;
crElem("br",menudiv);return b;}

var eb,zi,zo;//undo;//editbutton,zoomin,zoomout
function playmode(){edit=false,eb.value="Edit";eb.style.backgroundColor="#fb6";pcolor=testonly?"#fe4":"#2b2";}
function editmode(){edit=true,eb.value="Test";eb.style.backgroundColor="#fea";pcolor="#f82";victory=false;}

var _=addbutton;
_("Start","#cfc",function(){x=startx+0.5,y=starty+0.5;victory=false;testonly=false;playmode();});
_("File","#cbf",function(){});
eb=_("Edit","#fb6",function(){edit?playmode():(editmode(),testonly=true);});
_("Reset","#faa",function(){testonly=false;playmode();reset(200,100);});
_("Help","#acf",function(){alert(helpmsg);});
zi=_("+",0,function(){screenblocks*=0.8;});
zo=_("-",0,function(){screenblocks/=0.8;});
//undo=_("<",0,function(){alert('undo stuff goes here.');}
zi.className+=" bigtxt";zo.className+=" bigtxt";//undo.className+=" bigtxt";
}

// onload
window.onload=function(){
canvas=crElem("canvas",document.body);
mazecanvas=crElem("canvas");
function resize(){canvas.width=window.innerWidth-2;canvas.height=window.innerHeight-2;}