resizing windows
[1/5] from: gchiu::compkarori::co::nz at: 14-Oct-2001 12:23
I'm looking for a simple example of two layouts, that can
resize independently of the other. In other words, I get a
resize event, I want to be able to distinguish which layout
the event came from and just resize that one.
Also, how can one determine whether q layout is visible, or
has been unviewed ?
--
Graham Chiu
[2/5] from: gchiu:compkarori at: 16-Oct-2001 8:39
On Sun, 14 Oct 2001 12:21:16 +0200
"Cyphre" <[cyphre--seznam--cz]> wrote:
> Just played first game of your GOMOKU with Carl Read. I
> enjoyed it well.
> Really cool ;) So here you are two different techniques
> how to resize
> independly more layouts:
Thanks, that was very useful.
--
Graham Chiu
[3/5] from: gchiu:compkarori at: 16-Oct-2001 8:41
On Mon, 15 Oct 2001 00:04:52 +1200
Carl Read <[carl--cybercraft--co--nz]> wrote:
> > Just played first game of your GOMOKU with Carl Read. I
> enjoyed it
> > well. Really cool ;)
Except in the course of some changes, I have now killed it
and can't figure out why :(
> Yes, was good. Cyphre mentioned though that it'd be nice
> to have the
> chat client and game in the same window, which I agree
> with, at least
> for player-to-player chat.
>
Yep, done that - except you can't play now!
--
Graham Chiu
[4/5] from: cyphre:seznam:cz at: 14-Oct-2001 12:21
Hi Garam,
Just played first game of your GOMOKU with Carl Read. I enjoyed it well.
Really cool ;) So here you are two different techniques how to resize
independly more layouts:
----------------first example-----------------------
l1: layout [b1: box red]
l2: layout [b2: box blue]
l1/data: "l1" ;I choose "system" 'data but you can use your own ;)
l2/data: "l2"
f: func [f e][
if e/type = 'resize [
switch e/face/data [
"l1" [b1/size: l1/size - 40x40 show b1]
"l2" [b2/size: l2/size - 40x40 show b2]
]
]
return e
]
insert-event-func :f
view/new/options l1 [resize]
view/new/options/offset l2 [resize] 250x25
wait []
----------------end of first example-------------------------
----------------second example-----------------------------
l1: layout [b1: box red with [feel: make feel [
redraw: func [f a o][
if a = 'show [
f/size: l1/size - 40x40
]
]
]]
]
l2: layout [b2: box blue with [feel: make feel [
redraw: func [f a o][
if a = 'show [
f/size: l2/size - 40x40
]
]
]]
]
f: func [f e][
if e/type = 'resize [
show e/face
]
return e
]
insert-event-func :f
view/new/options l1 [resize]
view/new/options/offset l2 [resize] 250x25
wait []
-------------------------end of second example------------------------------
I hope this will help you to finish resizing in your GOMOKU client ;)
Enjoy it! And keep up the cool work.
regards,
Cyphre
[5/5] from: carl:cybercraft at: 15-Oct-2001 0:04
On 14-Oct-01, Cyphre wrote:
> Hi Garam,
> Just played first game of your GOMOKU with Carl Read. I enjoyed it
> well. Really cool ;)
Yes, was good. Cyphre mentioned though that it'd be nice to have the
chat client and game in the same window, which I agree with, at least
for player-to-player chat.
Carl Read. (Who's too polite to mention who won.;)