Commit 2455650e authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

Merge branch '851-invocationtarget-loaderscreen' into 'V3.7'

Resolve "InvocationTargetException v LoaderScreen"

See merge request !651
parents 017b9c83 984b290d
......@@ -258,7 +258,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
getStage().addActor(roundButton);
getStage().addActor(dimmerScreen);
setComponentsPositionAndSize();
setComponentsPositionAndSize(false);
initFurniture();
createGameObjects();
......@@ -283,7 +283,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
@Override
public void screenResized(int width, int height) {
setComponentsPositionAndSize();
setComponentsPositionAndSize(true);
}
@Override
......@@ -383,7 +383,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
protocolLabel.setText(getData().getProtocolText());
}
private void setComponentsPositionAndSize() {
private void setComponentsPositionAndSize(boolean afterResize) {
float labelHeight = getViewportHeight() * PROTOCOL_GROUP_HEIGHT;
//Room group
......@@ -403,14 +403,16 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
draggedLayout.setBounds(xRoom, yRoom, roomWidth, roomHeight);
//Protocol Label
protocolBackground.setBounds(getViewportLeftX(), getViewportHeight() - labelHeight, getViewportWidth(), labelHeight + getViewportBottomY());
protocolLabel.setBounds(getViewportLeftX() + AbstractMenu.MAX_OPEN_CLOSE_BUTTON_WIDTH, getViewportHeight() - labelHeight + PROTOCOL_TEXT_PADDING, getViewportWidth() - AbstractMenu.MAX_OPEN_CLOSE_BUTTON_WIDTH
- PANEL_WIDTH, labelHeight + getViewportBottomY() - PROTOCOL_TEXT_PADDING);
protocolBackground.setBounds(getViewportLeftX(), getViewportTopY() - labelHeight, getViewportWidth(), labelHeight);
protocolLabel.setBounds(getViewportLeftX() + AbstractMenu.MAX_OPEN_CLOSE_BUTTON_WIDTH, getViewportTopY() - labelHeight + PROTOCOL_TEXT_PADDING, getViewportWidth() - AbstractMenu.MAX_OPEN_CLOSE_BUTTON_WIDTH
- PANEL_WIDTH, labelHeight - PROTOCOL_TEXT_PADDING);
//Menu
cardsWidgetBackground.setBounds(getViewportWidth() - PANEL_WIDTH, getViewportBottomY(), PANEL_WIDTH, getViewportHeight());
cardsWidget.setBounds(getViewportWidth() - PANEL_WIDTH, getViewportBottomY(), PANEL_WIDTH, getViewportHeight());
if(afterResize) {
cardsWidget.screenResize();
}
//Round button
int buttonWidth = (ComponentScaleUtil.isUnderThreshold() ? FINISH_BUTTON_THRESHOLD_WIDTH : FINISH_BUTTON_WIDTH);
......
......@@ -59,7 +59,7 @@ public class LoadingStatusText extends TablexiaLabel {
setAlignment(Align.center);
}
public void setStatusText(StatusText text) {
public synchronized void setStatusText(StatusText text) {
if(text == StatusText.NONE)
setText("");
else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment