
Def LoadButtonSpacing() Height 10 {} End

Def SavedGameContent() Vertical {
  {
    {
      Horizontal {
        Vertical {
          Horizontal { Using "label" Label() Using "warlord" Label(" (retired)") }
          Using "date" Label(none, 14, ColorId GRAY)
          Using "viewIds" List(HORIZONTAL, ViewId(1))
        }
        Stretch {}
        Position(TOP_RIGHT, {
          Using "load" StandardButton(Label("Load game"))
          Using "warlord" StandardButton(Label("Play as a warlord"))
        })
      }
    }
    MarginRight(2, Using "erase" Position(BOTTOM_RIGHT, Height 20 Width 45 {
        Button()
        StandardButton(Label("erase", 16, Rgb 200 100 100 255))
    }))
  }
  Position(BOTTOM_STRETCHED, Height 10 Texture(HORI_BAR_MINI2))
  LoadButtonSpacing()
}
End

{
  BlockEvents
  ExitButtons()
  Window({
    FocusKeysVertical()
    Width 600
    Vertical {
      MaxHeight 400
        Using "games" Scrolling(MarginRight(10, List(VERTICAL, SavedGameContent())))
      Stretch {}
      Height 15 {}
      Position(MIDDLE, Width 150 Using "new" StandardButton(Height 20 Label("Start new game")))
    }
  })
}