Commit graph

38 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
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
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
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
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
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
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
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
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
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
jason@long.name
9c045da206 simspeed: no matter speed, always two animation cycles per sim step
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@614 d9718cc8-9f43-0410-858b-315f434eb58c
2013-04-29 22:02:29 +00:00
jason@long.name
04534d6273 refactor: move totalFunds property to separate class
this new class (CityBudget) will contain all finance-related balances

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@600 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-23 15:45:37 +00:00
jason@long.name
4f4f166cca aboutdlg: include version/vendor of Java run-time in About dialog box
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@593 d9718cc8-9f43-0410-858b-315f434eb58c
2013-03-15 20:30:06 +00:00
jason@long.name
7473c893bd java6-compat: eliminate use of diamond operator (a J7-only feature)
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@576 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 14:01:36 +00:00
jason@long.name
b1a1dea224 query tool: check bounds before attempting query
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@575 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-24 01:19:17 +00:00
jason@long.name
0255ae0744 cleanup: remove duplicate definitions of min/max game level
i.e.
removed Micropolis.MIN_LEVEL and Micropolis.MAX_LEVEL
as it was superceded by
GameLevel.MIN_LEVEL and GameLevel.MAX_LEVEL

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@540 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-17 20:58:31 +00:00
jason@long.name
ed6795dfca Importing source code for MicropolisJ, the Java rewrite of Micropolis.
This edition of Micropolis, written for the Java desktop platform,
is fairly feature complete. I believe the only missing functionality
is that of loading the built-in scenarios, and this can be implemented
if there is any demand for it.

I will soon update the home page at http://code.google.com/p/micropolis/
with downloadable packages of this edition of the software.


git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@528 d9718cc8-9f43-0410-858b-315f434eb58c
2013-02-14 21:02:42 +00:00