colobot-data/tools/cegui-generate/generate-layout-button-code.sh

6 lines
347 B
Bash
Raw Permalink Normal View History

2014-03-09 16:25:01 +00:00
name=$1
x=$2 # pos.y = oy+sy*x; - see maindialog.cpp
echo "<Window type=\"Colobot/TextButton\" name=\"${name}_button\">"
2014-03-14 18:23:12 +00:00
echo " <Property name=\"Area\" value=\"{{0.41,0},{$(bc <<< "0.927083333-(0.070833333*$x)" | awk '{printf "%f", $0}'), 0},{0.59,0},{$(bc <<< "0.99375-(0.070833333*${x})" | awk '{printf "%f", $0}'),0}}\" />"
2014-03-09 16:25:01 +00:00
echo "</Window>"