pgoe88

NoNopoly_Players_Overview

Mar 24th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. renderSpielerAnzeige: html
  2. "Creates the overview of the Players"
  3.     |counter|
  4.     counter := 0.
  5.     self teilnehmer isNil not
  6.         ifTrue:
  7.     [html div with: 'Es gibt insgesamt: ', self spielerEingabe anzahlSpieler printString, ' Spieler'].
  8.     html div with: 'Diese sind: '.
  9.     "For every Player make a new box"
  10.     self teilnehmer do: [:tlnhmr |counter := counter+1.html div class:'spieler',counter printString; with: [
  11.             html paragraph: [ html div class: 'spielerDaten'; with:
  12.             "Show Name"
  13.             [html strong: 'Name: '. html
  14.                     "Option to upload a pic"                   
  15.                     anchor callback: [self call:(self bildHochladen spieler: tlnhmr)];
  16.                             with: tlnhmr name. html break.
  17.             "Show credits"
  18.             html strong: 'Guthaben: '. html render: tlnhmr guthaben printString. html break.
  19.             "Show the position where the player is at right now"
  20.             html strong: 'Postion: '. html render: tlnhmr position printString. html break.].
  21.             "Shows the player's pic, if he has uploaded one"
  22.             (tlnhmr isAvatar) ifTrue: [html image resourceUrl: (NoNopolyFileLibrary urlOf:(tlnhmr                      
  23.             name, 'Jpg') asSymbol) printString.  html break].].].].
  24.            
  25.             "Integrates the board"
  26.             html div class: 'spielBrett'; with:[ self renderSpielbrett: html].
Advertisement
Add Comment
Please, Sign In to add comment