librelist archives

« back to archive

decision driven fairy tale - update

decision driven fairy tale - update

From:
Sebastjan Hribar
Date:
2013-02-19 @ 09:02
Hi,

I just wanted to let you know about the progress of this project with
which I still need some help or advices:)

I was ill for the past tow weeks so not much was accomplished and I'm
behind with the progress, since I need to finish in a weeks time.

I've updated the project on github
https://github.com/sebastjan-hribar/princ

Just a side note: I was advised a while back to setup a roadmap, but I
still haven't learned how to do that on github, so I just added the TODO
in the readme for now. (how should I setup an actual roadmap? -thank you
in advance for clarifying)

I've just figured out how to implement the last item in the TODO list. I
will upadate as soon as I implement it. 

kind regards,
seba

Re: decision driven fairy tale - update

From:
Sebastjan Hribar
Date:
2013-02-19 @ 19:54
Hi,

I have a question about image and links. Is it possible to pass a link
to an image to serve instead of the text for a link?

instead of

link("Link to something", :click => '/something')

I'd like to have

link(image "images/link.png, :click => '/something')

I've tried a few different ways but no success. I know that in NKS _why
says not to put image in a link or para, but instead use flows. What
exactly does that mean? Is there a workaround to have an image in a
link?

regards,
seba

Dne 19.02.2013 (tor) ob 10:02 +0100 je Sebastjan Hribar napisal(a):
> Hi,
> 
> I just wanted to let you know about the progress of this project with
> which I still need some help or advices:)
> 
> I was ill for the past tow weeks so not much was accomplished and I'm
> behind with the progress, since I need to finish in a weeks time.
> 
> I've updated the project on github
> https://github.com/sebastjan-hribar/princ
> 
> Just a side note: I was advised a while back to setup a roadmap, but I
> still haven't learned how to do that on github, so I just added the TODO
> in the readme for now. (how should I setup an actual roadmap? -thank you
> in advance for clarifying)
> 
> I've just figured out how to implement the last item in the TODO list. I
> will upadate as soon as I implement it. 
> 
> kind regards,
> seba

Re: [shoes] Re: decision driven fairy tale - update

From:
Arne Brasseur
Date:
2013-02-22 @ 09:05
Hi Seba,

An image is kind of like a link already, just pass it a block with
what it should do when you click it.

image('images/link.png') { visit '/something' }

Arne

On 19 February 2013 20:54, Sebastjan Hribar <sebastjan.hribar@gmail.com> wrote:
> Hi,
>
> I have a question about image and links. Is it possible to pass a link
> to an image to serve instead of the text for a link?
>
> instead of
>
> link("Link to something", :click => '/something')
>
> I'd like to have
>
> link(image "images/link.png, :click => '/something')
>
> I've tried a few different ways but no success. I know that in NKS _why
> says not to put image in a link or para, but instead use flows. What
> exactly does that mean? Is there a workaround to have an image in a
> link?
>
> regards,
> seba
>
> Dne 19.02.2013 (tor) ob 10:02 +0100 je Sebastjan Hribar napisal(a):
>> Hi,
>>
>> I just wanted to let you know about the progress of this project with
>> which I still need some help or advices:)
>>
>> I was ill for the past tow weeks so not much was accomplished and I'm
>> behind with the progress, since I need to finish in a weeks time.
>>
>> I've updated the project on github
>> https://github.com/sebastjan-hribar/princ
>>
>> Just a side note: I was advised a while back to setup a roadmap, but I
>> still haven't learned how to do that on github, so I just added the TODO
>> in the readme for now. (how should I setup an actual roadmap? -thank you
>> in advance for clarifying)
>>
>> I've just figured out how to implement the last item in the TODO list. I
>> will upadate as soon as I implement it.
>>
>> kind regards,
>> seba
>
>

Re: [shoes] Re: decision driven fairy tale - update

From:
Sebastjan Hribar
Date:
2013-02-22 @ 13:31
I've tried what you suggested but it doesn't work.

I also tried image "images/link.png, :click => '/something'

but an image requires a proc, but it doesn't work with proc either.

Is it  a problem because I am using green shoes?

Anyway this is just something I'd like to have, it's no big deal, I can
just use regular links.

regards
seba

Dne 22.02.2013 (pet) ob 10:05 +0100 je Arne Brasseur napisal(a):
> Hi Seba,
> 
> An image is kind of like a link already, just pass it a block with
> what it should do when you click it.
> 
> image('images/link.png') { visit '/something' }
> 
> Arne
> 
> On 19 February 2013 20:54, Sebastjan Hribar <sebastjan.hribar@gmail.com> wrote:
> > Hi,
> >
> > I have a question about image and links. Is it possible to pass a link
> > to an image to serve instead of the text for a link?
> >
> > instead of
> >
> > link("Link to something", :click => '/something')
> >
> > I'd like to have
> >
> > link(image "images/link.png, :click => '/something')
> >
> > I've tried a few different ways but no success. I know that in NKS _why
> > says not to put image in a link or para, but instead use flows. What
> > exactly does that mean? Is there a workaround to have an image in a
> > link?
> >
> > regards,
> > seba
> >
> > Dne 19.02.2013 (tor) ob 10:02 +0100 je Sebastjan Hribar napisal(a):
> >> Hi,
> >>
> >> I just wanted to let you know about the progress of this project with
> >> which I still need some help or advices:)
> >>
> >> I was ill for the past tow weeks so not much was accomplished and I'm
> >> behind with the progress, since I need to finish in a weeks time.
> >>
> >> I've updated the project on github
> >> https://github.com/sebastjan-hribar/princ
> >>
> >> Just a side note: I was advised a while back to setup a roadmap, but I
> >> still haven't learned how to do that on github, so I just added the TODO
> >> in the readme for now. (how should I setup an actual roadmap? -thank you
> >> in advance for clarifying)
> >>
> >> I've just figured out how to implement the last item in the TODO list. I
> >> will upadate as soon as I implement it.
> >>
> >> kind regards,
> >> seba
> >
> >

Re: [shoes] Re: decision driven fairy tale - update

From:
J. Kaiden
Date:
2013-02-23 @ 01:18
hey Seba,

> I've tried what you suggested but it doesn't work.

  this doesn't work, or it's not what you're looking for?

 require 'green_shoes'
 Shoes.app do
  img =  image('TradyBlix.png')
  img.click{p "Trady says hi"}
  img.hover{
stroke lime; nofill
@r =rect(img.left, img.top, img.width, img.height)
}
img.leave{@r.remove if @r}
 end

   ...does for me...

  rock/shoes

  - j


On Fri, Feb 22, 2013 at 2:31 PM, Sebastjan Hribar <
sebastjan.hribar@gmail.com> wrote:

> I've tried what you suggested but it doesn't work.
>
> I also tried image "images/link.png, :click => '/something'
>
> but an image requires a proc, but it doesn't work with proc either.
>
> Is it  a problem because I am using green shoes?
>
> Anyway this is just something I'd like to have, it's no big deal, I can
> just use regular links.
>
> regards
> seba
>
> Dne 22.02.2013 (pet) ob 10:05 +0100 je Arne Brasseur napisal(a):
> > Hi Seba,
> >
> > An image is kind of like a link already, just pass it a block with
> > what it should do when you click it.
> >
> > image('images/link.png') { visit '/something' }
> >
> > Arne
> >
> > On 19 February 2013 20:54, Sebastjan Hribar <sebastjan.hribar@gmail.com>
> wrote:
> > > Hi,
> > >
> > > I have a question about image and links. Is it possible to pass a link
> > > to an image to serve instead of the text for a link?
> > >
> > > instead of
> > >
> > > link("Link to something", :click => '/something')
> > >
> > > I'd like to have
> > >
> > > link(image "images/link.png, :click => '/something')
> > >
> > > I've tried a few different ways but no success. I know that in NKS _why
> > > says not to put image in a link or para, but instead use flows. What
> > > exactly does that mean? Is there a workaround to have an image in a
> > > link?
> > >
> > > regards,
> > > seba
> > >
> > > Dne 19.02.2013 (tor) ob 10:02 +0100 je Sebastjan Hribar napisal(a):
> > >> Hi,
> > >>
> > >> I just wanted to let you know about the progress of this project with
> > >> which I still need some help or advices:)
> > >>
> > >> I was ill for the past tow weeks so not much was accomplished and I'm
> > >> behind with the progress, since I need to finish in a weeks time.
> > >>
> > >> I've updated the project on github
> > >> https://github.com/sebastjan-hribar/princ
> > >>
> > >> Just a side note: I was advised a while back to setup a roadmap, but I
> > >> still haven't learned how to do that on github, so I just added the
> TODO
> > >> in the readme for now. (how should I setup an actual roadmap? -thank
> you
> > >> in advance for clarifying)
> > >>
> > >> I've just figured out how to implement the last item in the TODO
> list. I
> > >> will upadate as soon as I implement it.
> > >>
> > >> kind regards,
> > >> seba
> > >
> > >
>
>
>

Re: [shoes] Re: decision driven fairy tale - update

From:
Arne Brasseur
Date:
2013-02-23 @ 06:47
Hey Seba, can you show some more of your code with a proc? Maybe I can see
what's wrong.

Cheers

Sent from phone, pardon for brevity.
On Feb 23, 2013 12:08 AM, "Sebastjan Hribar" <sebastjan.hribar@gmail.com>
wrote:

> I've tried what you suggested but it doesn't work.
>
> I also tried image "images/link.png, :click => '/something'
>
> but an image requires a proc, but it doesn't work with proc either.
>
> Is it  a problem because I am using green shoes?
>
> Anyway this is just something I'd like to have, it's no big deal, I can
> just use regular links.
>
> regards
> seba
>
> Dne 22.02.2013 (pet) ob 10:05 +0100 je Arne Brasseur napisal(a):
> > Hi Seba,
> >
> > An image is kind of like a link already, just pass it a block with
> > what it should do when you click it.
> >
> > image('images/link.png') { visit '/something' }
> >
> > Arne
> >
> > On 19 February 2013 20:54, Sebastjan Hribar <sebastjan.hribar@gmail.com>
> wrote:
> > > Hi,
> > >
> > > I have a question about image and links. Is it possible to pass a link
> > > to an image to serve instead of the text for a link?
> > >
> > > instead of
> > >
> > > link("Link to something", :click => '/something')
> > >
> > > I'd like to have
> > >
> > > link(image "images/link.png, :click => '/something')
> > >
> > > I've tried a few different ways but no success. I know that in NKS _why
> > > says not to put image in a link or para, but instead use flows. What
> > > exactly does that mean? Is there a workaround to have an image in a
> > > link?
> > >
> > > regards,
> > > seba
> > >
> > > Dne 19.02.2013 (tor) ob 10:02 +0100 je Sebastjan Hribar napisal(a):
> > >> Hi,
> > >>
> > >> I just wanted to let you know about the progress of this project with
> > >> which I still need some help or advices:)
> > >>
> > >> I was ill for the past tow weeks so not much was accomplished and I'm
> > >> behind with the progress, since I need to finish in a weeks time.
> > >>
> > >> I've updated the project on github
> > >> https://github.com/sebastjan-hribar/princ
> > >>
> > >> Just a side note: I was advised a while back to setup a roadmap, but I
> > >> still haven't learned how to do that on github, so I just added the
> TODO
> > >> in the readme for now. (how should I setup an actual roadmap? -thank
> you
> > >> in advance for clarifying)
> > >>
> > >> I've just figured out how to implement the last item in the TODO
> list. I
> > >> will upadate as soon as I implement it.
> > >>
> > >> kind regards,
> > >> seba
> > >
> > >
>
>
>

Re: [shoes] Re: decision driven fairy tale - update

From:
Sebastjan Hribar
Date:
2013-02-23 @ 10:14
I don't know where I went wrong before, but now this works as I wanted:

------------------------------
image "images/not_help.png", margin: 10, height: 80, width: 80, :click
=> proc {visit '/departure'}
------------------------------


This is taken from line 65 in princ.rb where I tested it
(https://github.com/sebastjan-hribar/princ).

Thank you all again and I am sorry for the confusion.

regards,
seba


Dne 23.02.2013 (sob) ob 07:47 +0100 je Arne Brasseur napisal(a):
> Hey Seba, can you show some more of your code with a proc? Maybe I can
> see what's wrong.
> 
> Cheers 
> 
> Sent from phone, pardon for brevity.
> 
> On Feb 23, 2013 12:08 AM, "Sebastjan Hribar"
> <sebastjan.hribar@gmail.com> wrote:
>         I've tried what you suggested but it doesn't work.
>         
>         I also tried image "images/link.png, :click => '/something'
>         
>         but an image requires a proc, but it doesn't work with proc
>         either.
>         
>         Is it  a problem because I am using green shoes?
>         
>         Anyway this is just something I'd like to have, it's no big
>         deal, I can
>         just use regular links.
>         
>         regards
>         seba
>         
>         Dne 22.02.2013 (pet) ob 10:05 +0100 je Arne Brasseur
>         napisal(a):
>         > Hi Seba,
>         >
>         > An image is kind of like a link already, just pass it a
>         block with
>         > what it should do when you click it.
>         >
>         > image('images/link.png') { visit '/something' }
>         >
>         > Arne
>         >
>         > On 19 February 2013 20:54, Sebastjan Hribar
>         <sebastjan.hribar@gmail.com> wrote:
>         > > Hi,
>         > >
>         > > I have a question about image and links. Is it possible to
>         pass a link
>         > > to an image to serve instead of the text for a link?
>         > >
>         > > instead of
>         > >
>         > > link("Link to something", :click => '/something')
>         > >
>         > > I'd like to have
>         > >
>         > > link(image "images/link.png, :click => '/something')
>         > >
>         > > I've tried a few different ways but no success. I know
>         that in NKS _why
>         > > says not to put image in a link or para, but instead use
>         flows. What
>         > > exactly does that mean? Is there a workaround to have an
>         image in a
>         > > link?
>         > >
>         > > regards,
>         > > seba
>         > >
>         > > Dne 19.02.2013 (tor) ob 10:02 +0100 je Sebastjan Hribar
>         napisal(a):
>         > >> Hi,
>         > >>
>         > >> I just wanted to let you know about the progress of this
>         project with
>         > >> which I still need some help or advices:)
>         > >>
>         > >> I was ill for the past tow weeks so not much was
>         accomplished and I'm
>         > >> behind with the progress, since I need to finish in a
>         weeks time.
>         > >>
>         > >> I've updated the project on github
>         > >> https://github.com/sebastjan-hribar/princ
>         > >>
>         > >> Just a side note: I was advised a while back to setup a
>         roadmap, but I
>         > >> still haven't learned how to do that on github, so I just
>         added the TODO
>         > >> in the readme for now. (how should I setup an actual
>         roadmap? -thank you
>         > >> in advance for clarifying)
>         > >>
>         > >> I've just figured out how to implement the last item in
>         the TODO list. I
>         > >> will upadate as soon as I implement it.
>         > >>
>         > >> kind regards,
>         > >> seba
>         > >
>         > >
>         
>         

Re: [shoes] Re: decision driven fairy tale - update

From:
Douglas Allen
Date:
2013-02-22 @ 05:32
This may not be to helpful but the idea is right. For Windows there is
the Help Workshop generator that lets you make hot spots in an image
which can be used like a link. There also was a Java tutorial or
something that had that same concept. I think that it was called a
mapped image file but not sure today as I haven't worked with these in
a long time.

But there you have it. There should be a way if the image has the attributes.

Re: [shoes] Re: decision driven fairy tale - update

From:
J. Kaiden
Date:
2013-02-22 @ 12:41
hi Seba,

  i'm not sure about passing an image to a link, but you can definitely use
images as buttons (which is basically what links are...)  not sure if this
is what you're looking for, but maybe?

Shoes.app do
img = image "TradyBlix.png"
img.click{p "Trady says hi"}
img.hover{
stroke lime; nofill
@r =rect(img.left, img.top, img.width, img.height)
}
img.leave{@r.remove if @r}
end

  when i use a lot of image buttons like this, i usually define an
'image_button' method in a module or something to save lots of repetitive
code...

  if you want to have a large image with different areas that act as
different 'links', you can make image buttons like above with transparent
(empty) images and position them above your background.  it's a bit of a
cheat, but it works!

  hth, Shoes on!

  - j


On Fri, Feb 22, 2013 at 6:32 AM, Douglas Allen <kb9agt@gmail.com> wrote:

> This may not be to helpful but the idea is right. For Windows there is
> the Help Workshop generator that lets you make hot spots in an image
> which can be used like a link. There also was a Java tutorial or
> something that had that same concept. I think that it was called a
> mapped image file but not sure today as I haven't worked with these in
> a long time.
>
> But there you have it. There should be a way if the image has the
> attributes.
>

Re: [shoes] Re: decision driven fairy tale - update

From:
Sebastjan Hribar
Date:
2013-02-26 @ 15:30
Hi,

I've just finished the version w/o the audio.

You can have a look at https://github.com/sebastjan-hribar/princ

I still need to have the audio recorded and implement it.
And I think I'll dry it up a bit by moving the some story elements,
riddles and maybe also images to a module.

This version is still in Slovenian, I hope I'll have the time to put up
English version soon.

regards
seba

Re: [shoes] Re: decision driven fairy tale - update

From:
ashbb
Date:
2013-03-02 @ 01:21
Hi Seba,

Fantastic!

I've confirmed your princ on my Windows 7. Watch this:
http://www.rin-shun.com/shoes/seba_princ.swf.html

I took a bit long time to find the correct answer for the riddle because I
couldn't read Slovenian, though. :-P

Cheers,
ashbb

Re: [shoes] Re: decision driven fairy tale - update

From:
J. Kaiden
Date:
2013-03-02 @ 01:26
looks great!


On Sat, Mar 2, 2013 at 2:21 AM, ashbb <ashbbb@gmail.com> wrote:

> Hi Seba,
>
> Fantastic!
>
> I've confirmed your princ on my Windows 7. Watch this:
> http://www.rin-shun.com/shoes/seba_princ.swf.html
>
> I took a bit long time to find the correct answer for the riddle because I
> couldn't read Slovenian, though. :-P
>
> Cheers,
> ashbb
>

Re: [shoes] Re: decision driven fairy tale - update

From:
Sebastjan Hribar
Date:
2013-03-02 @ 06:41
> 
> 
> looks great!
> 
> 
> On Sat, Mar 2, 2013 at 2:21 AM, ashbb <ashbbb@gmail.com> wrote:
>         Hi Seba,
>         
>         Fantastic!
>         
thank you both:)

>         I've confirmed your princ on my Windows 7. Watch this:
>         http://www.rin-shun.com/shoes/seba_princ.swf.html

thank you for this great presentation!
>         
>         I took a bit long time to find the correct answer for the
>         riddle because I couldn't read Slovenian, though. :-P
>         
sorry about that:) I forgot to mention that the riddles and solution
images have corresponding keys so one way to avoid endless clicking is
to add puts @riddle so the riddle number is seen in the console and then
just press the corresponding image, so if someone else is gonna try they
can use this shortcut.


I'm halfway through implementing audio, but I decided to entirely avoid
any play buttons. There would be too many. Audio is just gonna roll
according to respective chapters and actions. And of course if you jump
ahead without listening to the chapter in full, the current chapter
audio stops and the next one begins.


regards,
seba
> 
>