pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/editor action_window.cxx,1.4,1.5 edit


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor action_window.cxx,1.4,1.5 editor.cxx,1.10,1.11
Date: 30 Jun 2002 09:01:05 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv19242/editor

Modified Files:
        action_window.cxx editor.cxx 
Log Message:
- fixed bug in the action_window, which caused lots of duplicate actions
- added white boarder in the editor as focus indicator

Index: action_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/action_window.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- action_window.cxx   29 Jun 2002 14:01:32 -0000      1.4
+++ action_window.cxx   30 Jun 2002 09:01:02 -0000      1.5
@@ -134,6 +134,7 @@
 ActionWindow::write_data ()
 {
   std::cout << "Writing data" << std::endl;
+
   for (unsigned int i = 0; i < default_actions.size(); ++i)  
     {
       if (checkboxes[i]->is_checked ())
@@ -155,7 +156,9 @@
        }
       else
        {
-         std::remove_if (actions->begin (), actions->end (), 
is_equal(default_actions[i].name));
+         std::vector<ActionData>::iterator pos
+           = std::remove_if (actions->begin (), actions->end (), 
is_equal(default_actions[i].name));
+         actions->erase(pos, actions->end ());
        }
     }
 }

Index: editor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- editor.cxx  29 Jun 2002 16:04:22 -0000      1.10
+++ editor.cxx  30 Jun 2002 09:01:02 -0000      1.11
@@ -161,6 +161,9 @@
       draw();
       gui->show ();
       //std::cout << "GUI has Focus: " << (gui->get_focus () !=  gui) << 
std::endl;
+      if (get_gui_manager ()->get_focus () == get_gui_manager ())
+       CL_Display::draw_rect (25, 0, CL_Display::get_width (), 
CL_Display::get_height (),
+                              1.0f, 1.0f, 1.0f);
       Display::flip_display(true);
     }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]