rubydraw 0.3.2.1 → 0.3.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,11 @@ module Rubydraw
14
14
  num | total}
15
15
  end
16
16
 
17
+ HardwareSurface, HWSurface = SDL::HWSURFACE, SDL::HWSURFACE
18
+ SoftwareSurface, SWSurface = SDL::SWSURFACE, SDL::SWSURFACE
19
+ DoubleBuffered, DoubleBuf = SDL::DOUBLEBUF, SDL::DOUBLEBUF
17
20
  Fullscreen = SDL::FULLSCREEN
18
21
  Resizable = SDL::RESIZABLE
22
+ Frameless, Noframe = SDL::NOFRAME, SDL::NOFRAME
19
23
  end
20
24
  end
@@ -8,9 +8,9 @@ module Rubydraw
8
8
  attr_accessor(:bkg_color)
9
9
 
10
10
  # Create a new window.
11
- def initialize(dimensions, flags=[], bkg_color=Color::Black)
11
+ def initialize(dimensions, flags=[], bkg_color=Color::Black, persistent=false)
12
12
  width, height = dimensions.to_ary
13
- @fullscreen = flags.include?(Rubydraw::Flags::Fullscreen)
13
+ @fullscreen, @persistent = flags.include?(Rubydraw::Flags::Fullscreen), persistent
14
14
  if width < 0
15
15
  raise SDLError, "New window width cannot be less than zero"
16
16
  end
@@ -70,8 +70,10 @@ module Rubydraw
70
70
  loop do
71
71
  handle_events
72
72
  if @open
73
- # Clear the contents of the window
74
- clear
73
+ unless @persistent
74
+ # Clear the contents of the window
75
+ clear
76
+ end
75
77
  tick
76
78
  # Update the screen to show any changes.
77
79
  SDL::UpdateRect(@screen, 0, 0, 0, 0)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rubydraw
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.2.1
5
+ version: 0.3.2.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - J. Wostenberg
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-14 00:00:00 -07:00
13
+ date: 2012-02-04 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency