MCPcopy Create free account
hub / github.com/Card-Forge/forge / doLandscapeLayout

Method doLandscapeLayout

forge-gui-mobile/src/forge/screens/FScreen.java:103–118  ·  view source on GitHub ↗
(float width, float height)

Source from the content-addressed store, hash-verified

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() {

Callers 2

doLayoutMethod · 0.95
setSizeMethod · 0.95

Calls 4

doLayoutMethod · 0.95
getHeightMethod · 0.65
setBoundsMethod · 0.45
getPreferredHeightMethod · 0.45

Tested by

no test coverage detected