Frontend for viewing Dungeon Defender layouts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Dungeon Defenders Viewer</title>
  5. <script src="res/js/jquery-1.7.1.min.js" type="text/javascript"></script>
  6. <script src="res/js/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>
  7. <script src="res/data/towers.js" type="text/javascript"></script>
  8. <script type="text/javascript">
  9. $(function() {
  10. $.each(towers, function() {
  11. $('<img>')
  12. .attr('src', this.image)
  13. .attr('alt', this.name)
  14. .addClass('tower')
  15. .appendTo($('#palette'));
  16. });
  17. $('.tower,.core').draggable({
  18. helper: 'clone',
  19. containment: 'window',
  20. stop: function(evt, ui) {
  21. $(this).clone()
  22. .draggable()
  23. .css('position', 'absolute')
  24. .offset(ui.helper.offset())
  25. .appendTo(document.body);
  26. }
  27. });
  28. });
  29. </script>
  30. <style type="text/css">
  31. .tower { width: 40px; height: 40px; }
  32. </style>
  33. </head>
  34. <body>
  35. <img src="res/images/minimaps/Level1.png" alt="Level 1 minimap" id="map">
  36. <img src="res/images/coreIcon.png" alt="core" class="core">
  37. <div id="palette">
  38. </div>
  39. </body>
  40. </html>