Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2008, 11:55:37 AM (16 years ago)
Author:
rgrieder
Message:

Changed initialisation of overlay classes to the new convention.
The default values of the XML parameters are set in the constructor with the setter functions!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/overlays/OverlayGroup.cc

    r2024 r2046  
    5050    SetConsoleCommand(OverlayGroup, scrollGroup, false).accessLevel(AccessLevel::User);
    5151
    52     OverlayGroup::OverlayGroup(BaseObject* creator) : BaseObject(creator)
     52    OverlayGroup::OverlayGroup(BaseObject* creator)
     53        : BaseObject(creator)
    5354    {
    5455        RegisterObject(OverlayGroup);
     56
     57        setScale(Vector2(1.0, 1.0));
     58        setScroll(Vector2(0.0, 0.0));
    5559    }
    5660
     
    7175        SUPER(OverlayGroup, XMLPort, xmlElement, mode);
    7276
    73         XMLPortParam(OverlayGroup, "scale",  setScale,  getScale,  xmlElement, mode).defaultValues(Vector2(1.0, 1.0));
    74         XMLPortParam(OverlayGroup, "scroll", setScroll, getScroll, xmlElement, mode).defaultValues(Vector2(0.0, 0.0));
     77        XMLPortParam(OverlayGroup, "scale",  setScale,  getScale,  xmlElement, mode);
     78        XMLPortParam(OverlayGroup, "scroll", setScroll, getScroll, xmlElement, mode);
    7579        // loads all the child elements
    7680        XMLPortObject(OverlayGroup, OrxonoxOverlay, "", addElement, getElement, xmlElement, mode);
Note: See TracChangeset for help on using the changeset viewer.