# HG changeset patch # User spq@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1215775511 0 # Node ID fc6713d72b802b741478a9f59657a007fdf265b6 # Parent cb87d40e93420b4744c1b5cdebd6346cd48737eb add setter for nodes diff -r cb87d40e9342 -r fc6713d72b80 engine/core/view/renderers/genericrenderer.cpp --- a/engine/core/view/renderers/genericrenderer.cpp Fri Jul 11 11:00:10 2008 +0000 +++ b/engine/core/view/renderers/genericrenderer.cpp Fri Jul 11 11:25:11 2008 +0000 @@ -66,25 +66,54 @@ } void GenericRendererNode::setAttached(Instance* attached_instance, const Location &relative_location, const Point &relative_point) { + m_instance = attached_instance; + m_location = relative_location; + m_point = relative_point; } void GenericRendererNode::setAttached(Instance* attached_instance, const Location &relative_location) { + m_instance = attached_instance; + m_location = relative_location; } void GenericRendererNode::setAttached(Instance* attached_instance, const Point &relative_point) { + m_instance = attached_instance; + m_point = relative_point; } void GenericRendererNode::setAttached(Instance* attached_instance) { + m_instance = attached_instance; } void GenericRendererNode::setAttached(const Location &attached_location, const Point &relative_point) { + m_instance = NULL; + m_location = attached_location; + m_point = relative_point; } void GenericRendererNode::setAttached(const Location &attached_location) { + m_instance = NULL; + m_location = attached_location; } void GenericRendererNode::setAttached(const Point &attached_point) { + m_instance = NULL; + m_location = NULL; + m_point = attached_point; } void GenericRendererNode::setRelative(const Location &relative_location) { + if(m_instance == NULL) { + throw NotSupported("No instance attached."); + } + m_location = relative_location; } void GenericRendererNode::setRelative(const Location &relative_location, Point relative_point) { + if(m_instance == NULL) { + throw NotSupported("No instance attached."); + } + m_location = relative_location; + m_point = relative_point; } void GenericRendererNode::setRelative(const Point &relative_point) { + if(m_instance == NULL or m_location == NULL) { + throw NotSupported("No instance or location attached."); + } + m_point = relative_point; } Instance* GenericRendererNode::getAttachedInstance() {