Allow empty signalbar and print nothing
This commit is contained in:
parent
279dc026b6
commit
99b017586c
@ -119,24 +119,28 @@
|
||||
}
|
||||
\newcommand{\filledSignalBar}[1]{%
|
||||
\IfEqCase{#1}{%
|
||||
{e}{%
|
||||
{}{%
|
||||
}
|
||||
{3}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=green] (0, 0) rectangle ++(0.8, 1);
|
||||
\filldraw[fill=green] (1, 0) rectangle ++(0.8, 2);
|
||||
\filldraw[fill=green] (2, 0) rectangle ++(0.8, 3);
|
||||
\filldraw[fill=green] (3, 0) rectangle ++(0.8, 4);
|
||||
}
|
||||
{2}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=green] (0, 0) rectangle ++(0.8, 1);
|
||||
\filldraw[fill=green] (1, 0) rectangle ++(0.8, 2);
|
||||
\filldraw[fill=green] (2, 0) rectangle ++(0.8, 3);
|
||||
}
|
||||
{1}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=yellow] (0, 0) rectangle ++(0.8, 1);
|
||||
\filldraw[fill=yellow] (1, 0) rectangle ++(0.8, 2);
|
||||
}
|
||||
{0}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=red] (0, 0) rectangle ++(0.8, 1);
|
||||
}
|
||||
}[\PackageError{Assesment}{Undefinded type of answer: #1}{}]%
|
||||
@ -144,7 +148,6 @@
|
||||
|
||||
\newcommand{\SignalBar}[1]{%
|
||||
\begin{tikzpicture}[scale=0.15]
|
||||
\EmptySignalBar
|
||||
\filledSignalBar{#1}
|
||||
\end{tikzpicture}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user