muby 0.6.6 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/muby.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  $: << File.join(File.dirname(__FILE__), "lib")
2
2
  require 'pp'
3
3
  require "muby/helper_methods"
4
+ require "muby/user_window"
4
5
  require "muby/user_methods"
5
6
  require "muby/displayer"
6
7
  require "muby/configuration"
@@ -3,7 +3,7 @@ require 'ncurses'
3
3
 
4
4
  module Muby
5
5
 
6
- VERSION = "0.6.6"
6
+ VERSION = "0.7.0"
7
7
 
8
8
  #
9
9
  # The class that encapsulates all configuration.
@@ -0,0 +1,41 @@
1
+
2
+ module Muby
3
+
4
+ class UserWindow
5
+
6
+ def initialize(options = {})
7
+ @top = options.delete(:top)
8
+ @left = options.delete(:left)
9
+ @width = options.delete(:width)
10
+ @height = options.delete(:height)
11
+ @border = Ncurses.newwin(@height, @width, @top, @left)
12
+ @border.box(0,0)
13
+ @border.keypad(true)
14
+ @border.refresh
15
+ @window = Ncurses.newwin(@height - 2, @width - 2, @top + 1, @left + 1)
16
+ @window.keypad(true)
17
+ @window.scrollok(true)
18
+ @window.nodelay(true)
19
+ @window.refresh
20
+ end
21
+
22
+ def print(line, col, *info)
23
+ @window.move(line, col)
24
+ info.each do |e|
25
+ if String === e
26
+ @window.printw("%s", e)
27
+ elsif Muby::Style === e
28
+ e.affect(@window)
29
+ end
30
+ end
31
+ @window.refresh
32
+ end
33
+
34
+ def clear
35
+ @window.erase
36
+ @window.refresh
37
+ end
38
+
39
+ end
40
+
41
+ end
metadata CHANGED
@@ -1,9 +1,9 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: muby
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.6.6
6
+ version: 0.7.0
7
7
  date: 2007-10-19 00:00:00 +02:00
8
8
  summary: A simple but powerful mud client.
9
9
  require_paths:
@@ -29,19 +29,21 @@ post_install_message:
29
29
  authors:
30
30
  - Martin Kihlgren, Sy Ali
31
31
  files:
32
+ - lib/muby/completer.rb
33
+ - lib/muby/configuration.rb
32
34
  - lib/muby/connection.rb
35
+ - lib/muby/displayer.rb
36
+ - lib/muby/help.rb
37
+ - lib/muby/inputwindow.rb
33
38
  - lib/muby/logger.rb
39
+ - lib/muby/outputwindow.rb
34
40
  - lib/muby/style.rb
35
41
  - lib/muby/user_methods.rb
36
42
  - lib/muby/application.rb
37
- - lib/muby/configuration.rb
38
- - lib/muby/inputwindow.rb
39
- - lib/muby/help.rb
40
- - lib/muby/outputwindow.rb
41
- - lib/muby/completer.rb
42
- - lib/muby/displayer.rb
43
43
  - lib/muby/helper_methods.rb
44
+ - lib/muby/user_window.rb
44
45
  - lib/muby.rb
46
+ - contrib/sy/cce.rb
45
47
  - contrib/aardmud.org_4000/aliases/aard-aliases.rb
46
48
  - contrib/aardmud.org_4000/gags/aard-gags.rb
47
49
  - contrib/aardmud.org_4000/speedwalks/aard-sw-areas-vidblain.rb
@@ -62,7 +64,6 @@ files:
62
64
  - contrib/aardmud.org_4000/misc/aard_consider_substitutions.rb
63
65
  - contrib/aardmud.org_4000/aard-helpers.rb
64
66
  - contrib/aardmud.org_4000/aard-config.rb
65
- - contrib/sy/cce.rb
66
67
  - contrib/aardmud.org_4000/README.txt
67
68
  - LICENSE
68
69
  test_files: []