fidgit 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/{README.textile → README.md} +71 -56
- data/examples/splash_example.rb +1 -1
- data/fidgit.gemspec +1 -1
- data/lib/fidgit/elements/combo_box.rb +1 -0
- data/lib/fidgit/elements/container.rb +1 -0
- data/lib/fidgit/elements/menu_pane.rb +2 -0
- data/lib/fidgit/states/gui_state.rb +1 -0
- data/lib/fidgit/version.rb +1 -1
- metadata +28 -48
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 381abcd64367f4421532eccb11fe385dc81ea4cb
|
4
|
+
data.tar.gz: 61e063bc4c3ad41ad1c9849acfbb526298e7340a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 28bebb58bab00abd268212ef5215c9ecebbb2c44ea04c74d47e9abfd498081c1099d95adf04a5b7a0610b729e01eb213f4653c6bcf6692ab120da16650105a5d
|
7
|
+
data.tar.gz: 3ff888888cf8f4f9ee4942da477e3e225497da8c4a0f42533ca70197c94faac8a8f5cebe68c64caea8e2399c35288945f678dd64b45d2e49858fa46a43f3b715
|
@@ -1,38 +1,50 @@
|
|
1
|
-
|
1
|
+
Fidgit
|
2
|
+
======
|
2
3
|
|
3
|
-
Fidgit is a GUI framework built on
|
4
|
+
Fidgit is a GUI framework built on [Gosu](http://libgosu.org/) and [Chingu](http://ippa.se/chingu)
|
4
5
|
|
5
6
|
|
6
|
-
|
7
|
+
Description
|
8
|
+
-----------
|
7
9
|
|
8
|
-
The API is inspired by
|
9
|
-
based around
|
10
|
+
The API is inspired by [Shoes](http://shoesrb.com/), but since Shoes is very simplistic, the level of functionality is
|
11
|
+
based around [FXRuby](http://www.fxruby.org/) and other GUI APIs.
|
10
12
|
Fidgit was originally developed as a part of the Sidney game, but as it got more complex, it was obvious it would be
|
11
13
|
useful to separate them.
|
12
14
|
|
13
15
|
_WARNING: THIS PROJECT IS IN EARLY ALPHA DEVELOPMENT AND THE API IS LIABLE TO CONTINUOUS CHANGE AND IT IS QUITE UNSTABLE!_
|
14
16
|
|
15
|
-
Read the Yard documentation at
|
17
|
+
Read the Yard documentation at [rubydoc.info](http://rubydoc.info/github/Spooner/fidgit/master)
|
16
18
|
|
17
|
-
|
19
|
+
|
20
|
+
Aim
|
21
|
+
---
|
18
22
|
|
19
23
|
Fidgit aims to be a toolkit which will provide the building blocks to quickly create a GUI either for a GUI-based game
|
20
24
|
or for options screens and menus within a regular Gosu game.
|
21
25
|
|
22
|
-
|
26
|
+
|
27
|
+
License
|
28
|
+
-------
|
23
29
|
|
24
30
|
MIT (see COPYING.txt)
|
25
31
|
|
26
|
-
h2. Requirements
|
27
32
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
*
|
33
|
+
Requirements
|
34
|
+
------------
|
35
|
+
|
36
|
+
* Ruby 1.9.2 or higher.
|
37
|
+
* Gosu gem 0.7.27.1
|
38
|
+
* [Installing Gosu dependencies on Linux](http://code.google.com/p/gosu/wiki/GettingStartedOnLinux) (On Win32 and OS X there are binary gems available)
|
39
|
+
* Chingu gem 0.9rc4.
|
40
|
+
* Clipboard gem
|
32
41
|
|
33
|
-
h2. Example
|
34
42
|
|
35
|
-
|
43
|
+
Example
|
44
|
+
-------
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# examples/readme_example.rb
|
36
48
|
require 'fidgit'
|
37
49
|
|
38
50
|
class MyGame < Chingu::Window
|
@@ -62,10 +74,11 @@ class MyGuiState < Fidgit::GuiState
|
|
62
74
|
end
|
63
75
|
|
64
76
|
MyGame.new.show
|
65
|
-
|
77
|
+
```
|
66
78
|
|
67
79
|
|
68
|
-
|
80
|
+
API
|
81
|
+
---
|
69
82
|
|
70
83
|
As well as a cursor and tool-tips that are managed by the GuiState for you, there are several elements you can use inside your GuiState.
|
71
84
|
|
@@ -73,67 +86,69 @@ Elements are best added by using simple methods (listed below). Most of these me
|
|
73
86
|
|
74
87
|
The GuiState itself only accepts #vertical/#horizontal/#grid, but any packer or group accepts any other element method.
|
75
88
|
|
76
|
-
h3. GuiState methods
|
77
89
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
*
|
84
|
-
*
|
90
|
+
GuiState methods
|
91
|
+
----------------
|
92
|
+
|
93
|
+
* `pack([:vertical|:horizontal|:grid], ...)` - Add a packer to the state (Block has access to public methods).
|
94
|
+
* `clear()` - remove any packers added to the state.
|
95
|
+
* `menu(...)` - Show a context menu (Block has access to public methods).
|
96
|
+
* `item(text, value, ...)` - Item in a menu (Block handles :clicked_left_mouse_button event).
|
97
|
+
* `separator(...)` - A horizontal separator between menu items.
|
98
|
+
* `message(text, ...)` - Show a message box with button(s) (Block subscribes to a button getting clicked).
|
99
|
+
* `file_dialog([:open, :save], ...)` - Open a file dialog to load or save a file (Block is passed the button pressed and the file path set).
|
85
100
|
|
86
|
-
|
101
|
+
### Container methods
|
87
102
|
|
88
|
-
|
103
|
+
#### Arrangement managers
|
89
104
|
|
90
105
|
Fidgit uses automatic packers to manage layout.
|
91
106
|
|
92
|
-
*
|
93
|
-
*
|
94
|
-
*
|
107
|
+
* `pack([:vertical|:horizontal|:grid], ...)` - Packer that packs its component elements (Block has access to public methods).
|
108
|
+
* `group(...)` - Manages any groupable elements put inside it, such as radio-buttons (Block has access to public methods). Best to subscribe to :changed event handler.
|
109
|
+
* `scroll_window(...)` - A window having content larger than what is shown, scrolled with scroll-bars (Block has access to public methods of the contents packer)
|
95
110
|
|
96
|
-
|
111
|
+
#### Elements
|
97
112
|
|
98
113
|
Elements can be placed inside a packer or group.
|
99
114
|
|
100
|
-
*
|
101
|
-
*
|
102
|
-
*
|
103
|
-
*
|
104
|
-
*
|
105
|
-
*
|
106
|
-
*
|
115
|
+
* `button(text, ...)` - Button with text and/or icon (Block handles :clicked_left_mouse_button event).
|
116
|
+
* `color_picker(...)` - Red, green and blue sliders and colour indicator (Block handles :changed event).
|
117
|
+
* `image_frame(image, ...)` - Wrapper around a Gosu::Image to embed it in the GUI.
|
118
|
+
* `label(text, ...)` - Label with text and, optionally, an icon (No block accepted).
|
119
|
+
* `slider(...)` - Horizontal slider with handle (Block handles :changed event).
|
120
|
+
* `text_area(...)` - An multi-line element, containing editable text (Block handles :changed event).
|
121
|
+
* `toggle_button(text, ...)` - Button that can be toggled on/off (Block handles :changed event).
|
107
122
|
|
108
|
-
|
123
|
+
##### Groupable elements
|
109
124
|
|
110
125
|
These should be placed within a group (directly or indirectly) and only one of them will be selected. The group manages which one is selected.
|
111
126
|
|
112
|
-
*
|
113
|
-
*
|
127
|
+
* `color_well(color, ...)` - A radio-button used to pick a colour (Block handles :clicked_left_mouse_button event).
|
128
|
+
* `radio_button(text, value, ...)` - Button that is part of a group (Block handles :clicked_left_mouse_button event).
|
114
129
|
|
115
|
-
|
130
|
+
##### Compound elements
|
116
131
|
|
117
132
|
These elements contain items, which can easily be added from within a block passed to them. One can subscribe to the :changed event, which is usually easier than managing each item separately.
|
118
133
|
|
119
|
-
*
|
120
|
-
|
121
|
-
*
|
122
|
-
|
134
|
+
* `combo_box(...)` - Button that has a drop-down menu attached (Block has access to public methods).
|
135
|
+
* `item(text, value, ...)` - Add an item to a combo box (Block handles :clicked_left_mouse_button event).
|
136
|
+
* `list(...)` - A vertical list of items to select from (Block has access to public methods).
|
137
|
+
* `item(text, value, ...)` - Add an item to a combo box (Block handles :clicked_left_mouse_button event).
|
123
138
|
|
124
139
|
|
125
|
-
|
140
|
+
##### Alternative GUI frameworks
|
126
141
|
|
127
142
|
There are two other GUI tool-kits that work with Gosu:
|
128
143
|
|
129
|
-
*
|
130
|
-
|
131
|
-
|
132
|
-
|
144
|
+
* [Rubygoo](http://code.google.com/p/rubygoo/)
|
145
|
+
* Additionally supports [Rubygame](http://rubygame.org/) (as well as Gosu).
|
146
|
+
* Only simple widgets are implemented.
|
147
|
+
* No longer supported.
|
133
148
|
|
134
|
-
*
|
135
|
-
|
136
|
-
|
137
|
-
|
149
|
+
* [GGLib](http://code.google.com/p/gglib/) (Gosu GUI Library)
|
150
|
+
* Pretty graphical themes.
|
151
|
+
* Only simple widgets are implemented.
|
152
|
+
* No longer supported (though author has commented that they would like to pick it up again).
|
138
153
|
|
139
|
-
Remember that if you primarily want a GUI for your GUI application, not just a GUI in your Gosu game, consider using a dedicated GUI tool-kit, such as
|
154
|
+
Remember that if you primarily want a GUI for your GUI application, not just a GUI in your Gosu game, consider using a dedicated GUI tool-kit, such as [Shoes](http://shoesrb.com/) or [wxruby-ruby19](http://wxruby.rubyforge.org/)
|
data/examples/splash_example.rb
CHANGED
data/fidgit.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = "fidgit"
|
16
16
|
s.has_rdoc = true
|
17
|
-
s.required_ruby_version = "
|
17
|
+
s.required_ruby_version = ">= 1.9.2"
|
18
18
|
|
19
19
|
s.files = `git ls-files`.split("\n")
|
20
20
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/fidgit/version.rb
CHANGED
metadata
CHANGED
@@ -1,158 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fidgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.6
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Bil Bas (Spooner)
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-05-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: gosu
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.7.41
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.7.41
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: chingu
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 0.9rc7
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 0.9rc7
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: clipboard
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- - ~>
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 0.9.9
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- - ~>
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 0.9.9
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: ffi
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- - ~>
|
59
|
+
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: 1.0.11
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- - ~>
|
66
|
+
- - "~>"
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 1.0.11
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rspec
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- - ~>
|
73
|
+
- - "~>"
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: 2.8.0
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- - ~>
|
80
|
+
- - "~>"
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: 2.8.0
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: texplay
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- - ~>
|
87
|
+
- - "~>"
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: 0.4.3
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- - ~>
|
94
|
+
- - "~>"
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: 0.4.3
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rake
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: yard
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: RedCloth
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- - ~>
|
129
|
+
- - "~>"
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: 4.2.9
|
150
132
|
type: :development
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- - ~>
|
136
|
+
- - "~>"
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: 4.2.9
|
158
139
|
description: Fidgit is a GUI library built on Gosu/Chingu
|
@@ -162,12 +143,12 @@ executables: []
|
|
162
143
|
extensions: []
|
163
144
|
extra_rdoc_files: []
|
164
145
|
files:
|
165
|
-
- .gitignore
|
166
|
-
- .rspec
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
167
148
|
- CHANGELOG.md
|
168
149
|
- Gemfile
|
169
150
|
- LICENSE.txt
|
170
|
-
- README.
|
151
|
+
- README.md
|
171
152
|
- Rakefile
|
172
153
|
- config/default_schema.yml
|
173
154
|
- examples/_all_examples.rb
|
@@ -255,27 +236,26 @@ files:
|
|
255
236
|
homepage: http://github.com/Spooner/fidgit/
|
256
237
|
licenses:
|
257
238
|
- MIT
|
239
|
+
metadata: {}
|
258
240
|
post_install_message:
|
259
241
|
rdoc_options: []
|
260
242
|
require_paths:
|
261
243
|
- lib
|
262
244
|
required_ruby_version: !ruby/object:Gem::Requirement
|
263
|
-
none: false
|
264
245
|
requirements:
|
265
|
-
- -
|
246
|
+
- - ">="
|
266
247
|
- !ruby/object:Gem::Version
|
267
248
|
version: 1.9.2
|
268
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
|
-
none: false
|
270
250
|
requirements:
|
271
|
-
- -
|
251
|
+
- - ">="
|
272
252
|
- !ruby/object:Gem::Version
|
273
253
|
version: '0'
|
274
254
|
requirements: []
|
275
255
|
rubyforge_project: fidgit
|
276
|
-
rubygems_version:
|
256
|
+
rubygems_version: 2.2.0
|
277
257
|
signing_key:
|
278
|
-
specification_version:
|
258
|
+
specification_version: 4
|
279
259
|
summary: Fidgit is a GUI library built on Gosu/Chingu
|
280
260
|
test_files: []
|
281
261
|
has_rdoc: true
|