Can SimpleDialog windows remember their position?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Can SimpleDialog windows remember their position?

Post by 7feet »

Basically, I'd like to be able to simulate a persistent window across several tools. Say, a Button tool to open up a dialog that includes every bone perameter imaginable, that can be moved out of the way, and then be re-called in position and kept updated as a coroutine inserted into all the bone tools. It's not so much use if it keeps moving right back to the middle of the screen. Haven't been able to figure if this is possible. Is there a parameter that can be passed to the dialog, or maybe thats part of the SimpleDialogRegister function that ins't used in any of the current scripts? This one thing would be really useful.

Also, and I believe something had been asked about it in an earlier post - reading through "Programming in Lua" I noticed that they say that a function called loadlib() is included in the standard Lua distribution for the express purpose of calling functions in external libraries, such as .DLLs in windows, from within Lua. It doesn't seem to be here, was it not included intentionally (maybe a pain to set up or a problem crossplatform-wise)? That would also be a great thing to have, to use external libs or get right to the OS functions. For example you could call one of the existing parsers for SWF's and just do the needed conversions in Lua to make a SWF importer. Thought it might be cool.

--Brian
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

There isn't a way to create persistent windows using Lua right now, but maybe we can add that.

The loadlib function was not exposed to Lua scripts I think because we were trying to avoid platform-specific plugins. However, it's not really our job to police what you can and can't do with Lua scripts, so I think we'll turn that function back on for the next update.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Thanks, LM. Always quick on the draw.

But the question remains, kinda. I just wanted to know if script windows could remember their last screen position when opened again. My idea was that if the window closed when you went to another tool in a compatible group, say the bone or layer tools, it would close, but open right back up in the same piece of screen real estate. It wouldn't really be persistant, but would be plenty good enough for the purpose and wouldn't require you to change a lot of stuff. Not saying I would mind the real thing, but I'm sure you have plenty to do.

--Brian
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

I guess I was just answreing the part about whether it was possible now, using some hidden parameters or functions - the answer to that is no. As far as whether it could be done in the future, yeah maybe. I can't guarantee anything, but it sounds like a useful feature to add.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Drat! I was hoping for a workaround. Can't win 'em all. Thanks.

--Brian
Post Reply