From: brett l. <wak...@gm...> - 2010-01-18 22:49:27
|
This should really be a configurable preference. I implemented it mostly to avoid multiple window clutter, and showing users irrelevant information. Most of the time, the stock chart doesn't influence an operating round (at least, in my experience). ---Brett. On Mon, Jan 18, 2010 at 1:33 PM, Erik Vos <eri...@xs...> wrote: > Apologies, I had misread your previous email. > Having such an option looks reasonable to me. > > Or shall we leave the Stock Chart always open > (at the bottom of the window stack)? > > Brett does not seem to like that, as he implemented > it closure at the end of the stock round (long ago). > > Erik. > > -----Original Message----- > From: Freek Dijkstra [mailto:sf_...@ma...] > Sent: Monday 18 January 2010 21:28 > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Feature: keep stock window open > > Freek Dijkstra wrote: > >> I prefer to keep the stock window open, even in the operating >> rounds. > > Erik Vos replied: > >> AFAIK the status (stock) window always keep open, and always has done > that. >> WHat makes you think that it doesn't? > > The "Game Status" window remains open. I meant the "Stock Chart" window, > which closes as soon as the first operating round begins. > > Do you experience other behaviour? > > Here is a (manually determined) stack trace where this happens: > (starting with the click on the "Pass" button in the status window, > marking the end of the stock round): > > DefaultButtonModel.setPressed() > DefaultButtonModel.fireActionPerformed() > ActionButton(AbstractButton).fireActionPerformed() > StatusWindow_1856(StatusWindow).actionPerformed() > StatusWindow_1856(StatusWindow).process() > GameUIManager.processOnServer() > GameUIManager.updateUI() > > In this routine is the code: > >> for (GuiHints.VisibilityHint hint : uiHints.getVisibilityHints()) > { >> switch (hint.getType()) { >> case STOCK_MARKET: >> boolean stockChartVisibilityHint = hint.getVisibility(); >> if (stockChartVisibilityHint != > previousStockChartVisibilityHint) { >> stockChart.setVisible(stockChartVisibilityHint); >> previousStockChartVisibilityHint = > stockChartVisibilityHint; >> } >> if (stockChartVisibilityHint) stockChart.toFront(); >> break; > [...] > > Since stockChartVisibilityHint is always false, the line >> stockChart.setVisible(stockChartVisibilityHint); > always makes sure that the stock window is closed. > > Therefor, I propose to add a preference setting that changes this > behaviour (for the exact diff, see my previous mail): > >> for (GuiHints.VisibilityHint hint : uiHints.getVisibilityHints()) > { >> switch (hint.getType()) { >> case STOCK_MARKET: >> boolean stockChartVisibilityHint = hint.getVisibility() || > >> > "yes".equalsIgnoreCase(Config.get("stock.window.open")); >> if (stockChartVisibilityHint != > previousStockChartVisibilityHint) { >> stockChart.setVisible(stockChartVisibilityHint); >> previousStockChartVisibilityHint = > stockChartVisibilityHint; >> } >> if (stockChartVisibilityHint) stockChart.toFront(); >> break; > > Regards, > Freek Dijkstra > > > ---------------------------------------------------------------------------- > -- > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for > Conference > attendees to learn about information security's most important issues > through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |