text
stringlengths
0
234
end loop;
Function Definition: procedure background is
Function Body: begin
-- Skriver ut bakgrundsfärgen för hela terminalen
for X in 1..300 loop
for Y in 1..50 loop
Put(ASCII.ESC & bg_color);
goto_xy(X, Y);
Put(' ');
end loop;
end loop;
end background;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure protocoll_background (X_Start, Y_Start: in Integer) is
begin
-- Skriver ut ramen kring protokollet
for X in 1..31 loop
for Y in 1..41 loop
Put(ASCII.ESC & protocoll_frame_bg);
goto_xy((X_Start - 3 + X), (Y_Start - 2 + Y));
Put(' ');
end loop;
end loop;
-- Skriver ut protokollets bakgrund
for X in 1..25 loop
for Y in 1..38 loop
Put(ASCII.ESC & "[48;5;15m");
goto_xy(X_Start + X, Y_Start + Y);
Put(' ');
end loop;
end loop;
end protocoll_background;
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
procedure update_protocoll(X_Start, Y_Start: in Integer; prot1, prot2: in Protocoll_Type) is
x : Integer := X_Start;
y : Integer := Y_Start;
widthcol1 : constant Integer := 13;
widthcol2 : constant Integer := 5;
widthcol3 : constant Integer := 5;
height: constant Integer := 39;
text_width: constant Integer := 12;
points_width: constant Integer := 5;
begin
-- Frame
Set_Background_Colour(White);
Set_Foreground_Colour(Black);
-- Skriver ut horisontella linjer
while y < Y_Start + height loop
Goto_XY(X_Start + 1, y);
Put(Horisontal_Line, Times => widthcol1);
Goto_XY(X_Start + 2 + widthcol1, y);
Put(Horisontal_Line, Times => widthcol2);
Goto_XY(X_Start + 3 + widthcol1 + widthcol2, y);
Put(Horisontal_Line, Times => widthcol3);
Goto_XY(X_Start + 4 + widthcol1 + widthcol2 + widthcol3, y);
y := y + 2;
end loop;
for I in Y_Start..(Y_Start+height -1) loop
Goto_XY(X_Start,I);
if (I + Y_Start) mod 2 /= 0 then
Put(Vertical_Line);
Goto_XY(X_Start + 1 + widthcol1,I);