| 101 | |
| 102 | //do layout for landscape mode and return width for any screen hosted on top of this screen |
| 103 | protected float doLandscapeLayout(float width, float height) { |
| 104 | //just use normal doLayout function by default after making room for header menu |
| 105 | float startY = 0; |
| 106 | if (header != null) { |
| 107 | float headerWidth = header.doLandscapeLayout(width, height); |
| 108 | if (headerWidth == 0) { //if header doesn't support landscape layout, make room for it at top |
| 109 | header.setBounds(0, 0, width, header.getPreferredHeight()); |
| 110 | startY += header.getHeight(); |
| 111 | } |
| 112 | else { //otherwise make room for it on right |
| 113 | width -= headerWidth; |
| 114 | } |
| 115 | } |
| 116 | doLayout(startY, width, height); |
| 117 | return width; |
| 118 | } |
| 119 | |
| 120 | //get screen to serve as the backdrop for this screen when in landscape mode |
| 121 | public FScreen getLandscapeBackdropScreen() { |