Font size for menus and pop-up menus, Adding functions to the right-click menu – Apple Shake 4 User Manual

Page 369

Advertising
background image

Chapter 14

Customizing Shake

369

Font Size for Menus and Pop-Up Menus

In the startup directory:

// It can take the following values:
//tiny, small, medium, big, std
gui.menu.fontSize= “std”;

This should be in a ui .h file, but it must be set before the interface is built, so it goes in
a startup file. The example is “tiny.” The default is “std.”

Adding Functions to the Right-Click Menu

In the ui directory:

nuiPushMenu(“NRiNodeViewPopup”,1);

nuiPushMenu(

“This Creates a Sub-Menu”,0
);
nuiMenuItem(

“Grad”,
nuiToolBoxMenuCall({{Grad()}})

);
nuiPopMenu();

This is an example that creates a subtab called “This Creates a Sub-Menu” in the Node
View, and attaches the Grad function to its list. This is just one example. Take a look at
the nrui.h file, where all right-click menus are built. The first line declares under what
menu it is built, so typically these commands are added directly into the nrui.h file.

Advertising