61
Technical forum / Re:creating an interface
« on: February 04, 2004, 12:41:50 PM »Quote
i.e. now your buttons contains omething like:
IMAGE_HOVER = "interface\menu\look.png"
add a line:
IMAGE = "interface\menu\look.png"
This way the buttons will be displayed in the preview. Then set the correct position, then delete the IMAGE = ... lines.
Great! Thank you, it worked fine. Now, still I have the problem of the interface not showing. Here goes the code of the interface
menu.script
#include "scripts\base.inc"
global MenuObject;
////////////////////////////////////////////////////////////////////////////////
on "Take"
{
self.Close();
if(MenuObject!=null)
{
if(MenuObject.CanHandleEvent("Take")) MenuObject.ApplyEvent("Take");
else actor.Talk("Non lo posso prendere.");
}
MenuObject = null;
}
////////////////////////////////////////////////////////////////////////////////
on "LookAt"
{
self.Close();
if(MenuObject!=null)
{
if(MenuObject.CanHandleEvent("LookAt")) MenuObject.ApplyEvent("LookAt");
else actor.Talk("Carino.");
}
MenuObject = null;
}
////////////////////////////////////////////////////////////////////////////////
on "Talk"
{
self.Close();
if(MenuObject!=null)
{
if(MenuObject.CanHandleEvent("Talk")) MenuObject.ApplyEvent("Talk");
else actor.Talk("Non posso parlargli.");
}
MenuObject = null;
}
///////////////////////////////////////////////////////////////////////////////
on "Browse"
{
self.Close();
if(MenuObject!=null)
{
if(MenuObject.CanHandleEvent("Browse")) MenuObject.ApplyEvent("Browse");
else actor.Talk("Non credo che trover