Examples of BoardViewEvent


Examples of megamek.client.event.BoardViewEvent

        }

        highlightCursor.move(coords, game.getBoard().getHex(coords));
        firstLOSCursor.hide();
        secondLOSCursor.hide();
        processBoardViewEvent(new BoardViewEvent(this, coords, null,
                BoardViewEvent.BOARD_HEX_HIGHLIGHTED, 0));
    }
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

        if (lastCursor == null || coords == null || !coords.equals(lastCursor)) {
            lastCursor = coords;
            cursor.move(coords, game.getBoard().getHex(coords));
            firstLOSCursor.hide();
            secondLOSCursor.hide();
            processBoardViewEvent(new BoardViewEvent(this, coords, null,
                    BoardViewEvent.BOARD_HEX_CURSOR, 0));
        } else {
            lastCursor = coords;
        }
    }
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

                if (movingUnits.size() == 0) {
                    movingEntitySpriteIds.clear();
                    movingEntitySprites.clear();
                    ghostEntitySprites.clear();
                    processBoardViewEvent(new BoardViewEvent(this,
                            BoardViewEvent.FINISHED_MOVING_UNITS));
                }
            }
        }
        return movingSomething;
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

        if ((coords == null) || game.getBoard().contains(coords)) {
            setSelected(coords);
            moveCursor(selectedSprite, coords);
            moveCursor(firstLOSSprite, null);
            moveCursor(secondLOSSprite, null);
            processBoardViewEvent(new BoardViewEvent(this, coords, null,
                    BoardViewEvent.BOARD_HEX_SELECTED, 0));
        }
    }
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

        if ((coords == null) || game.getBoard().contains(coords)) {
            setHighlighted(coords);
            moveCursor(highlightSprite, coords);
            moveCursor(firstLOSSprite, null);
            moveCursor(secondLOSSprite, null);
            processBoardViewEvent(new BoardViewEvent(this, coords, null,
                    BoardViewEvent.BOARD_HEX_HIGHLIGHTED, 0));
        }
    }
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

            if ((getLastCursor() == null) || (coords == null) || !coords.equals(getLastCursor())) {
                setLastCursor(coords);
                moveCursor(cursorSprite, coords);
                moveCursor(firstLOSSprite, null);
                moveCursor(secondLOSSprite, null);
                processBoardViewEvent(new BoardViewEvent(this, coords, null,
                        BoardViewEvent.BOARD_HEX_CURSOR, 0));
            } else {
                setLastCursor(coords);
            }
        }
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

    public void checkLOS(Coords c) {
        if ((c == null) || game.getBoard().contains(c)) {
            if (getFirstLOS() == null) {
                setFirstLOS(c);
                firstLOSHex(c);
                processBoardViewEvent(new BoardViewEvent(this, c, null,
                        BoardViewEvent.BOARD_FIRST_LOS_HEX, 0));
            } else {
                secondLOSHex(c, getFirstLOS());
                processBoardViewEvent(new BoardViewEvent(this, c, null,
                        BoardViewEvent.BOARD_SECOND_LOS_HEX, 0));
                setFirstLOS(null);
            }
        }
    }
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

            switch (mtype) {
            case BOARD_HEX_CLICK:
                if ((modifiers & java.awt.event.InputEvent.CTRL_MASK) != 0) {
                    checkLOS(c);
                } else {
                    processBoardViewEvent(new BoardViewEvent(this, c, null,
                            BoardViewEvent.BOARD_HEX_CLICKED, modifiers));
                }
                break;
            case BOARD_HEX_DOUBLECLICK:
                processBoardViewEvent(new BoardViewEvent(this, c, null,
                        BoardViewEvent.BOARD_HEX_DOUBLECLICKED, modifiers));
                break;
            case BOARD_HEX_DRAG:
                processBoardViewEvent(new BoardViewEvent(this, c, null,
                        BoardViewEvent.BOARD_HEX_DRAGGED, modifiers));
                break;
            case BOARD_HEX_POPUP:
                processBoardViewEvent(new BoardViewEvent(this, c, null,
                        BoardViewEvent.BOARD_HEX_POPUP, modifiers));
                break;
            }
        }
    }
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

        }

        for (int i = scrollOffset; (i < unitIds.length)
                && (i < actUnits + scrollOffset); i++) {
            if ((y > yOffset) && (y < yOffset + ICON_HEIGHT)) {
                clientgui.bv.processBoardViewEvent(new BoardViewEvent(
                        clientgui.bv, BoardViewEvent.SELECT_UNIT, unitIds[i]));
                isHit = true;
                return true;
            }
            yOffset += ICON_HEIGHT + PADDING;
View Full Code Here

Examples of megamek.client.event.BoardViewEvent

        }

        for (int i = scrollOffset; i < unitIds.length
                && i < actUnits + scrollOffset; i++) {
            if (y > yOffset && y < yOffset + ICON_HEIGHT) {
                clientgui.bv.processBoardViewEvent(new BoardViewEvent(
                        clientgui.bv, BoardViewEvent.SELECT_UNIT, unitIds[i]));
                isHit = true;
                return true;
            }
            yOffset += ICON_HEIGHT + PADDING;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.