Back to Evolution Project page
00001 #include "ScreenLevelEditor.h" 00002 #include "Screen.h" 00003 #include "configs.h" 00004 #include <unistd.h> 00005 00006 int 00007 TScreenLevelEditor::Show() { 00008 /* 00009 CL_ClipRect rectmouse; 00010 int i; 00011 tile_bg(); 00012 do { 00013 //Get input 00014 CL_System::keep_alive(); 00015 if (CL_Mouse::left_pressed()) { 00016 rectmouse.m_x1 = rectmouse.m_x2 = CL_Mouse::get_x(); 00017 rectmouse.m_y1 = rectmouse.m_y2 = CL_Mouse::get_y(); 00018 OnMouseLeftClick(rectmouse); 00019 } else if (CL_Mouse::right_pressed()) { 00020 rectmouse.m_x1 = rectmouse.m_x2 = CL_Mouse::get_x(); 00021 rectmouse.m_y1 = rectmouse.m_y2 = CL_Mouse::get_y(); 00022 OnMouseRightClick(rectmouse); 00023 } else if (CL_Keyboard::get_keycode(CL_KEY_Q)) { 00024 break; 00025 } 00026 //Draw the screen 00027 draw_windows(); 00028 } while (1); 00029 00030 */ 00031 00032 execlp(LEVEL_EDITOR_PROGRAM, ""); 00033 tile_bg(); 00034 font->print_left(10, 10, "Level editor screen!!!!"); 00035 CL_Display::flip_display(); 00036 // wait_for_key(CL_KEY_ESCAPE); 00037 00038 return SCREEN_QUIT; 00039 } 00040 00041 /* 00042 void 00043 TScreenLevelEditor::draw_windows(){ 00044 wnd_level->Draw(); 00045 wnd_messages->Draw(); 00046 wnd_objlist->Draw(); 00047 wnd_objproperties->Draw(); 00048 wnd_sbup1->Draw(); 00049 wnd_sbup2->Draw(); 00050 wnd_sbdw1->Draw(); 00051 wnd_sbdw2->Draw(); 00052 } 00053 00054 void 00055 TScreenLevelEditor::OnMouseLeftClick(const CL_ClipRect& rectmouse){ 00056 if (wnd_sbup1->rect->test_all_clipped(rectmouse)){ //scrollbar up1 pressed 00057 return; 00058 } 00059 return; 00060 } 00061 void 00062 TScreenLevelEditor::OnMouseRightClick(const CL_ClipRect& rectmouse){ 00063 return; 00064 } 00065 00066 */