| 181 | } |
| 182 | |
| 183 | public static abstract class Header extends FContainer { |
| 184 | public static FSkinColor getBtnPressedColor() { |
| 185 | if (getTextureOverlayColor() == null) |
| 186 | return FSkinColor.getStandardColor(Color.DARK_GRAY); |
| 187 | return getTextureOverlayColor().alphaColor(1f); |
| 188 | } |
| 189 | public static FSkinColor getLineColor() { |
| 190 | return getBtnPressedColor().stepColor(-40); |
| 191 | } |
| 192 | public static FSkinColor getBackColor() { |
| 193 | return getBtnPressedColor().stepColor(-80); |
| 194 | } |
| 195 | public static final float LINE_THICKNESS = Utils.scale(1); |
| 196 | |
| 197 | public abstract float getPreferredHeight(); |
| 198 | |
| 199 | //handle when screen activated |
| 200 | protected void onScreenActivate() { |
| 201 | } |
| 202 | |
| 203 | //do layout for landscape mode and return needed width |
| 204 | public abstract float doLandscapeLayout(float screenWidth, float screenHeight); |
| 205 | } |
| 206 | private static class DefaultHeader extends Header { |
| 207 | protected static final float HEIGHT = Math.round(Utils.AVG_FINGER_HEIGHT * 0.8f); |
| 208 | protected static final FSkinFont FONT = FSkinFont.get(16); |