World: r3wp
[View] discuss view related issues
older newer | first last |
Henrik 5-Sep-2010 [10248] | not sure the event system allows this. |
Nicolas 5-Sep-2010 [10249x5] | Shouldn't it? |
In windows, if I do this then the left mouse down is interrupted by the right mouse click | |
In rebol, the only thing that stops a left mouse drag is left mouse up. | |
How does the event system work? | |
Surely we can fix this. | |
Henrik 5-Sep-2010 [10254] | I'm not sure if it's easy to fix. Cyphre would know whether it's possible. |
Nicolas 5-Sep-2010 [10255] | How do I get in contact with him? |
Henrik 5-Sep-2010 [10256x2] | He is usually offline in the weekend, but he may come online tomorrow. |
beware though, that this may not be fixable. | |
Graham 5-Sep-2010 [10258] | I think it's been asked for a few times in the past ... |
ICarii 5-Sep-2010 [10259x2] | There is a hotkit file that can be modified to add ALT support but then you need to create pass-thru scenarios for general window meta commands if you want the application to behave normally - eg ALT-F4 etc. |
s/hotkit/hostkit* | |
Cyphre 6-Sep-2010 [10261] | Nicolas: It looks in R2 the scenario you described doesn't work (don't ask me why, I have no access to the R2 sources). But in R3 you can normally detect the RMB while LMB is down. |
Maxim 9-Sep-2010 [10262] | does anyone have documentation for the R2 SHAPE subdialect within draw? the rebol.com does doesn't have ANY information on them... and i'm totally at loss in trying to figure it out... its just creating random shapes for me right now. |
Graham 9-Sep-2010 [10263x2] | eh? Lots of examples http://www.rebol.com/docs/draw-ref.html |
Does Rebol support holy images? http://synapse-ehr.com/forums/showthread.php?133-VID-delete-area | |
Henrik 9-Sep-2010 [10265] | try an alpha instead of white. |
Graham 9-Sep-2010 [10266] | If you cut part of an image out, the rest of the image collapses in. |
Graham 12-Sep-2010 [10267] | If you had a requirement to log a user out of an application after a period of inactivity... what's the best way to do this? |
Gregg 12-Sep-2010 [10268] | I don't know of a single best way. One of the key elements, though, is determining what constitues "activity". If you have a central command dispatch loop of some kind, and every command that indicates activity goes through that makes it easier. Then you probably have some kind of default state that is used when the app starts up, and you revert to that. Of course, if you have useful state that you throw away the user won't be happy. |
Graham 12-Sep-2010 [10269] | Hmm... so no way to monitor view events |
Anton 13-Sep-2010 [10270] | You could have the remote client app monitor its own View events, and when there are some within 5 minutes, send a "I'm still here" message to the server. If the server doesn't receive any of those for an hour, then logout that client. |
Dockimbel 13-Sep-2010 [10271] | Graham: >> help insert-event-func |
Graham 13-Sep-2010 [10272] | thanks .. so I can use insert-event-func to monitor global events and just pass them on. If I don't get any user events I can lock the screen until the user types in a password |
Henrik 13-Sep-2010 [10273] | perhaps you can set a rate on the window face. |
Graham 13-Sep-2010 [10274] | I already have one that sends a heart beat to the server |
Maxim 13-Sep-2010 [10275] | you can also patch the wake-event for even more control, but insert-event-func should be sufficient for your needs. |
amacleod 14-Sep-2010 [10276] | In general, using chroma keying is it possible to vary the level of transparency? I've been playing with cyphre's "Transparency window under View" script and I do not seem to be able to change transparency levels when using chroma keys. I know this script is using window's user32.dll and it's not using draw to do the effect. |
Maxim 15-Sep-2010 [10277x3] | it will depend on what you mean by "chroma keying". most people in the PC world interpret it as a single color value becomes 100% transparent (like a .bmp). in the VFX world chroma keying is a range using an alpha channel mask (like a .png, for example). so yes it is possible. IIRC, windows supports an alpha plane to manage the transparency, but I have not played with this myself yet. |
R2's chroma key effect uses a single color as the transparency. so you'd need to build an alpha image using a range based on luma or some other more complex algorithm... which you can easily find on the net. | |
usually, you pick a center point, and decide on a range. you can filter out the transparency with additional parameters like luma, saturation and things like that. basically adding or removing from each previous step, until you get the alpha channel mask you want. | |
amacleod 15-Sep-2010 [10280x2] | I wanted to create a near transparent window onto another windows app so I could draw/sketch over it like they do on tv during a football game. playing with Cyphre's script the transparency works on the whole window including title bars and borders. Perhaps I could use a chrome key to get full transparency on the area I want to see throught to and lay over that a draw based semi-transparent object to draw on....I'll do some experimenting. Else I will need to make the whole project Rebol and not use this "cheat" |
Anyone play around with particle/plasma generators on rebol...I think I remember a script that had like a plasma effect. I want to try and mimick fire and smoke....does not have to be super realistic.... | |
Maxim 15-Sep-2010 [10282x16] | is this done as an interactive process? |
game engines use this simple system. -create very transparent images with a gaussian fall off. actually give the prefered shape to your image... so if you want a triangle-like flame, generate a smooth triangle with alpha/color falloff. -create a block which will store a list of pairs, each one holds the position of a single "particle" | |
the idea is that points are inserted/removed in lifo order, with the order determining age. | |
decide on a number of particles, lets say count: 20 | |
decide on a particle life time... lets say life: 10 | |
then go over the list, picking up count amount of particles at at time with life number of interations. the life iteration is used to calculate age: life / life-counter | |
then based on age, move the particles according to some simple randomized algorithm. try to use something to ground their direction... sometimes refering to previous particles allows you to make movement constant... so lets say: new-position: current-particle + 0x5 + random either greater? last-particle/x current-particle/x [5][-5] | |
then move the particle to the appropriate position in the face. as they spread out, they will disapear. | |
all is left, is to add/remove new pairs to your list, basically, the last iteration knocks off old particles from the list and inserts new ones at your fire origin. | |
if you want smoke, just add the "dying" particles to a second list, using the same process, to animate them but with a bigger/softer image. the dying fire becomes the birth of the smoke. | |
for the particles, either pregenerate (and simply offset) small faces with an transparent image or build an AGG block at each refresh. | |
you can even blur aging particles by adding an effects block to them as they age. but that will probably kill the refreh | |
they only unknown is how many particles you can have before view really starts to slow down | |
also make sure to only call show on the region of your graphics which will really contain particles... there no point in blitting the whole house if only the window is on fire. | |
the plasma effect you saw used repetitive blur to an image, with new particles added and some offset added to the previous image. the problem with this is that you cannot change the color and the fact that the whole image gets faded. it could work if R2's effect system also managed the alpha channel but it doesn't AFAIK. | |
Hope this helps! | |
older newer | first last |