Q695 Posted March 27, 2009 Share Posted March 27, 2009 compass size=132X132 How do I make this compass work properly: <?php function d_button($dx, $dy){ ?> <form method="post"> <input type="hidden" name="dir_x" value="<?php echo $dx;?>"> <input type="hidden" name="dir_y" value="<?php echo $dy;?>"> <input type="image" height="44px" width="44px" onclick="submit();" src="images/invisible.gif"> </form> <?php } function direction(){ ?> <table border="0" cellpadding="0" cellspacing="0" width="132px" height="132px" background="images/compas.gif"> <tr> <td><?php d_button(-1, 1);?></td> <td><?php d_button(0, 1);?></td> <td><?php d_button(1, 1);?></td> </tr> <tr> <td><?php d_button(-1, 0);?></td> <td width="44px"><td> <td><?php d_button(1, 0);?></td> </tr> <tr> <td><?php d_button(-1, -1);?></td> <td><?php d_button(0, -1);?></td> <td><?php d_button(1, -1);?></td> </tr> </table> <?php } ?> Link to comment https://forums.phpfreaks.com/topic/151340-game-compas-spacing/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.