request for scrolling script window script

hi,
Is there a simple section of code I can add to blender scripts
to make the script window ‘middle mouse’ scrollable.
I have seen this done in a layer manage script, possibly from AHD.

Edit: code is from uselessdreamer, apologys.

Depending on my workflow, often I run scripts in a quarter window.
Scripts such as discombobulator as an example, require half screen.

Any help would be great.
Thanks, Brendon.

I have found the code it appears to be:

def event(evt, val):
global offset
if evt == Draw.ESCKEY or evt == Draw.QKEY or evt == Draw.RIGHTMOUSE:
Draw.Exit()
return
if evt == Draw. WHEELUPMOUSE:
offset = offset +20
Draw.Redraw(1)
if evt == Draw. WHEELDOWNMOUSE:
offset = offset -20
Draw.Redraw(1)

So… Again I ask, how would I modify other scripts to incorperate
these lines of code.

Eg; (but not restricted to) Discombobulator.

So I can easily access scripts from a smaller, scrollable window.

#3ds max & maya both have this style of window availiable.

thanks b.

it looks from the code that WHEELUPMOUSE and WHEELDOWNMOUSE are taken in like keys, like the escape key just before it… what is offset defined as? somehow it must be connected to drawing the GUI, probably it is a value wihtin the “def gui()”

for example I would expect a line like this:
glRasterPos2i(10, offset+20) # 20 being the default position for this item
so any increase of decrease would just be added and it would redraw. …

can you link to the full code that you lifted those lines from?

Hi, patrick7,
The script can be found here:
http://uselessdreamer.byethost32.com/layer_manager.html

I am not good at code but this is helping.

Thanks, Brendon.

yeah, what i wrote below is exactly what was done… it simply is needed to be done on every positioning line for each item of the gui.

You are right offset is just a value to shift the position of each element on the script

Im sorry its impossible to me right now to help you with that great idea of somehow make a standard script layout, but feel free to use anything you need from my code :slight_smile:

Next week if i have time i may release the code to make these:
The mouse wheel scroller
Paragraph text
Multiline tooltips
and the help system as implemented in blender library

Regards
Mariano

Thanks Mariano,

That Is Fantastic, I’m going to try some stuff out and see what I can get working.

The aim is to help with the developement of the cvs and test better
ease of use for scripts.:slight_smile:

                            Thanks, Brendon.