Skip to content

Commit

Permalink
Gif dance
Browse files Browse the repository at this point in the history
Fixes #1637
  • Loading branch information
1-alex98 committed Mar 28, 2020
1 parent 44c7059 commit af39be0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.ToggleButton;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.text.Text;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -89,7 +91,7 @@ public class Ladder1v1Controller extends AbstractViewController<Node> implements
public Label ratingHintLabel;
public Label searchingForOpponentLabel;
public Label ratingLabel;
public ProgressIndicator searchProgressIndicator;
public ImageView searchProgressIndicator;
public ProgressIndicator ratingProgressIndicator;
public ToggleButton aeonButton;
public ToggleButton uefButton;
Expand Down Expand Up @@ -119,6 +121,10 @@ public class Ladder1v1Controller extends AbstractViewController<Node> implements
public void initialize() {
super.initialize();

searchProgressIndicator.setImage(new Image(getClass().getResource("/images/loading-dancing-acu.gif").toExternalForm()));
searchingForOpponentLabel.managedProperty().bind(searchingForOpponentLabel.visibleProperty());

searchProgressIndicator.managedProperty().bind(searchProgressIndicator.visibleProperty());
youLabel = new Text(i18n.get("ranked1v1.you"));
youLabel.setId("1v1-you-text");

Expand Down Expand Up @@ -197,7 +203,6 @@ public void destroy() throws Exception {
void setSearching(boolean searching) {
cancelButton.setVisible(searching);
playButton.setVisible(!searching);
searchProgressIndicator.setVisible(searching);
searchingForOpponentLabel.setVisible(searching);
setFactionButtonsDisabled(searching);
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/main/resources/theme/play/ranked_1v1.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.ToggleButton?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.GridPane?>
Expand Down Expand Up @@ -80,7 +81,7 @@
</HBox>
<Label fx:id="searchingForOpponentLabel" contentDisplay="BOTTOM" text="%ranked1v1.searching" wrapText="true" GridPane.halignment="CENTER" GridPane.rowIndex="3">
<graphic>
<JFXProgressBar fx:id="searchProgressIndicator" maxWidth="1.7976931348623157E308"/>
<ImageView fx:id="searchProgressIndicator"/>
</graphic>
</Label>
</children>
Expand Down

0 comments on commit af39be0

Please sign in to comment.