Wed Sdk revisited

Posted By: LarryLaffer

Wed Sdk revisited - 10/29/08 22:24

Hello again,

I just had a chance to test the latest wed-sdk that was designed for A7.50. The results weren't so good.

Bug a) You can now position a menu item exactly where you want and also be able to put separators in, but these latest changes caused it to break adding a menu item on the 'right click' pop up menu.

Here's the pop-up menu with WED a7.07 and my Intense X plugin:



and here's it again with WED 7.50 and the intense X plugin compiled with the latest wedsdk: (it's actually the same when compiled with the old wed-sdk)




While the new menu positioning commands do the trick for any other kind of menu, for the pop-up menu they don't really help at all and it's actually worse than before cause now the menu item won't even show up at the bottom like before.


Bug b) Actually not a bug, but there's still no way to change the main script that loads when a level is tested from WED. (I call my wish function "int wdl_SetMainScriptName ( char * reName, int bufSize)"). I tried to do this manually but the .wmp files are encrypted which is why it's so important for me to have the wedsdk support this.


Thank you,
Aris
Posted By: jcl

Re: Wed Sdk revisited - 10/30/08 12:20

Yes - there's apparently something wrong in the pop up menu. We'll take care of this, also with the main script setting function. I thought it were already implemented, but maybe it's not yet documented.
Posted By: Wlad

Re: Wed Sdk revisited - 10/30/08 14:10

a) Can you post the definition for the 'Intense X Action' action? I will test it.

b) With this inline function ‘wed_SetMainScript’ you can set the new script - this function is defined as:

typedef enum {
WCMD_NULL,

WCMD_GETDIRECTORY,
WCMD_REDRAWALL,
WCMD_RECALCULATE_LEVEL,
WCMD_NDEF_4,
WCMD_NDEF_5,
WCMD_NDEF_6,
WCMD_NDEF_7,

WCMD_LOADLEVEL,
WCMD_SETMAINSCRIPT, // ab v6.873


inline int wed_SetMainScript(CWedInterface & wpi,const char * name, int len)
{
return wpi.DoCommand(0, WCMD_SETMAINSCRIPT, (void*)name, len);
}

Posted By: LarryLaffer

Re: Wed Sdk revisited - 10/30/08 18:44

Hello Wlad,

a) Here it is:

Code:
	{
//PISTC_PROCEDUREDEF:
		0,
		PIPD_COMMONTOOL,
		0,

		"IntenseX Action",
		ViewContextMenu"\\IntenseX Action{{behavior",
		NULL,
		NULL,
		NULL,

		& g_ProcDefList [ IDA_CHOOSEACTION],
		ChooseAction_Open,
		NULL,
		NULL,
		NULL,

//PI eigene daten
		FALSE,
		NULL,
		0,
		NULL,
		NULL
	},



The code just does not work on the pop up menu anymore although it works fine on the WED menu. If it makes it easier, the item does indeed gets created as a separator line, so if you actually click on the separator:



the Intense X action window will actually pop up. Btw, the "{{behavior" has absolutely no effect in this case, I get the same result with and without it.


b) Thank you. This code works great. You can't believe how important this function was to me. I just assumed it didn't made it to the new wedsdk cause the newfeatures.txt only mentioned the menu positioning stuff. Thanks again for this!


New Bug c) In a7.07 there was a very useful instruction where you could specify which of your dll menu options you still wanted to be visible even when no level was loaded in WED. Obviously, you could use such a feature to create a new level using your plugin instead of creating it from wed, like such:



This no longer works with A7.50's WED:



Here's the code on the New Intense X Project menu entry:

Code:
		{
//PISTC_PROCEDUREDEF:
		PIFL_MAINFRAMEMENU,
		PIPD_COMMONTOOL,
		0,

		"New IntenseX Project",
		"File\\New IntenseX Project",
		NULL,
		NULL,
		NULL,

		& g_ProcDefList [ IDA_NEWINTENSEXPROJECT],
		NewIntenseXProject_Open,
		NULL,
		NULL,
		NULL,  // p_DoCommandProc

//PI eigene daten
		FALSE,
		NULL,
		0,
		NULL,
		NULL
	},


It was the PIFL_MAINFRAMEMENU command that allowed a menu item to be visible at start, but in A7.50 it does squat

Cheers,
Aris
Posted By: Wlad

Re: Wed Sdk revisited - 10/31/08 07:58

Thanks, I will test it...
Posted By: LarryLaffer

Re: Wed Sdk revisited - 11/14/08 21:34

Just got A7.56 and I just wanted to say thanks for taking care of both bugs
© 2024 lite-C Forums