simpleed.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Flexlay - A Generic 2D Game Editor
  2. // Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. #if 0
  17. int main()
  18. {
  19. Flexlay flexlay;
  20. flexlay.init();
  21. Editor editor;
  22. GUIManager* gui = editor.get_gui_manager();
  23. new CL_Button(CL_Rect(CL_Point(50, 50),
  24. CL_Size(100, 25)),
  25. "Hello World", gui->get_component());
  26. EditorMap m;
  27. Tileset tileset(32);
  28. TilemapLayer tilemap(tileset, 20, 10);
  29. m.add_layer(tilemap.to_layer());
  30. TilemapLayer::set_current(tilemap);
  31. EditorMapComponent editor_map(CL_Rect(0, 0, 799, 599), gui->get_component());
  32. Workspace workspace(799, 599);
  33. editor_map.set_workspace(workspace);
  34. workspace.set_map(m);
  35. new CL_Button(CL_Rect(CL_Point(50, 150),
  36. CL_Size(100, 25)),
  37. "Quit", gui->get_component());
  38. gui->run();
  39. flexlay.deinit();
  40. }
  41. #endif
  42. /* EOF */