creditsView method

MenuView creditsView ()

This is the credits view to display the creators of the game and to give a donations opportunity.

Implementation

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

  ParagraphElement upperText = ParagraphElement();
  upperText.appendText("Built with \u{2764} in Lübeck.");
  div.append(upperText);

  ParagraphElement middleText = ParagraphElement();
  middleText.appendText("Jan Steffen Krohn & Tom Christopher Böttger");
  div.append(middleText);

  div.append(HRElement());

  ParagraphElement donateText = ParagraphElement()
    ..setAttribute("class", "donate-text")
    ..appendText("Help us making Dozer even better and donate us a coffee :-)");
  div.append(donateText);

  ImageElement paypal = ImageElement(src: "resources/paypal.png");

  SpanElement textDonate = SpanElement();
  textDonate.text = "Donate";

  ButtonElement buttonDonate = ButtonElement()
    ..setAttribute("id", "donate-button")
    ..setAttribute("class", "upper-bottom-button")
    ..append(paypal)
    ..append(textDonate);

  ButtonElement buttonToMenu = ButtonElement()
    ..setAttribute("id", "button_to_menu")
    ..setAttribute("class", "lower-bottom-button")
    ..appendText("Return");

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

  DivElement buttonBox = getBottomButtonBox();
  buttonBox.setAttribute("style", "height: 20%");
  buttonDonate.setAttribute("style", "height: 50%");
  buttonToMenu.setAttribute("style", "height: 50%");
  buttonBox.append(buttonDonate);
  buttonBox.append(buttonToMenu);

  outerDiv.append(buttonBox);

  this.content = outerDiv;
  return this;
}