~mxsscott/widelands/windowed-graphics

Viewing all changes in revision 6481.

  • Committer: Mark Scott
  • Date: 2013-01-06 22:07:04 UTC
  • Revision ID: mark@mscott.cx-20130106220704-takkzi5eestlvcgp
* Capture Enter/Return and Escape keys in the Options and Advanced Options windows to trigger Apply/Cancel respectively. This allows the user to cancel or apply a new screen resolution (such as a smaller one), when they have unfortunately selected one that is too large for their display.

For example, I can select 1280x800 (my screen resolution), but this causes the bottom of the window to be off the bottom of my screen.


* A little reworking of the graphics mode detection in options.cc to use pointers rather than unsigned ints of varying sizes to iterate over the modes.

* Change types from structs to classes since they aren't just data holders - they have methods. (this is a personal matter of style that may be discussed).

* struct res -> class Resolution: the capital letter makes it more obvious in options.cc that it is a type rather than a variable.

* WLApplication tracks the current bits per pixel. This allows it to reinitialize graphics engine when just the bpp changes, e.g. from 800x600x16 to 800x600x32.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: