Commit graph

65 commits

Author SHA1 Message Date
jason@long.name
73800b13bf tools: make translation strings optional for tools
If a translation string is not defined for the tool name, icon name,
or tool description, then an automatic string is generated.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@915 d9718cc8-9f43-0410-858b-315f434eb58c
2014-01-05 22:13:51 +00:00
jason@long.name
ec0d9ffee6 tools: define default tool colors
so that colors do not need to be explicitly specified every time
a new tool is defined.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@914 d9718cc8-9f43-0410-858b-315f434eb58c
2014-01-05 22:13:44 +00:00
jason@long.name
84d8906a88 overlay-map: remove upper tile number limit
also- refactor a for-loop into a separate method to avoid having
code indented too far

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@911 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-21 21:34:59 +00:00
jason@long.name
58ffb6c73b api: provide isTilePowered() to check whether a given location has power
instead of requiring front-end to test for PWRBIT

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@888 d9718cc8-9f43-0410-858b-315f434eb58c
2013-12-03 01:04:22 +00:00
jason@long.name
2b60d14e96 overlay: use public getLandValue() method to draw landvalue overlay
instead of directly accessing the landValueMem[] array

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@864 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:34:28 +00:00
jason@long.name
99954a3619 overlay: use public getTrafficDensity() method to draw traffic overlay
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@860 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-28 16:33:43 +00:00
jason@long.name
b18b51d08e refactor: remove isPic argument from cityMessage() notification
Have the decision of whether to show the message in the notification
pane be determined by the message type itself, rather than being
decided by the sender of the message.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@859 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-22 00:48:34 +00:00
jason@long.name
2a0ec53a05 gui: DemandIndicator- replace hardcoded dimensions with constants
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@854 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-09 14:25:41 +00:00
jason@long.name
7b68e1299d android port: convert use of java.awt.Rectangle to own CityRect class
java.awt.Rectangle does not exist in the android SDK, so this patch
replaces its use within the Micropolis engine code with a custom class
with equivalent functionality.

This way all the classes in micropolisj.engine can be compiled with
the subset of the Java SDK that also exists in the Android SDK.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@853 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-09 14:11:55 +00:00
jason@long.name
436789c12e gui: scroll with middle-button
Hold-down middle button and drag to scroll map without using
scroll bars.  Contributed by askywhale (email, 2013-09-01)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@850 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-07 15:18:38 +00:00
jason@long.name
fb52cfd504 cleanup: remove some debug code left in from a previous commit
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@822 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:38 +00:00
jason@long.name
521a41f028 tiles.rc: use description numbers from tiles.rc rather than hardcoded numbers
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@821 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 16:32:25 +00:00
jason@long.name
d14121b415 overlay-map: cleanup: use isResidentialZoneAny() instead of manual check
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@819 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:27:23 +00:00
jason@long.name
7069c8150c buildings: for component tiles, link back to the owner tile
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@811 d9718cc8-9f43-0410-858b-315f434eb58c
2013-09-01 00:25:39 +00:00
jason@long.name
220f136848 GraphsPane: fix for graph reaching above 100% (issue #31)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@805 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-31 19:15:59 +00:00
jason@long.name
9e9d1b2e9b TileConstants: remove hardcoded tile values from OverlayMapView
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@787 d9718cc8-9f43-0410-858b-315f434eb58c
2013-08-11 22:43:13 +00:00
jason@long.name
5adc2cd57a keyboard: set keymap on content pane, not root pane.
This way, when the menu bar is active, the normal menu key sequences
(such as ESCAPE) will still work normally.

One quirk is the following-
* MINUS will still zoom out while the menu is active,
but PLUS will not work.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@778 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-26 20:05:46 +00:00
jason@long.name
9e3e681a81 keyboard: ESC will now close the current notification, if one is open
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@777 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:48:28 +00:00
jason@long.name
c5872a6e9f keyboard: ESC while dragging mouse will cancel the current op
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@776 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:48:19 +00:00
jason@long.name
bbb48f4e91 keyboard: let ESCAPE be used to close New City dialog
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@774 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:48:01 +00:00
jason@long.name
0465be13c1 keyboard: add hotkeys for Zones and Overlays menus
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@773 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:51 +00:00
jason@long.name
b4c3a8327e zoom-levels: add menu options for Zoom In and Zoom Out
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@772 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:42 +00:00
jason@long.name
f0f101b78d keyboard: define access keys for more menus
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@771 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:32 +00:00
jason@long.name
f55492f8b8 keyboard: add shortcut keys to Game menu
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@770 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-25 20:47:19 +00:00
jason@long.name
a1fc7c20a2 zoom-levels: fix to recognize the numpad "-" key to zoom out
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@769 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-22 16:03:49 +00:00
jason@long.name
060fdc4b94 drawing-area: fix so that keyboard zoom works even when a button has focus
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@767 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:35:01 +00:00
jason@long.name
6851224c10 drawing-area: scale sprite images with tile resolution
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@766 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:56 +00:00
jason@long.name
1429407d9f drawing-area: fix where sprites are drawn when zoom level is not 16px
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@765 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:51 +00:00
jason@long.name
4a38afc40f drawing-area: fix crash bug caused by not loading sprite images
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@764 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:46 +00:00
jason@long.name
298d789df2 overlay-map: fix selection rectangle for non-default zoom levels
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@763 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:41 +00:00
jason@long.name
1e21066cf2 drawing-area: allow zooming in and out with keyboard
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@762 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-21 15:34:36 +00:00
jason@long.name
1ce5080705 drawing-area: allow zooming from 8px to 32px, using unique graphics source for each level
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@756 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:53 +00:00
jason@long.name
103999e578 drawing-area: allow zooming in to 32px tiles
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@753 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:44 +00:00
jason@long.name
d452c45d21 drawing-area: hold in-memory tile images in an object, rather than static variables
This will allow changing tile sizes on a per-window basis.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@752 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:29:40 +00:00
jason@long.name
68717e3ea6 tiles.rc: move CONDBIT knowledge from source code to tiles.rc
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@746 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:10:50 +00:00
jason@long.name
91b3736886 tiles: transfer ZONEBIT knowledge to tiles.rc
and synthesize ZONEBIT when saving (for compatibility)

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@740 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-20 21:10:29 +00:00
jason@long.name
94dc4ea7be timers: try to be more disciplined about starting/stopping the timer
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@724 d9718cc8-9f43-0410-858b-315f434eb58c
2013-07-05 12:49:40 +00:00
jason@long.name
f7c8cb53e2 gui: change layout of new-city-dialog to work with wider dialog
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@691 d9718cc8-9f43-0410-858b-315f434eb58c
2013-06-15 12:41:54 +00:00
jason@long.name
99756b5d0a translations: merge in my older work on the translation tool
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@662 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-21 13:28:32 +00:00
jason@long.name
237b28ebe7 translations: add menu item for launching translation tool
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@658 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-21 13:27:23 +00:00
jason@long.name
b20a0f7e77 error_popop: added a button for Exiting the program altogether
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@657 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-20 16:12:25 +00:00
jason@long.name
78934b9961 error_popup: protect all mouse events from unexpected errors
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@656 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-20 16:12:10 +00:00
jason@long.name
3abbc599f2 error_popup: protect all menu items from unexpected errors
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@655 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-20 16:11:53 +00:00
jason@long.name
6de75a7947 error_popup: show an error message window when simulator crashes
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@652 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-17 11:26:56 +00:00
jason@long.name
09932e0f5d toolstroke: suppress auto budget window when mouse is held down
as soon as mouse is released, show the budget window

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@648 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:46:21 +00:00
jason@long.name
52794b9c25 toolstroke: show the tool's effect as a preview when mouse is down
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@645 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:45:35 +00:00
jason@long.name
d0a6bb2303 toolstroke: uniform mechanism for keeping tool cursor updated
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@644 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:45:25 +00:00
jason@long.name
082e05f63c toolstroke: fix how tool results are reported
also, fix query tool functionality

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@643 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:45:13 +00:00
jason@long.name
0f0d063957 toolstroke: rename getPreview to getBounds
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@625 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:41:24 +00:00
jason@long.name
67e7792be5 toolstroke: apply at end of mouse click, show drag preview
not completely there yet

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@623 d9718cc8-9f43-0410-858b-315f434eb58c
2013-05-16 23:36:27 +00:00