SC_AddToolbarButton

Usage

void SC_AddToolbarButton( int ToolbarNumber, string &caption, string &ImageFilename, string &TriggerText, int LocalOnly)


Summary

Adds a button or seperator to an existing toolbar which was created using SC_CreateToolbar.


More Information

- ToolbarNumber = The toolbar number to add the button to.  This number would have been specified when calling SC_CreateToolbar.
- caption = The button text (displayed then the hover moves the mouse over the button)
- ImageFilename = (this does not work yet, just pass an empty string or "SpecialSeperatorButton" to add a seperator).
- TriggerText = the script to run when the button is pressed (use \" for double quotes within the text).
- LocalOnly = set to 1 to only display on the current machine during network games, else set to 0.


Example

// add 2 buttons
SC_AddToolbarButton( 0, "Kill Player", "", "SC_SetObjectHits( SC_GetPlayerObjectId(), 0);", 0);
SC_AddToolbarButton( 0, "Show a Message", "", "SC_GameMessage(\"Hello World!\");", 0);

// add a seperator
SC_AddToolbarButton( 0, "", "SpecialSeperatorButton", "", 0);


Last Revised: 10 May 2008

Full Functions List


Copyright 2008 to 2009 by James Bunting
www.jbplay.com/games/rod3d/

This page was automatically generated by James' Script Docs Generator