Revision 3883 trunk/extensions/extCAD/sm/RectangleCADTool.sm

View differences:

RectangleCADTool.sm
17 17
Initial
18 18

  
19 19
	Entry {
20
		init();
21 20
		setQuestion("RECTANGULO" + "\n" +
22 21
		"Insertar primer punto de esquina");
22
		setDescription(new String[]{"Cancelar"});
23 23
		}
24 24
	Exit{
25 25
		}
......
29 29
		addPoint(pointX:double,pointY:double)
30 30
			First {
31 31
				setQuestion("Insertar punto de esquina opuesta o Cuadrado[C]");
32
				setDescription(new String[]{"Cuadrado","Cancelar"});
32 33
				addPoint(pointX,pointY);
33 34
				}
34 35

  
......
40 41
			end();
41 42
			}
42 43
	addOption(s:String)
44
		[s.equals("c") || s.equals("C") || s.equals("Cuadrado")]
43 45
		Second {
44 46
			setQuestion("Insertar esquina opuesta");
47
			setDescription(new String[]{"Cancelar"});
45 48
			addOption(s);
46 49
			}
47 50

  
......
59 62
}
60 63
Default
61 64
{
62

  
65
	addOption(s:String)
66
		[s.equals("Cancelar")]
67
		Initial{
68
			end();
69
			}
63 70
}
64 71
%%

Also available in: Unified diff