Functional main menu

dev-ui
krzys-h 2014-03-09 17:25:01 +01:00
parent 4486d47a2f
commit 6fb4719614
3 changed files with 28 additions and 3 deletions

View File

@ -87,7 +87,7 @@
<Image name="Head2" width="128" height="128" xPos="512" yPos="640" />
<Image name="Head3" width="128" height="128" xPos="640" yPos="640" />
<Image name="Head4" width="128" height="128" xPos="768" yPos="640" />
<Image name="ShieldContract" width="128" height="128" xPos="896" yPos="640" />
<Image name="ShieldWithdraw" width="128" height="128" xPos="896" yPos="640" />
<Image name="Right" width="128" height="128" xPos="0" yPos="768" />
<Image name="Top" width="128" height="128" xPos="128" yPos="768" />

View File

@ -2,8 +2,28 @@
<GUILayout version="4">
<Window type="DefaultWindow" name="mainmenu_root">
<Window type="Colobot/TextButton" name="missions_button">
<Property name="Area" value="{{0.41,0},{0.1975, 0},{0.59,0},{0.264166667,0}}" />
<Property name="Disabled" value="false" />
<Property name="Area" value="{{0.41,0},{0.197500, 0},{0.59,0},{0.264167,0}}" />
</Window>
<Window type="Colobot/TextButton" name="freegame_button">
<Property name="Area" value="{{0.41,0},{0.275417, 0},{0.59,0},{0.342083,0}}" />
</Window>
<Window type="Colobot/TextButton" name="exercises_button">
<Property name="Area" value="{{0.41,0},{0.360417, 0},{0.59,0},{0.427083,0}}" />
</Window>
<Window type="Colobot/TextButton" name="challenges_button">
<Property name="Area" value="{{0.41,0},{0.438333, 0},{0.59,0},{0.505000,0}}" />
</Window>
<Window type="Colobot/TextButton" name="userlvl_button">
<Property name="Area" value="{{0.6984375,0},{0.28125, 0},{0.7884375,0},{0.347916667,0}}" />
</Window>
<Window type="Colobot/TextButton" name="setup_button">
<Property name="Area" value="{{0.41,0},{0.565833, 0},{0.59,0},{0.632500,0}}" />
</Window>
<Window type="Colobot/TextButton" name="name_button">
<Property name="Area" value="{{0.41,0},{0.643750, 0},{0.59,0},{0.710417,0}}" />
</Window>
<Window type="Colobot/TextButton" name="quit_button">
<Property name="Area" value="{{0.41,0},{0.785417, 0},{0.59,0},{0.852083,0}}" />
</Window>
</Window>
</GUILayout>

View File

@ -0,0 +1,5 @@
name=$1
x=$2 # pos.y = oy+sy*x; - see maindialog.cpp
echo "<Window type=\"Colobot/TextButton\" name=\"${name}_button\">"
echo " <Property name=\"Area\" value=\"{{0.41,0},{$(bc <<< "0.927083333-(0.070833333*$x)" | awk '{printf "%f", $0}'), 0},{0.59,0},{$(bc -l <<< "0.99375-(0.070833333*${x})" | awk '{printf "%f", $0}'),0}}\" />"
echo "</Window>"