/// Use a generator function to seamlessly create and initialize a new /// instance of this Button Layer. public static InventoryButtonLayer New() { var newThis = new InventoryButtonLayer(0.45f, 1.0f, 0.5f); newThis.Initialize(); return(newThis); }
private void InitButtons() { KEP = new KeyEventProvider(); ButtonStore = new Dictionary <string, ICoreButton>(); ButtonUpdates = new Stack <string>(); ButtonTooltips = new Stack <string>(); // TODO: does doing this here also make the mp-server freak out (since it'll be loading textures)? if (ModOptions["InvButtons"]) { InventoryButtons = InventoryButtonLayer.New(); } // if (ModOptions["TextReplacers"]) ReplacerButtons = ChestButtonReplacerLayer.New(ModOptions["UseReplacers"]); // else if (ModOptions["IconReplacers"]) // Initialize the action ModifyInterfaceLayerList will use IHInterface.Initialize(); }