✨
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
\usepackage{multirow}
|
||||
\usepackage{forloop}
|
||||
|
||||
\usetikzlibrary {shapes.multipart,shapes.misc,shapes.symbols,calc,positioning}
|
||||
\usetikzlibrary {shapes.multipart,shapes.misc,shapes.symbols,calc,positioning,fit}
|
||||
|
||||
\input{star-wars-icons.sty}
|
||||
\input{star-wars-talents.sty}
|
||||
@@ -18,6 +18,18 @@
|
||||
\newfontfamily{\ltn}{Elektra Light Pro}
|
||||
\DeclareTextFontCommand{\textltn}{\ltn}
|
||||
|
||||
\makeatletter
|
||||
\NewDocumentCommand {\getnodedimen} {O{\nodewidth} O{\nodeheight} m} {
|
||||
\begin{pgfinterruptboundingbox}
|
||||
\begin{scope}[local bounding box=bb@temp]
|
||||
\node[inner sep=0pt, fit=(#3)] {};
|
||||
\end{scope}
|
||||
\path ($(bb@temp.north east)-(bb@temp.south west)$);
|
||||
\end{pgfinterruptboundingbox}
|
||||
\pgfgetlastxy{#1}{#2}
|
||||
}
|
||||
\makeatother
|
||||
|
||||
\newlength{\textlength}
|
||||
|
||||
\pagestyle{empty}
|
||||
@@ -117,23 +129,29 @@
|
||||
\addtocounter{talenty}{1}%
|
||||
\setcounter{talentx}{1}%
|
||||
}{}
|
||||
|
||||
\ifthenelse{\equal{#3}{true}}{%
|
||||
\definecolor{talentcolor}{HTML}{5f1111}
|
||||
}{%
|
||||
\definecolor{talentcolor}{HTML}{1e115f}
|
||||
}
|
||||
|
||||
|
||||
\node[text=white,text width = 2.6cm] at ($(\arabic{talentx}*4.5,-\arabic{talenty}*4.9) + (0.5,-0.15)$) (tmp\alph{talentx}\alph{talenty}) {\footnotesize \texttn{\uppercase{#1}}};
|
||||
|
||||
\getnodedimen{tmp\alph{talentx}\alph{talenty}}
|
||||
\node[talent] at (\arabic{talentx}*4.5,-\arabic{talenty}*4.9)
|
||||
(\alph{talentx}\alph{talenty})
|
||||
{
|
||||
\settowidth{\textlength}{\footnotesize \texttn{{\uppercase{#1}}}}%
|
||||
\tabular{p{3cm}}
|
||||
\rule{0pt}{10pt}\\
|
||||
\ifdim\textlength > 72.5pt
|
||||
\rule{0pt}{10pt}\\
|
||||
\ifdim\nodeheight > 15pt
|
||||
\rule{0pt}{10pt} \\
|
||||
\fi
|
||||
\scriptsize #2 \\
|
||||
\endtabular
|
||||
};
|
||||
\ifthenelse{\equal{#3}{true}}{%
|
||||
\definecolor{talentcolor}{HTML}{5f1111}
|
||||
}{%
|
||||
\definecolor{talentcolor}{HTML}{1e115f}
|
||||
}
|
||||
\ifthenelse{\equal{#4}{true}}{%
|
||||
\node[forcepower] at ($(\arabic{talentx}*4.5,-\arabic{talenty}*4.9) + (0.3,-0.6)$) {};
|
||||
}{}
|
||||
@@ -141,7 +159,7 @@
|
||||
\node[talentname] at ($(\arabic{talentx}*4.5,-\arabic{talenty}*4.9) + (0.1,-0.1)$) {%
|
||||
\small \hspace*{-6pt} \checkbox %
|
||||
\settowidth{\textlength}{\footnotesize \texttn{{\uppercase{#1}}}}%
|
||||
\ifdim\textlength > 74pt
|
||||
\ifdim\nodeheight > 15pt
|
||||
\\ \phantom{t}
|
||||
\fi
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user