FEATURE: updateView()

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
Post Reply
User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

FEATURE: updateView()

Post by wolph42 »

I was wondering, is it possible to have a function that: when called, it updates the current view and 'transmits' is through the server to the clients.
Currently the view is updated AFTER the macro is done. You could e.g. use a loop to update the x/y position of a token 10 times, but you will only see the last step.

The only way round this is by using deferred macro calls (as that effectively closes a macro thread and then starts a new one).

It would however be wonderful if the system could be forced to update on a call. This would simplify animations immensily and probly other stuff as well (which i can't think of currently).

O have no clue how hard it is and its certainly not top priority, but fits the 'nice to have' category quite nicely!

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: updateView()

Post by JamzTheMan »

It actually may not be to hard to make the call but...

We would need to test but it MAY be possible. It's one of those, it's either easy and just a call to the server to "update" or it's a can of worms.

Just have to make sure in that if the call is made, tokens stay in context and all that and that it doesn't "flush" anything in memory that would be needed later in the macro...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: FEATURE: updateView()

Post by RPTroll »

How about a built in delay function as well?
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: updateView()

Post by JamzTheMan »

That would be a little more tricky. Holding thread processing and all that.

In what context would you use it?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: FEATURE: updateView()

Post by RPTroll »

For animations. Move, update map view, pause, repeat.
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: updateView()

Post by JamzTheMan »

Ah ok, I can see it now. Nice cut scene macro could switch to a map, zoom in on slowly on an image, pan over, slowly zoom out...

Sold.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: FEATURE: updateView()

Post by wolph42 »

JamzTheMan wrote:Ah ok, I can see it now. Nice cut scene macro could switch to a map, zoom in on slowly on an image, pan over, slowly zoom out...

Sold.
funny, that was exact why I started this thread, I was testing the new zoom function...
o and dont' forget the music score in the background!

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: FEATURE: updateView()

Post by wolph42 »

RPTroll wrote:How about a built in delay function as well?
upto now the only 2 times I use a delay function are:
1. animations
2. onTokenSelectEvent (which fires off 3 times in a row when you select a token, so I use a 'delay' before it can be run again)

its only in animations though that its actually a function called 'delay(). The other is a much more complicated implementation where effectively you never see the function 'delay()' appear.

Hence delay() afaik would only be used in animations AND it would only be used icw updateView(). Hence would it not be better to have:

Code: Select all

updateView(delay)

And if you want to make it really fancy it checks when the last 'updateView' was called and the delay references to that call. So
[udpateView(10)] means that it will update the view AFTER at least 10ms have passed since the last updateView. (and if its the first it will thus execute immediately)


User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: FEATURE: updateView()

Post by RPTroll »

I like the idea of delay as a parameter.

There may be more use cases for delay(), such as in forms and dialogs.

Don't forget on-map dice rolls <ducks>
:mrgreen:
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

Post Reply

Return to “MapTool 1.4”