I figured the inventory screen would be editable by simply editing the inventory gui. To my suprise this gui which is provided under the gui tab isn't used at all. It doesn't matter what I do to this gui the in game inventory gui doesn't change.
All I need to do is add a button to the inventory gui. I have added it successfully to the inventory gui under the gui's option in the editor but I can't actually figure out how to make the game use that inventory gui. Nor can I find the inventory gui it appears to be using.
Editing the INVENTORY GUI is right, you just need to edit the script to make it use that GUI. (By default AGS uses an in-built Inventory screen you can't edit.)
Open the global script, and find this bit:
function show_inventory_window () {
// This demonstrates both types of inventory window - the first part is how to
// show the built-in inventory window, the second part uses the custom one.
// Un-comment one section or the other below.
// ** DEFAULT INVENTORY WINDOW
InventoryScreen();
/*
// ** CUSTOM INVENTORY WINDOW
GUIOn (INVENTORY);
// switch to the Use cursor (to select items with)
SetCursorMode (MODE_USE);
// But, override the appearance to look like the arrow
SetMouseCursor (6);
*/
}
Delete or comment out InventoryScreen();, and uncomment the 'Custom Inventory Window' bit:
function show_inventory_window () {
// This demonstrates both types of inventory window - the first part is how to
// show the built-in inventory window, the second part uses the custom one.
// Un-comment one section or the other below.
// ** CUSTOM INVENTORY WINDOW
GUIOn (INVENTORY);
// switch to the Use cursor (to select items with)
SetCursorMode (MODE_USE);
// But, override the appearance to look like the arrow
SetMouseCursor (6);
}
Ah, thank you.
I'd seen that earlier too and it tottally slipped my mind.