Glass
Version, currently master branch1 version
- master branchlatestAug 18, 2021
github.com/nilsmartel/Glass
Gui Library written in Crystal
23 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
Glass:
github: nilsmartel/Glass
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.35.0- License
- MIT
- Author
- sombrastudios
- Target
Glassfrom ./src/Main.cr
Dependencies
Runtime Dependencies
- crsfml*github: oprypin/crsfml
README
# Glass (W.I.P) GUI Library written in pure Crystal --- ## TODO - Completly change positioning and stretching system. At the moment I'm solely focusing on the minimal window size it seems ## Creating a simple Window in order to create a simple Window one first needs to set up the UI using widgets In order to do this I will just define a fairly simple function ```ruby def new_ui() : Glass::Widget img = SF::Image.new(256, 256) ui = Glass::AbsolutContainer.new(img) ui.background_color = SF::Color.new(64_u8, 64_u8, 64_u8) container = Glass::VerticalContainer.new() container + Glass::Example.new(128_u8, 64_u8, 32_u8) container + Glass::Example.new(32_u8, 128_u8, 64_u8) container + Glass::Example.new(64_u8, 32_u8, 128_u8) ui + container ui end ``` Starting the window now is pretty easy! ```ruby widget = new_ui window = Window.new "Glass Window", widget window.run ``` the application should end up looking like this  *Note: this is heavily W.I.P. and no useful functionality has been exposed yet* ## Contributing 1. Fork it ( https://github.com/nilsmartel/Glass/fork ) 2. Create your feature branch (git checkout -b my-new-feature) 3. Commit your changes (git commit -am 'Add some feature') 4. Push to the branch (git push origin my-new-feature) 5. Create a new Pull Request ## Contributors * [[nilsmartel]](https://github.com/nilsmartel) nilsmartel - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Aug 18, 2021
- Crystal
0.35.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/nilsmartel/Glass
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 1