UI function parameter.

#1
Hi, ALLAH bless you,

Could you tell me, how can i declare my function parameters in "C++" code?

Code: Select all

   if (gEnv->pFlashUI)
   {
      IUIElement *playerInterface = gEnv->pFlashUI->GetUIElement("Player_interface");
      if (playerInterface)
      {
         playerInterface->CallFunction("addToBag");
      }
   }

Re: UI function parameter.

#2
Check my tutorial about inventory system. Exactly in this part aroud 16:50 I show how to pass arguments:
https://www.youtube.com/watch?v=tzBatQJPCLk&t=41s

Code: Select all

SUIArguments args;
args.AddArgument(YourArgument);
args.AddArgument(NextArgument);
pElement->CallFunction("FunctionName", args);


You can add as many arguments as you want.
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20

Re: UI function parameter.

#3
Hi! :) Works.

ALLAH bless you, have nice day.

Code: Select all

   if (gEnv->pFlashUI)
   {
      IUIElement *playerInterface = gEnv->pFlashUI->GetUIElement("Player_interface");
      if (playerInterface)
      {
         CryLogAlways("addToBag");

         SUIArguments addToBagArgumentA;

         addToBagArgumentA.AddArgument("qsplace");
         addToBagArgumentA.AddArgument(6);
         addToBagArgumentA.AddArgument("false");

         playerInterface->CallFunction("addToBag",addToBagArgumentA);
      }
   }

Who is online

Users browsing this forum: No registered users and 1 guest

cron