From: <aki...@us...> - 2008-08-16 14:13:16
|
Revision: 4892 http://gridarta.svn.sourceforge.net/gridarta/?rev=4892&view=rev Author: akirschbaum Date: 2008-08-16 14:13:22 +0000 (Sat, 16 Aug 2008) Log Message: ----------- Add "fill" and "fill random". These new fill modes use the "auto" fill mode. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/action.properties trunk/daimonin/ChangeLog trunk/daimonin/src/daieditor/action.properties trunk/src/app/net/sf/gridarta/gui/MainActions.java trunk/src/app/net/sf/gridarta/messages.properties trunk/src/app/net/sf/gridarta/messages_de.properties trunk/src/app/net/sf/gridarta/messages_fr.properties trunk/src/app/net/sf/gridarta/messages_sv.properties Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/crossfire/ChangeLog 2008-08-16 14:13:22 UTC (rev 4892) @@ -1,3 +1,8 @@ +2008-08-16 Andreas Kirschbaum + + * Add "fill" and "fill random". These new fill modes use the + "auto" fill mode. + 2008-08-15 Andreas Kirschbaum * Update archetypes. Modified: trunk/crossfire/src/cfeditor/action.properties =================================================================== --- trunk/crossfire/src/cfeditor/action.properties 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/crossfire/src/cfeditor/action.properties 2008-08-16 14:13:22 UTC (rev 4892) @@ -28,7 +28,7 @@ # Menus main.menubar=file edit map archetypes pickmaps resources tools analyze view plugins window help file.menu=createNew open recent close - save saveAs saveAll revert createImage - options - exit -edit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll +edit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillAuto fillBelow randFillAuto randFillAbove randFillBelow floodfill - selectAll map.menu=autoJoin - enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta @@ -43,7 +43,7 @@ mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor mapwindowFile.menu=save saveAs createImage - revert - close -mapwindowEdit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll +mapwindowEdit.menu=undo redo - clear cut copy paste - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodfill - selectAll mapwindowMap.menu=gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize mapwindowCursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/daimonin/ChangeLog 2008-08-16 14:13:22 UTC (rev 4892) @@ -1,3 +1,8 @@ +2008-08-16 Andreas Kirschbaum <xxx> + + * Add "fill" and "fill random". These new fill modes use the + "auto" fill mode. + 2008-08-14 Andreas Kirschbaum * Make "Scripts" tab in game object attributes panel work again. Modified: trunk/daimonin/src/daieditor/action.properties =================================================================== --- trunk/daimonin/src/daieditor/action.properties 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/daimonin/src/daieditor/action.properties 2008-08-16 14:13:22 UTC (rev 4892) @@ -28,7 +28,7 @@ # Menus main.menubar=file edit map archetypes pickmaps resources tools view window help file.menu=createNew open recent close - save saveAs saveAll revert createImage - options - exit -edit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll +edit.menu=undo redo - clear cut copy paste - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodfill - selectAll map.menu=autoJoin - enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta @@ -46,7 +46,7 @@ mapwindow.menubar=mapwindowFile mapwindowEdit mapwindowMap mapwindowCursor mapwindowFile.menu=save saveAs createImage - revert - close -mapwindowEdit.menu=undo redo - clear cut copy paste - shift - replace fillAbove fillBelow randFillAbove randFillBelow floodfill - selectAll +mapwindowEdit.menu=undo redo - clear cut copy paste - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodfill - selectAll mapwindowMap.menu=gridVisible enterExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize mapwindowCursor.menu=moveCursor - selectTile startStopDrag addToSelection subFromSelection releaseDrag - insertArch deleteArch - selectArchAbove selectArchBelow - archAttributes Modified: trunk/src/app/net/sf/gridarta/gui/MainActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/src/app/net/sf/gridarta/gui/MainActions.java 2008-08-16 14:13:22 UTC (rev 4892) @@ -146,12 +146,18 @@ /** Action called for "replace". */ private final Action aReplace; + /** Action called for "fill". */ + private final Action aFillAuto; + /** Action called for "fill above". */ private final Action aFillAbove; /** Action called for "fill below". */ private final Action aFillBelow; + /** Action called for "random fill". */ + private final Action aRandFillAuto; + /** Action called for "random fill above". */ private final Action aRandFillAbove; @@ -344,8 +350,10 @@ aShiftWest = actionFactory.createAction(true, "shiftWest", this); aShiftNorthWest = actionFactory.createAction(true, "shiftNorthWest", this); aReplace = actionFactory.createAction(true, "replace", this); + aFillAuto = actionFactory.createAction(true, "fillAuto", this); aFillAbove = actionFactory.createAction(true, "fillAbove", this); aFillBelow = actionFactory.createAction(true, "fillBelow", this); + aRandFillAuto = actionFactory.createAction(true, "randFillAuto", this); aRandFillAbove = actionFactory.createAction(true, "randFillAbove", this); aRandFillBelow = actionFactory.createAction(true, "randFillBelow", this); aFloodfill = actionFactory.createAction(true, "floodfill", this); @@ -381,8 +389,10 @@ aShiftWest.setEnabled(getShiftEnabled(3) != null); aShiftNorthWest.setEnabled(getShiftEnabled(7) != null); aReplace.setEnabled(getReplaceEnabled() != null); + aFillAuto.setEnabled(getFillAutoEnabled() != null); aFillAbove.setEnabled(getFillAboveEnabled() != null); aFillBelow.setEnabled(getFillBelowEnabled() != null); + aRandFillAuto.setEnabled(getRandFillAutoEnabled() != null); aRandFillAbove.setEnabled(getRandFillAboveEnabled() != null); aRandFillBelow.setEnabled(getRandFillBelowEnabled() != null); aFloodfill.setEnabled(getFloodfillEnabled() != null); @@ -483,6 +493,14 @@ } } + /** "Fill" was selected from the Edit menu. */ + public void fillAuto() { + final MapView<G, A, R, V> mapView = getFillAutoEnabled(); + if (mapView != null) { + fillWanted(mapView, InsertionMode.AUTO); + } + } + /** "Fill above" was selected from the Edit menu. */ public void fillAbove() { final MapView<G, A, R, V> mapView = getFillAboveEnabled(); @@ -508,6 +526,14 @@ FillUtils.fill(mapView, insertionMode, objectChooser.getSelections(), -1); } + /** "Random fill" was selected from the Edit menu. */ + public void randFillAuto() { + final MapView<G, A, R, V> mapView = getRandFillAutoEnabled(); + if (mapView != null) { + fillRandomWanted(mapView, InsertionMode.AUTO); + } + } + /** "Random fill above" was selected from the Edit menu. */ public void randFillAbove() { final MapView<G, A, R, V> mapView = getRandFillAboveEnabled(); @@ -728,6 +754,16 @@ } /** + * Determine if "fill" is enabled. + * @return the map view to fill if "fill" is enabled, or + * <code>null</code> otherwise + */ + @Nullable + private MapView<G, A, R, V> getFillAutoEnabled() { + return getSelection(); + } + + /** * Determine if "fill above" is enabled. * @return the map view to fill if "fill above" is enabled, or * <code>null</code> otherwise @@ -748,6 +784,16 @@ } /** + * Determine if "random fill" is enabled. + * @return the map view to fill if "random fill" is enabled, or + * <code>null</code> otherwise + */ + @Nullable + private MapView<G, A, R, V> getRandFillAutoEnabled() { + return getSelection(); + } + + /** * Determine if "random fill above" is enabled. * @return the map view to fill if "random fill above" is enabled, or * <code>null</code> otherwise Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/src/app/net/sf/gridarta/messages.properties 2008-08-16 14:13:22 UTC (rev 4892) @@ -535,16 +535,21 @@ replace.mnemonic=R replace.accel=ctrl pressed R +fillAuto.text=Fill +fillAuto.mnemonic=F +fillAuto.accel=ctrl pressed F + fillAbove.text=Fill Above fillAbove.mnemonic=A -fillAbove.accel=ctrl pressed F fillBelow.text=Fill Below fillBelow.mnemonic=B fillBelow.accel=ctrl shift pressed F +randFillAuto.text=Random Fill +randFillAuto.accel=ctrl pressed D + randFillAbove.text=Random Fill Above -randFillAbove.accel=ctrl pressed D randFillBelow.text=Random Fill Below randFillBelow.accel=ctrl shift pressed D Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2008-08-16 14:13:22 UTC (rev 4892) @@ -501,12 +501,17 @@ replace.text=Ersetzen replace.mnemonic=Z +fillAuto.text=F\xFCllen +fillAuto.mnemonic=F + fillAbove.text=Oben f\xFCllen fillAbove.mnemonic=O fillBelow.text=Unten f\xFCllen fillBelow.mnemonic=U +randFillAuto.text=Zuf\xE4llig f\xFCllen + randFillAbove.text=Zuf\xE4llig oben f\xFCllen randFillBelow.text=Zuf\xE4llig unten f\xFCllen Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2008-08-16 14:13:22 UTC (rev 4892) @@ -500,12 +500,17 @@ replace.text=Remplacer replace.mnemonic=R +#fillAuto.text= +#fillAuto.mnemonic= + fillAbove.text=Remplir vers le haut fillAbove.mnemonic=H fillBelow.text=Remplir vers le bas fillBelow.mnemonic=B +#randFillAuto.text= + randFillAbove.text=Remplir en haut al\xE9atoirement randFillBelow.text=Remplir en bas al\xE9atoirement Modified: trunk/src/app/net/sf/gridarta/messages_sv.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_sv.properties 2008-08-16 12:45:52 UTC (rev 4891) +++ trunk/src/app/net/sf/gridarta/messages_sv.properties 2008-08-16 14:13:22 UTC (rev 4892) @@ -504,12 +504,17 @@ replace.text=Ers\xE4tt replace.mnemonic=E +#fillAuto.text= +#fillAuto.mnemonic= + fillAbove.text=Fyll ovanf\xF6r fillAbove.mnemonic=O fillBelow.text=Fyll under fillBelow.mnemonic=U +#randFillAuto.text= + randFillAbove.text=Slumpfyll ovanf\xF6r randFillBelow.text=Slumpfyll under This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |