Advertisement
Serafim

Untitled

Oct 22nd, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace App:Views:Layout:
  2.   class Header
  3.     constructor: ->
  4.       @scene = new Boo.Scene 320, 31
  5.  
  6.       ctx = @scene.context
  7.       ctx.style 'header.panel',
  8.         color: '#550506'
  9.         stroke: '#3e0305'
  10.  
  11.       ctx.style 'header.text',
  12.         font:
  13.           family: 'Arial'
  14.           weight: 'bold'
  15.           size:   15
  16.           align:  'center'
  17.           variant:'small-caps'
  18.         color: '#fff'
  19.         shadow:
  20.           color: '#2f0103'
  21.           top: 1
  22.       window.ctx = @scene
  23.  
  24.  
  25.       @scene.append (ctx) =>
  26.         ctx.save()
  27.         ctx.style 'header.panel'
  28.         ctx.rect  [0, 0],  [@scene.resolution.width, 30]
  29.         ctx.line  [0, 30], [@scene.resolution.width, 30]
  30.         ctx.style 'header.text'
  31.         ctx.text  'КОРРУПЦИЯ', [@scene.resolution.width/2, 7]
  32.         ctx.image @scene, '/images/header/menu.png',
  33.           left: 0
  34.           top: -1
  35.         ctx.restore()
  36.  
  37.       @scene.drawAll()
  38.  
  39.  
  40.     draw: (ctx) ->
  41.       ctx.drawImage @scene.view, 0, 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement