messageNoSuchLevel method

MenuView messageNoSuchLevel (int level)

This message will only be displayed if the user accomplishes the last available level. Which at the moment, with AppController._nrAvailableLevels levels, shouldn't happen.

Implementation

MenuView messageNoSuchLevel(int level) {
  DivElement div = DivElement();
  div.setAttribute("class", "message");
  div.append(getLogo());
  div.append(HRElement());

  ParagraphElement upperText = ParagraphElement();
  upperText.appendText("The level ${level} is not available yet.");
  div.append(upperText);

  div.append(HRElement());

  ButtonElement button = ButtonElement()
    ..setAttribute("id", "button_pevious_level")
    ..setAttribute("class", "lower-bottom-button")
    ..appendText("Return to last Level");

  DivElement outerDiv = DivElement();
  outerDiv.append(div);

  DivElement buttonBox = getBottomButtonBox();
  buttonBox.setAttribute("style", "height: 10%");
  button.setAttribute("style", "height: 100%");
  buttonBox.append(button);

  outerDiv.append(buttonBox);

  this.content = outerDiv;
  return this;
}