I'm trying to figure out the parameters for the 'clientCmdOpenPrintSelectorDlg(%aspectRatio, %a, %b)' function, because I need to call it.
I know it takes three variables, but I only know the first one.
Here's the traces I've used:
clientCmdOpenPrintSelectorDlg(1x1, 24, 0) // On a 1x1 Brick
clientCmdOpenPrintSelectorDlg(2x2f, 7, 7) // On a 2x2f Brick
clientCmdOpenPrintSelectorDlg(1x2f, 14, 10) // On a 1x2f Brick
clientCmdOpenPrintSelectorDlg(1x1f, 24, 0) // On a 1x1f Brick
clientCmdOpenPrintSelectorDlg(2x2r, 0, 7) // On a 2x2r Brick (Both Normal and Upside-Down)
clientCmdOpenPrintSelectorDlg(ModTer, 24, 22) // On a ModTer Brick
The first one is clearly the printAspectRatio. As for the others, I have no idea. I've only deduced that they're constant. No matter the color, print, position, etc, these remain constant for the type of brick.
I know that neither one of the last two parameters can be datablocks.
Right now, I only know to call it like this:
commandToClient(%client, 'OpenPrintSelectorDlg', %brick.getDatablock().printAspectRatio, %a, %b);
And just to a switch/case on the aspect ratio.
This is one of these moments where having certain functions being open source and/or documented would be awesome.