[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_arrow.cc,1.3,1.
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_arrow.cc,1.3,1.4 dlg_circle.cc,1.5,1.6 dlg_circle_entry.cc,1.4,1.5 dlg_module.cc,1.7,1.8 dlg_module.h,1.7,1.8 gui_dlgedit.cc,1.7,1.8 gui_dlgedit.h,1.6,1.7 gui_graph.cc,1.6,1.7 gui_graph.h,1.6,1.7 gui_graph_events.cc,1.2,1.3 gui_list.cc,1.3,1.4 gui_messages.cc,1.3,1.4 gui_tooltip.cc,1.2,1.3 kb_traverse.cc,1.2,1.3 |
Date: |
Thu, 24 Oct 2002 16:12:59 -0400 |
Update of /cvsroot/adonthell/adonthell/src/tools/dlgedit
In directory subversions:/tmp/cvs-serv25665
Modified Files:
dlg_arrow.cc dlg_circle.cc dlg_circle_entry.cc dlg_module.cc
dlg_module.h gui_dlgedit.cc gui_dlgedit.h gui_graph.cc
gui_graph.h gui_graph_events.cc gui_list.cc gui_messages.cc
gui_tooltip.cc kb_traverse.cc
Log Message:
FIXED bug that prevented conditions from being removed
ADDED some sub-dialogue stuff. Still in very early state and quite buggy.
Index: dlg_arrow.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_arrow.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** dlg_arrow.cc 1 Jul 2002 13:53:59 -0000 1.3
--- dlg_arrow.cc 24 Oct 2002 20:12:56 -0000 1.4
***************
*** 69,73 ****
DlgPoint start = prev_.front ()->center ();
DlgPoint end = next_.front ()->center ();
!
// gradient of line
int x = start.x () - end.x ();
--- 69,73 ----
DlgPoint start = prev_.front ()->center ();
DlgPoint end = next_.front ()->center ();
!
// gradient of line
int x = start.x () - end.x ();
***************
*** 79,83 ****
float b = y / s;
! DlgPoint line0 = start.offset ((int)(-10.0f * a), (int)(-10.0f * b));
DlgPoint line1 = end.offset ((int)(10.0f * a), (int)(10.0f * b));
--- 79,83 ----
float b = y / s;
! DlgPoint line0 = start.offset ((int)(-10.0f * a), (int)(-10.0f * b));
DlgPoint line1 = end.offset ((int)(10.0f * a), (int)(10.0f * b));
Index: dlg_circle.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dlg_circle.cc 17 Oct 2002 10:08:42 -0000 1.5
--- dlg_circle.cc 24 Oct 2002 20:12:56 -0000 1.6
***************
*** 80,84 ****
// offset circle
DlgPoint position = topLeft ().offset (os);
! DlgRect area (position, CIRCLE_DIAMETER+1, CIRCLE_DIAMETER+1);
// draw everything to the surface
--- 80,84 ----
// offset circle
DlgPoint position = topLeft ().offset (os);
! DlgRect area (position, width () + 1, height () + 1);
// draw everything to the surface
***************
*** 86,90 ****
gdk_draw_arc (surface, gc, FALSE, position.x (), position.y (), 20, 20,
0, 36000);
! // Indicate wether node contains additional code
if (hasCode () || entry_->loop ())
{
--- 86,90 ----
gdk_draw_arc (surface, gc, FALSE, position.x (), position.y (), 20, 20,
0, 36000);
! // Indicate whether node contains additional code
if (hasCode () || entry_->loop ())
{
***************
*** 98,103 ****
// place text in circles center
! int x = position.x () + (20 - gdk_string_width (font, code->str)) / 2;
! int y = position.y () + (21 + gdk_string_height (font, code->str)) /
2;
gdk_draw_string (surface, font, gc, x, y, code->str);
--- 98,103 ----
// place text in circles center
! int x = position.x () + (width () - gdk_string_width (font,
code->str)) / 2;
! int y = position.y () + (height () + 1 + gdk_string_height (font,
code->str)) / 2;
gdk_draw_string (surface, font, gc, x, y, code->str);
Index: dlg_circle_entry.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle_entry.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** dlg_circle_entry.cc 25 Jun 2002 16:25:52 -0000 1.4
--- dlg_circle_entry.cc 24 Oct 2002 20:12:56 -0000 1.5
***************
*** 76,80 ****
void DlgCircleEntry::setCondition (std::string c)
{
! if (c == "") return;
// remove all whitespace from the edges of the condition
--- 76,84 ----
void DlgCircleEntry::setCondition (std::string c)
{
! if (c == "")
! {
! condition_ = c;
! return;
! }
// remove all whitespace from the edges of the condition
Index: dlg_module.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_module.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dlg_module.cc 21 Oct 2002 20:10:30 -0000 1.7
--- dlg_module.cc 24 Oct 2002 20:12:56 -0000 1.8
***************
*** 20,28 ****
*/
#include <algorithm>
#include "dlg_module.h"
#include "dlg_circle.h"
#include "dlg_arrow.h"
! #include "dlg_cmdline.h"
// ctor
--- 20,29 ----
*/
+ #include <gtk/gtk.h>
#include <algorithm>
#include "dlg_module.h"
#include "dlg_circle.h"
#include "dlg_arrow.h"
! #include "gui_dlgedit.h"
// ctor
***************
*** 47,50 ****
--- 48,63 ----
}
+ // calculate shape of sub-dialogue
+ void DlgModule::initShape (DlgPoint ¢er)
+ {
+ // calculate width of the module icon
+ GdkFont *font = GuiDlgedit::window->font ();
+ int width = gdk_string_width (font, name ().c_str ()) + 10;
+
+ // align module to the (imaginary) grid and set shape
+ top_left = center.offset (-width/2 - (center.x () % CIRCLE_DIAMETER),
-(center.y () % CIRCLE_DIAMETER));
+ resize (width, 20);
+ }
+
// select a given node
bool DlgModule::selectNode (DlgNode *node)
***************
*** 165,168 ****
--- 178,207 ----
}
+ // draw the module
+ void DlgModule::draw (GdkPixmap *surface, DlgPoint &offset)
+ {
+ // get the color for drawing the circle
+ GdkGC *gc = GuiDlgedit::window->getColor (mode_, type_);
+
+ // offset circle
+ DlgPoint position = topLeft ().offset (offset);
+ DlgRect area (position, width () + 1, height () + 1);
+
+ // draw everything to the surface
+ gdk_draw_rectangle (surface, GuiDlgedit::window->getColor (GC_WHITE),
TRUE, position.x (), position.y (), width (), height ());
+ gdk_draw_rectangle (surface, gc, FALSE, position.x (), position.y (),
width (), height ());
+
+ // get the font to draw name
+ GdkFont *font = GuiDlgedit::window->font ();
+
+ // place text in module's center
+ int x = position.x () + 5;
+ int y = position.y () + (height () + gdk_string_height (font, name
().c_str ())) / 2;
+ gdk_draw_string (surface, font, gc, x, y, name ().c_str ());
+
+ // Update the drawing area
+ GuiDlgedit::window->graph ()->update (area);
+ }
+
// Get extension of the graph for proper displaying
void DlgModule::extension (int &min_x, int &max_x, int &y)
***************
*** 190,197 ****
std::string s;
- // load the default project if there is one
- if (DlgCmdline::project != "")
- entry_.setProject (DlgCmdline::project);
-
// load all nodes and toplevel items
while (i)
--- 229,232 ----
Index: dlg_module.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_module.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dlg_module.h 21 Oct 2002 20:10:30 -0000 1.7
--- dlg_module.h 24 Oct 2002 20:12:56 -0000 1.8
***************
*** 23,27 ****
#define DLG_MODULE_H
- #include "dlg_node.h"
#include "dlg_module_entry.h"
#include "kb_traverse.h"
--- 23,26 ----
***************
*** 44,47 ****
--- 43,54 ----
*/
DlgModule (std::string p, std::string n, std::string s, std::string d);
+
+ /**
+ * Calculate this module's shape. The shape is a rectangle centered
+ * around the given DlgPoint. It is large enough to display the
+ * module's name.
+ * @param center The point to center the module shape around.
+ */
+ void initShape (DlgPoint ¢er);
/**
***************
*** 51,55 ****
* @param offset the DlgPoint to use as offset
*/
! void draw (GdkPixmap *surface, DlgPoint &offset) { }
/**
--- 58,62 ----
* @param offset the DlgPoint to use as offset
*/
! void draw (GdkPixmap *surface, DlgPoint &offset);
/**
***************
*** 206,210 ****
bool changed_; // Whether there were changes since saving
int nid_; // Id to use for the next new node
!
std::string name_; // Short (file-) name of the dialogue
std::string path_; // Path of the dialogue
--- 213,217 ----
bool changed_; // Whether there were changes since saving
int nid_; // Id to use for the next new node
!
std::string name_; // Short (file-) name of the dialogue
std::string path_; // Path of the dialogue
Index: gui_dlgedit.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_dlgedit.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** gui_dlgedit.cc 22 Oct 2002 15:20:40 -0000 1.7
--- gui_dlgedit.cc 24 Oct 2002 20:12:56 -0000 1.8
***************
*** 411,415 ****
if (!module->load ())
{
! message->display (-2, filename.c_str ());
closeDialogue ();
}
--- 411,415 ----
if (!module->load ())
{
! message->display (-3, filename.c_str ());
closeDialogue ();
}
***************
*** 426,429 ****
--- 426,463 ----
}
+ // load a sub-dialogue
+ DlgModule* GuiDlgedit::loadSubdialogue (std::string file)
+ {
+ // test if we have a valid dialogue
+ if (!checkDialogue (file)) return NULL;
+
+ // remember the current directory for later use
+ directory_ = g_dirname (file.c_str ());
+
+ // get the name to use for the dialogue
+ std::string filename = g_basename (file.c_str ());
+
+ // remove file extension
+ unsigned int pos = filename.rfind (FILE_EXT);
+ if (pos != filename.npos) filename.erase (pos);
+
+ // the sub-dialogue
+ DlgModule *module = new DlgModule (directory_, filename, "", "");
+
+ // try to load from file
+ if (!module->load ())
+ {
+ delete module;
+ message->display (-3, filename.c_str ());
+ return NULL;
+ }
+
+ // loading successful
+ message->display (202);
+
+ // return the sub-dialogue
+ return module;
+ }
+
// save a dialogue
void GuiDlgedit::saveDialogue (std::string file)
***************
*** 933,937 ****
case IDLE:
{
! if (type == NPC || type == LINK) return color[GC_BLACK];
else if (type == NARRATOR) return color[GC_DARK_GREEN];
else return color[GC_DARK_BLUE];
--- 967,971 ----
case IDLE:
{
! if (type == NPC || type == LINK || type == MODULE) return
color[GC_BLACK];
else if (type == NARRATOR) return color[GC_DARK_GREEN];
else return color[GC_DARK_BLUE];
***************
*** 942,946 ****
case NODE_SELECTED:
{
! if (type == NPC || type == LINK) return color[GC_DARK_RED];
else if (type == NARRATOR) return color[GC_YELLOW];
else return color[GC_RED];
--- 976,980 ----
case NODE_SELECTED:
{
! if (type == NPC || type == LINK || type == MODULE) return
color[GC_DARK_RED];
else if (type == NARRATOR) return color[GC_YELLOW];
else return color[GC_RED];
Index: gui_dlgedit.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_dlgedit.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** gui_dlgedit.h 22 Oct 2002 15:20:40 -0000 1.6
--- gui_dlgedit.h 24 Oct 2002 20:12:56 -0000 1.7
***************
*** 113,120 ****
void newDialogue ();
/**
! * Load a dialogue from a file
* @param file Filename (and path) of the dialogue to load.
*/
void loadDialogue (std::string file);
/**
* Save a dialogue to file
--- 113,128 ----
void newDialogue ();
/**
! * Load a (top level) dialogue from a file
* @param file Filename (and path) of the dialogue to load.
*/
void loadDialogue (std::string file);
+ /**
+ * Load a sub-dialogue from a file. Sub-dialogues are not
+ * directly available for editing; instead they become part
+ * of a (top level) dialogue.
+ * @param file Filename (and path) of the dialogue to load.
+ * @return the sub-dialogue, or \b NULL if loading failed.
+ */
+ DlgModule* loadSubdialogue (std::string file);
/**
* Save a dialogue to file
Index: gui_graph.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** gui_graph.cc 17 Oct 2002 10:08:42 -0000 1.6
--- gui_graph.cc 24 Oct 2002 20:12:56 -0000 1.7
***************
*** 21,27 ****
--- 21,29 ----
#include <gtk/gtk.h>
+ #include "cfg_data.h"
#include "dlg_mover.h"
#include "gui_dlgedit.h"
#include "gui_circle.h"
+ #include "gui_file.h"
#include "gui_graph_events.h"
***************
*** 74,78 ****
// set the size of the dialogue
! module->resize (graph->allocation.width, graph->allocation.height);
// display the module
--- 76,80 ----
// set the size of the dialogue
! drawing_area.resize (graph->allocation.width, graph->allocation.height);
// display the module
***************
*** 102,106 ****
bool GuiGraph::newCircle (DlgPoint &point, node_type type)
{
! // if there is no module assigned to the view, there is nothing to select
if (module == NULL) return false;
--- 104,108 ----
bool GuiGraph::newCircle (DlgPoint &point, node_type type)
{
! // if there is no module assigned to the view, there is nothing to do
if (module == NULL) return false;
***************
*** 129,133 ****
bool GuiGraph::newArrow (DlgPoint &point)
{
! // if there is no module assigned to the view, there is nothing to select
if (module == NULL) return false;
--- 131,135 ----
bool GuiGraph::newArrow (DlgPoint &point)
{
! // if there is no module assigned to the view, there is nothing to do
if (module == NULL) return false;
***************
*** 184,187 ****
--- 186,223 ----
}
+ // add a new subdialogue
+ bool GuiGraph::newModule (DlgPoint &point)
+ {
+ // if there is no module assigned to the view, there is nothing to do
+ if (module == NULL) return false;
+
+ // if a project root exists, use that in file selector
+ std::string dir = CfgData::data->getBasedir (module->entry ()->project
());
+
+ // otherwise revert to directory last opened
+ if (dir == "") dir = GuiDlgedit::window->directory ();
+
+ // allow the user to select a module
+ GuiFile fs = GuiFile (FS_LOAD, "Select sub-dialogue to add", dir + "/");
+ if (fs.run ())
+ {
+ DlgModule *subdlg = GuiDlgedit::window ->loadSubdialogue
(fs.getSelection());
+
+ if (subdlg == NULL) return false;
+
+ // draw the sub-dialogue
+ subdlg->initShape (point);
+ subdlg->draw (surface, *offset);
+
+ // update the module
+ module->setChanged ();
+ module->addNode (subdlg);
+
+ return true;
+ }
+
+ return false;
+ }
+
// delete the selected node
bool GuiGraph::deleteNode ()
***************
*** 245,248 ****
--- 281,287 ----
if (module == NULL) return false;
+ // is point within module's boundaries?
+ if (!drawing_area.contains (point)) return false;
+
// calculate absolute position of the point
point.move (-offset->x (), -offset->y ());
***************
*** 273,288 ****
DlgNode *parent = module->traverse ()->up ();
// if we have it, then select it
! if (parent)
! {
! deselectNode ();
! return selectNode (parent);
! }
}
// if no node is selected, we simply select the first one
! else return selectRoot ();
!
! return false;
}
--- 312,324 ----
DlgNode *parent = module->traverse ()->up ();
+ // deselect current
+ deselectNode ();
+
// if we have it, then select it
! if (parent) return selectNode (parent);
}
// if no node is selected, we simply select the first one
! return selectRoot ();
}
***************
*** 394,405 ****
int x, y;
! x = module->width () / 5;
! y = module->height () / 5;
// is node outside the views inner 60% ?
! if (!module->inflate (-x, -y).contains (pos))
{
// then move the view so it is centered on the given point
! DlgPoint o (-(pos.x()-module->width()/2),
-(pos.y()-module->height()/2));
offset->move (o);
--- 430,441 ----
int x, y;
! x = drawing_area.width () / 5;
! y = drawing_area.height () / 5;
// is node outside the views inner 60% ?
! if (!drawing_area.inflate (-x, -y).contains (pos))
{
// then move the view so it is centered on the given point
! DlgPoint o (-(pos.x()-drawing_area.width()/2),
-(pos.y()-drawing_area.height()/2));
offset->move (o);
***************
*** 480,485 ****
if (node->type () != LINK)
{
! // circles can be dragged directly
! mover = (DlgCircle *) node;
// remove any tooltip, as it only gets in the way
--- 516,521 ----
if (node->type () != LINK)
{
! // circles and modules can be dragged directly
! mover = node;
// remove any tooltip, as it only gets in the way
***************
*** 584,595 ****
}
// clear mover
mover = NULL;
- // update everything
- GuiDlgedit::window->list ()->display (module->selected ());
- GuiDlgedit::window->setMode (NODE_SELECTED);
- module->setMode (NODE_SELECTED);
- module->setChanged ();
draw ();
}
--- 620,637 ----
}
+ // update everything
+ if (mover->type() == MODULE)
+ deselectNode ();
+ else
+ {
+ GuiDlgedit::window->list ()->display (module->selected ());
+ GuiDlgedit::window->setMode (NODE_SELECTED);
+ module->setMode (NODE_SELECTED);
+ module->setChanged ();
+ }
+
// clear mover
mover = NULL;
draw ();
}
***************
*** 608,614 ****
if (GuiDlgedit::window->getColor (GC_GREY)) clear ();
! // set the size of the attached dialogue
! if (module) module->resize (widget->allocation.width,
! widget->allocation.height);
}
--- 650,655 ----
if (GuiDlgedit::window->getColor (GC_GREY)) clear ();
! // set the size of the attached dialogues
! drawing_area.resize (widget->allocation.width, widget->allocation.height);
}
***************
*** 651,656 ****
t.x = -offset->x ();
t.y = -offset->y ();
! t.width = module->width ();
! t.height = module->height ();
DlgRect rect (t);
--- 692,697 ----
t.x = -offset->x ();
t.y = -offset->y ();
! t.width = drawing_area.width ();
! t.height = drawing_area.height ();
DlgRect rect (t);
***************
*** 733,738 ****
if (point.x () < 20) scroll_x = 15;
if (point.y () < 20) scroll_y = 15;
! if (point.x () + 20 > graph->allocation.width) scroll_x = -15;
! if (point.y () + 20 > graph->allocation.height) scroll_y = -15;
// enable scrolling
--- 774,779 ----
if (point.x () < 20) scroll_x = 15;
if (point.y () < 20) scroll_y = 15;
! if (point.x () + 20 > drawing_area.width ()) scroll_x = -15;
! if (point.y () + 20 > drawing_area.height ()) scroll_y = -15;
// enable scrolling
Index: gui_graph.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** gui_graph.h 14 Oct 2002 17:34:32 -0000 1.6
--- gui_graph.h 24 Oct 2002 20:12:56 -0000 1.7
***************
*** 107,110 ****
--- 107,117 ----
bool newArrow (DlgPoint &pos);
/**
+ * Insert a subdialogue at the given position. Note that the position is
+ * already relative to the graph's origin.
+ * @param pos Current cursor position.
+ * @return \b true if a subdialogue could be added, \b false otherwise.
+ */
+ bool newModule (DlgPoint &pos);
+ /**
* Edit currently selected node.
* @return <b>true</b> if editing was successful, <b>false</b> otherwise.
***************
*** 262,265 ****
--- 269,273 ----
GtkWidget *graph; // Drawing Area
GdkPixmap *surface; // Drawing surface
+ DlgRect drawing_area; // Size of the Drawing Area
GuiTooltip *tooltip; // Tooltip for displaying node-text
bool scrolling; // Indicates whether autoscrolling is active
Index: gui_graph_events.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph_events.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gui_graph_events.cc 7 Apr 2002 09:51:28 -0000 1.2
--- gui_graph_events.cc 24 Oct 2002 20:12:56 -0000 1.3
***************
*** 70,74 ****
// If nothing selected, see if we're over a node
if (graph->mode () == IDLE)
! graph->selectNode (point);
// Edit node
--- 70,77 ----
// If nothing selected, see if we're over a node
if (graph->mode () == IDLE)
! if (!graph->selectNode (point))
! // create a submodule, if we aren't
! graph->newModule (point);
!
// Edit node
***************
*** 275,283 ****
case GDK_Return:
{
// ignore edit command if in preview mode
if (GuiDlgedit::window->mode () == L10N_PREVIEW)
break;
!
! graph->editNode ();
break;
}
--- 278,301 ----
case GDK_Return:
{
+ int x, y;
+
// ignore edit command if in preview mode
if (GuiDlgedit::window->mode () == L10N_PREVIEW)
break;
!
! // get cursoer position
! gtk_widget_get_pointer (graph->drawingArea (), &x, &y);
! DlgPoint point (x, y);
!
! // If nothing selected, see if we're over a node
! if (graph->mode () == IDLE)
! if (!graph->selectNode (point))
! // create a submodule, if we aren't
! graph->newModule (point);
!
! // Edit node
! if (graph->mode () == NODE_SELECTED)
! graph->editNode ();
!
break;
}
Index: gui_list.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_list.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** gui_list.cc 12 Oct 2002 18:51:33 -0000 1.3
--- gui_list.cc 24 Oct 2002 20:12:56 -0000 1.4
***************
*** 64,68 ****
{
// make sure we have a valid node
! if (node == NULL) return;
DlgCircle *circle, *c;
--- 64,68 ----
{
// make sure we have a valid node
! if (node == NULL || node->type() == MODULE) return;
DlgCircle *circle, *c;
Index: gui_messages.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_messages.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** gui_messages.cc 12 Oct 2002 18:51:33 -0000 1.3
--- gui_messages.cc 24 Oct 2002 20:12:56 -0000 1.4
***************
*** 63,66 ****
--- 63,67 ----
messages[200] = " Loading successful";
messages[201] = " Saving successful";
+ messages[202] = " Sub-dialogue loaded successfully";
messages[210] = " Settings updated";
***************
*** 75,79 ****
messages[-3] = " Could not load '%s'. Either this is no dialogue
source, or it has been corrupted";
messages[-4] = " Saving of '%s' failed.";
!
messages[-100] = " Cannot connect two PLAYER Circles";
--- 76,80 ----
messages[-3] = " Could not load '%s'. Either this is no dialogue
source, or it has been corrupted";
messages[-4] = " Saving of '%s' failed.";
!
messages[-100] = " Cannot connect two PLAYER Circles";
Index: gui_tooltip.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_tooltip.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gui_tooltip.cc 7 Apr 2002 09:51:28 -0000 1.2
--- gui_tooltip.cc 24 Oct 2002 20:12:56 -0000 1.3
***************
*** 45,49 ****
// get the text
! if (n->type () != LINK) text = ((DlgCircle *) n)->tooltip ();
// label with the text
--- 45,64 ----
// get the text
! switch (n->type ())
! {
! case NPC:
! case PLAYER:
! case NARRATOR:
! {
! text = ((DlgCircle *) n)->tooltip ();
! break;
! }
! case MODULE:
! {
! text = ((DlgModule *) n)->entry ()->description ();
! break;
! }
! default: break;
! }
// label with the text
Index: kb_traverse.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/kb_traverse.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** kb_traverse.cc 17 Oct 2002 10:08:42 -0000 1.2
--- kb_traverse.cc 24 Oct 2002 20:12:56 -0000 1.3
***************
*** 190,193 ****
--- 190,196 ----
std::vector<DlgNode*>::iterator i;
+ // cleanup
+ clear ();
+
// find all the root nodes
for (i = nodes->begin (); i != nodes->end (); i++)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_arrow.cc,1.3,1.4 dlg_circle.cc,1.5,1.6 dlg_circle_entry.cc,1.4,1.5 dlg_module.cc,1.7,1.8 dlg_module.h,1.7,1.8 gui_dlgedit.cc,1.7,1.8 gui_dlgedit.h,1.6,1.7 gui_graph.cc,1.6,1.7 gui_graph.h,1.6,1.7 gui_graph_events.cc,1.2,1.3 gui_list.cc,1.3,1.4 gui_messages.cc,1.3,1.4 gui_tooltip.cc,1.2,1.3 kb_traverse.cc,1.2,1.3,
Kai Sterker <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/doc/dlgedit dlgedit.dxt,1.7,1.8
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_arrow.cc,1.4,1.5 dlg_arrow.h,1.4,1.5
- Previous by thread:
[Adonthell-commits] CVS: adonthell/doc/dlgedit dlgedit.dxt,1.7,1.8
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_arrow.cc,1.4,1.5 dlg_arrow.h,1.4,1.5
- Index(es):