[Newbie] Use FXRuby to move an image on a canvas?

E

Einar Buffer

Hi,

As a learning exercise, I'm planning on writing a simple card game in Ruby,
using FXRuby for graphics. I'd like the user to be able to grab a card using
the mouse, and move it to a new location. Is that supported by FXRuby at the
moment? In the FXRuby User's Guide online, it seems that the functionality
I'm talking about is on the to-do list, but is that up to date? And finally,
if it's not supported - have any of you implemented such a widget e.g. in
C++ and used it in FXRuby? Is that hard to do?

Kind regards,
Einar
 
L

Lyle Johnson

As a learning exercise, I'm planning on writing a simple card game in Ruby,
using FXRuby for graphics. I'd like the user to be able to grab a card using
the mouse, and move it to a new location. Is that supported by FXRuby at the
moment? In the FXRuby User's Guide online, it seems that the functionality
I'm talking about is on the to-do list, but is that up to date? And finally,
if it's not supported - have any of you implemented such a widget e.g. in
C++ and used it in FXRuby? Is that hard to do?

There is no such widget in FXRuby at this time, and I'm not aware that
anyone's written one. If you get any leads on this I'd like to hear
about it!
 
S

Shashank Date

Hi,


There is no such widget in FXRuby at this time, and
I'm not aware that anyone's written one.

May be I am over simplifying this, but can we not get
something like this to work using the bounce.rbw
sample that comes with the FXRuby samples and adding
the ability to track the mouse motion. I remember
having taking inspiration from the bounce.rbw and
scribble.rbw and writing a similar app in wxRuby. It
was not hard and I can dig out the code for you if
required.

Thanks,
-- shanko

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 
M

Martin DeMello

Lyle Johnson said:
There is no such widget in FXRuby at this time, and I'm not aware that
anyone's written one. If you get any leads on this I'd like to hear
about it!

I don't know why frameworks after Tk haven't embraced the desperately
useful concept of a vecotr canvas :( I really miss it when using Fox -
sadly, the rest of Tk is fairly ugly, but if I'm doing a
canvas-intensive app, it's really the best option.

martin
 
J

Joel VanderWerf

Martin said:
I don't know why frameworks after Tk haven't embraced the desperately
useful concept of a vecotr canvas :( I really miss it when using Fox -
sadly, the rest of Tk is fairly ugly, but if I'm doing a
canvas-intensive app, it's really the best option.

Ditto. It's the one part of Tk I miss. I wonder how hard it would be to
port.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top