(float width, float height)
| 83 | } |
| 84 | |
| 85 | @Override |
| 86 | protected final void doLayout(float width, float height) { |
| 87 | boolean firstReveal = (totalHeight == 0); |
| 88 | float contentHeight = layoutAndGetHeight(width, height - VPrompt.HEIGHT - 2 * MSG_HEIGHT); |
| 89 | totalHeight = contentHeight + VPrompt.HEIGHT; |
| 90 | lastDy = 0; //reset whenever main layout occurs |
| 91 | |
| 92 | if (btnMiddle != null) { |
| 93 | btnMiddle.setLeft((width - btnMiddle.getWidth()) / 2); |
| 94 | if (!title.isEmpty()) { |
| 95 | totalHeight += MSG_HEIGHT; //leave room for title above middle button |
| 96 | } |
| 97 | } |
| 98 | prompt.setBounds(0, totalHeight - VPrompt.HEIGHT, width, VPrompt.HEIGHT); |
| 99 | |
| 100 | updateDisplayTop(); |
| 101 | |
| 102 | if (firstReveal) { //start reveal animation after dialog first laid out |
| 103 | updateRevealAnimation(3 * Forge.getScreenHeight()); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | private void updateDisplayTop() { |
| 108 | //shift all children into position |
nothing calls this directly
no test coverage detected