[SOLVED][October update] Possible regression

oripessach

  • *
  • Posts: 259
Hi,

I previously used this code to manipulate the dialog window position in my game:

Code: [Select]
DataStructures.get("Dialog Window").position = new scripts.ds.dialog.RatioPoint(20 + offset, 0., 60, 0.);
Recently, this stopped working. The code runs, and I verified that the position variable is updated, but the window doesn't change position. Has something changed recently that could break this?

« Last Edit: October 20, 2015, 09:24:21 pm by Justin »

Justin

  • *
  • Posts: 4335
I made a change recently to increase performance for windows that aren't being tweened, but nothing that should change where it's being drawn.

Note that the variable you're setting is only accessed when a window is created and when the size of its content changes. If you change the window template's position while dialog is displayed, reposition() needs to be called on the window itself to pick up the change.

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

oripessach

  • *
  • Posts: 259
I change the position before opening the dialog.

Here's something weird - I don't know whether it's relevant or not. My extensions tab in the palette looks like the attached image. Could I be changing the wrong thing?

Justin

  • *
  • Posts: 4335
Hm.. come to think of it, I might have forgot to update some block definitions. Try this.

Code: [Select]
com.polydes.datastruct.DataStructures.get("Dialog Window").position = new scripts.ds.dialog.RatioPoint(20 + offset, 0., 60, 0.);
But if that makes it work, that begs the question.. why did the previous one compile at all? Maybe a clean project will fix (or rather, break) it.

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

oripessach

  • *
  • Posts: 259
Seems like you're right: Adding the prefix fixes the issue I had, and cleaning the project made the old code stop compiling. Thanks!

The only remaining issue is the empty Data Structures Extension in the palette, but I can live with that.