From: Erik V. <eri...@hc...> - 2005-11-20 15:41:40
|
I have added a basic Help system. To achieve that, all windows have become KeyListeners, and, if F1 is pressed, call a static method of the new class HelpWindow to display Help text. HelpWindow is set up like LogWindow, i.e. it displays a JLabel. I am not very pleased as to how it looks like, but at least HTML inside a JLabel allows me to insert line breaks. If someone knows a better way, i.e. one in which better formatting is possible: speak up. Currently, getting Help is set up to describe the currently allowed actions. The text is obtained by calling GameManager.getHelp(), which in turn calls the current round's getHelp() method. So each type of round is responsible to provide specific help text, dependent on the current state of affairs. Most rounds currently produce a dummy text. The only round that tells you more is the OR, and the only step described in full is tile laying (guess why). Pressing F1 does not always work, which (I presume) is caused by inadequate management of the HelpWindow instance. Anyone feeling like improving Help management and/or help texts, feel free to do so. I think I will be turning now to Private special properties, in particular extra tile laying. I think we will need a class for each type of special property, to be configured inside CompanyManager.xml. I am thinking of a generic interface SpecialPropertyI for all such properties. We'll see if this works. (BTW some 'simple' special properties have already been implemented in a different way, I think this can best stay as it is). Erik. |