Jump to content

Can i call function with arguments in CASTORGUI


swat0284
 Share

Recommended Posts

Hello
Can i call function with arguments in CASTORGUI?
i want to do stg like that

guiTextureMaterial = new CASTORGUI.GUITexture("guiTextureMaterial","data/shader_change_transp.png",{x: guisystem.getCanvasWidth().width-(196/3) , y: (guisystem.getCanvasWidth().height - (196/3) ), w: 196/3, h: 204/3},guisystem,ShowMaterialDialog("shaderColorRed"));

now i cant call ShowMaterialDialog without ("parametrs")

Link to comment
Share on other sites

Yes, try this: function() { ShowMaterialDialog("shaderColorRed");}

guiTextureMaterial = new CASTORGUI.GUITexture("guiTextureMaterial","data/shader_change_transp.png",{x: guisystem.getCanvasWidth().width-(196/3) , y: (guisystem.getCanvasWidth().height - (196/3) ), w: 196/3, h: 204/3}, guisystem, function() { ShowMaterialDialog("shaderColorRed");} );

This function will be executed after a click on the image.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...