Package com.threerings.whirled.spot.tools

Examples of com.threerings.whirled.spot.tools.EditablePortal


        // adjust the center screen coordinate so that it is positioned at
        // the closest full coordinate where a portal may be placed
        Point p = _panel.getFullCoords(centerx, centery);

        // configure the portal with these full coordinates
        _portal = new EditablePortal();
        _portal.loc = new StageLocation(p.x, p.y, (byte)DirectionCodes.NORTH);

        // we want to listen to drags and clicks
        _panel.addMouseListener(this);
        _panel.addMouseMotionListener(this);
View Full Code Here


    protected void writeSceneData (SpotSceneModel model, DataWriter writer)
        throws SAXException
    {
        // write out the portal info
        for (Portal portal : model.portals) {
            EditablePortal port = (EditablePortal)portal;
            AttributesImpl attrs = new AttributesImpl();
            attrs.addAttribute("", "portalId", "", "",
                               String.valueOf(port.portalId));
            addPortalLocationAttributes(port.loc, attrs);
            maybeAddAttr(attrs, "name", port.name);
View Full Code Here

            // mouse button three is delete
            if (event.getButton() == MouseEvent.BUTTON3) {
                deletePortal(fcoords.x, fcoords.y);
            } else {
                // if they clicked on an existing portal...
                EditablePortal portal = (EditablePortal)
                    getPortal(fcoords.x, fcoords.y);
                if (portal != null) {
                    // ...edit it...
                    editPortal(portal);
                } else {
View Full Code Here

TOP

Related Classes of com.threerings.whirled.spot.tools.EditablePortal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.