CustomUI

 From:  Michael Gibson
6507.411 In reply to 6507.410 
Hi Ron, the CustomUI scripts use a button image that is embedded in the script file itself so you'll need to edit the script so the button loads an image file instead of using the embedded image.

To do that go to your MoI appdata startup folder and edit the CustomUI files there like the file "70 ObjLibrary.js" is what adds the "Obj Library" button.
It will currently look like this:

code:
var title = "Obj Library";
var menu = "moi://appdata/customui/ObjLibrary.menu.htm";
var icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGX ...
moi.ui.commandBar.CommandBarCustomUI.insertAdjacentHTML( "beforeEnd", '<moi:Spacer/> ...


Comment out line #3 for the icon value by putting a // in front of it, and then add a new line for an image file like this:

code:
var title = "Obj Library";
var menu = "moi://appdata/customui/ObjLibrary.menu.htm";
//var icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGX ...
var icon = "icons/YourIconFile.png";
moi.ui.commandBar.CommandBarCustomUI.insertAdjacentHTML( "beforeEnd", '<moi:Spacer/> ...


That should then make it load a file named YourIconFile.png from the ui\icons folder.

The above description is for MoI v4. For MoI v3 you would edit the file "70 ObjLibrary.htm" located in your install directory under ui\customui and change it from this:

code:
<moi:CommandMenuButton menu="customui/mods/ObjLibrary.menu.htm" icon="data:image/png; ...........">Obj Library</moi:CommandMenuButton>


to this:
code:
<moi:CommandMenuButton menu="customui/mods/ObjLibrary.menu.htm" icon="icons/YourIconFile.png">Obj Library</moi:CommandMenuButton>


- Michael