Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Screenshots in Gosu and Gosu for Ruby
- By kyonides Date 2010-04-30 22:56
Well, if Gosu doesn't include the take screenshots feature already, it'd be nice to get it in a new version. Then the scripter would decide what he could do with it like using the screenshot as a window background image or creating a photo album or so.
- By jlnr (dev) Date 2010-05-01 04:23
Since I am way behind the features that have been asked for right now, feature requests work better if you already have the actual game depending on them. If so, let me know and please use the workarounds from this thread in the meantime: http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?pid=189
- By banister Date 2010-05-01 15:58
can also use Devil to take a screenshot:

require 'rubygems'
require 'devil/gosu'

window.screenshot.save("screenshot.png")

where screenshot is an instance method on Gosu::Window
- By kyonides Date 2010-05-01 23:43
I got this error message after I tried to install devil gem

/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lIL... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
  --with-opt-dir
  --without-opt-dir
  --with-opt-include
  --without-opt-include=${opt-dir}/include
  --with-opt-lib
  --without-opt-lib=${opt-dir}/lib
  --with-make-prog
  --without-make-prog
  --srcdir=.
  --curdir
  --ruby=/usr/bin/ruby1.9.1
  --with-ILlib
  --without-ILlib
- By jlnr (dev) Date 2010-05-02 05:08
Seems you need to have libIL first. Maybe the DevIL gem should print a list of packages to install in extconf.rb too, I think it worked well for Gosu. :)
- By banister Date 2010-05-02 08:02
instructions for installing DevIL are found here: http://banisterfiend.wordpress.com/2009/10/14/the-devil-image-library-for-ruby/

basically jlnr is right, you have to install the devil libraries first :) (separate instructions for the different OSes given in the link above :))
- By kyonides Date 2010-05-03 06:04 Edited 2010-05-03 06:10
Well, I knew it'd be necessary but I was lazy and didn't want to find the devil install info by myself hehehe.

Thanks for the info, banister.
Up Topic Gosu / Gosu Exchange / Screenshots in Gosu and Gosu for Ruby

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill