diff options
author | pixel <pixel> | 2004-07-17 10:08:16 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-07-17 10:08:16 +0000 |
commit | d2109565408c6be469642b5aafc2f2efe71a632f (patch) | |
tree | da7d8be56755bbfbf77240b340a9add48448598a /lib | |
parent | 14271a8d758c086e0762e7ad0d649dabc8848191 (diff) |
Starting up Dalos
Diffstat (limited to 'lib')
-rw-r--r-- | lib/glbase.cc | 5 | ||||
-rw-r--r-- | lib/widgets.cc | 13 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/glbase.cc b/lib/glbase.cc index a404f8e..cbb1927 100644 --- a/lib/glbase.cc +++ b/lib/glbase.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: glbase.cc,v 1.19 2004-07-15 14:21:31 pixel Exp $ */ +/* $Id: glbase.cc,v 1.20 2004-07-17 10:08:16 pixel Exp $ */ #include <stdio.h> #include <SDL.h> @@ -71,9 +71,6 @@ mogltk::glbase::glbase(int w, int h, int flags) throw (GeneralException) : moglt printm(M_INFO, String("Version : ") + (char *) glGetString(GL_VERSION) + "\n"); printm(M_INFO, String("Extensions: ") + (char *) glGetString(GL_EXTENSIONS) + "\n"); - Output e("ext.txt"); - e.write(glGetString(GL_EXTENSIONS), strlen((char *) glGetString(GL_EXTENSIONS))); - glViewport(0, 0, surface->w, surface->h); glCullFace(GL_BACK); diff --git a/lib/widgets.cc b/lib/widgets.cc index 3298385..9d62bd9 100644 --- a/lib/widgets.cc +++ b/lib/widgets.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: widgets.cc,v 1.7 2004-07-16 15:04:53 pixel Exp $ */ +/* $Id: widgets.cc,v 1.8 2004-07-17 10:08:16 pixel Exp $ */ #include <SDL.h> #include <vector> @@ -900,11 +900,10 @@ bool mogltk::widgets::ContextMenu::process_event(int xe, int ye, mogltk::event_t action * a; int n; - selected = -1; - switch (event) { case E_MOUSE_MOVE: sticky = false; + selected = -1; for (i = nodes.begin(), n = 0; i != nodes.end(); i++, n++) { if (!i->GetLine()) { int ax, ax2, ay, ay2; @@ -985,6 +984,10 @@ String mogltk::widgets::Menu::node::GetCaption() { return caption; } +void mogltk::widgets::Menu::node::SetCaption(const String & s) { + caption = s; +} + mogltk::widgets::ContextMenu * mogltk::widgets::Menu::node::GetSub() { return sub; } @@ -1037,6 +1040,10 @@ void mogltk::widgets::Menu::SetEnabled(int i, bool e) { nodes[i].SetEnabled(e); } +void mogltk::widgets::Menu::SetCaption(int i, const String & s) { + nodes[i].SetCaption(s); +} + void mogltk::widgets::Menu::draw(void) { std::vector<node>::iterator i; int n; |