- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
ont = love.graphics.newFont("/font/RobotoMono-Regular.ttf",14);
love.graphics.setFont(font);
box = {
draw = false;
}
function box:cr(d,variant)
--self.draw = false;
self.d = d;
self.var = variant or {};
table.insert(self.var,">> Quit");
--table.insert(self.var,">> retry");
self.str = 0;
self.v = vector(0,(love.graphics.getHeight()/2)-150);
self.h = 300;
self.w = 800;
end
function box:up(dt)
end
function box:dr()
if self.draw then
love.graphics.setColor(0,0,0);
love.graphics.rectangle("fill",self.v.x,self.v.y,self.w,self.h);
love.graphics.setColor(1,1,1);
love.graphics.print(self.d,self.v.x,self.v.y);
love.graphics.print(self.str,self.v.x,self.v.y+20);
for k,v in pairs(self.var) do
if k == self.str then
--love.graphics.setColor(1,1,1);
love.graphics.draw(animmouse.img.RMB,self.v.x+font:getWidth(v),self.v.y+200+((k-1)*20))
love.graphics.setColor(1,1,0);
else
love.graphics.setColor(1,1,1);
end
love.graphics.print(v,self.v.x,self.v.y+200+((k-1)*20));
end
end
end
function box:mw(y)
if self.draw then
local lt = #self.var;
self.str = self.str - y;
if 1 > self.str then
self.str = lt;
elseif lt < self.str then
self.str = 1;
end
end
end
function box:mp(x,y,b)
if self.draw then
if b == 2 then
if self.str == #self.var then
self.draw = false
end
end
end
end