This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
bool chosen;
while (chosen==false) {
if (IsKeyPressed(eKeyDownArrow)) [[[scroll menu down]]]
if (IsKeyPressed(eKeyUpArrow)) [[[scroll menu down]]]
if (IsKeyPressed(eKeyReturn) || Mouse.IsButtonDown(eMouseLeft)) chosen = true;
Wait(1);
}
function ProcessMenuClick(int x, int y, int action) {
InventoryItem *currentINV = InventoryItem.GetAtScreenXY(x, y);
actionvalue = GetActions(x, y, action);
if (GetLocationType(x, y)!=eLocationNothing) {
SetActions(x, y, action, actionvalue+1);
ActionClicked = action;
if (action < 98) Room.ProcessClick(x, y, eModeInteract);
else if (action==100) Room.ProcessClick(x, y, eModeInteract);
else Room.ProcessClick(x, y, eModeUseinv);
}
else if (currentINV != null) {
if (action==1) {
verbmenu.Visible = false;
player.ActiveInventory = currentINV;
player.ActiveInventory.CursorGraphic = player.ActiveInventory.GetProperty("cursor");
int invitemcheck = Inventory.TopItem;
int invitemsinrow = Inventory.ItemCount;
while (invitemcheck < (Inventory.TopItem + invitemsinrow)) {
if (Inventory.ItemAtIndex[invitemcheck]!=null) {
if (Inventory.ItemAtIndex[invitemcheck].ID == player.ActiveInventory.ID) {
MouseSetPos(HUD.X+(Inventory.X + (invitemcheck - Inventory.TopItem)*Inventory.ItemWidth) + (Inventory.ItemWidth/2) , HUD.Y + Inventory.Y + (Inventory.ItemHeight/2) );
invitemcheck = invitemsinrow+99;
}
}
invitemcheck++;
}
}
else {
SetActions(x, y, action, actionvalue+1);
ActionClicked = action;
if (action < 98) currentINV.RunInteraction(eModeInteract);
else currentINV.RunInteraction(eModeUseinv);
}
}
}
InventoryItem *currentINV = InventoryItem.GetAtScreenXY(x, y);
Hotspot *currentHS = Hotspot.GetAtScreenXY(x, y);
GUI *currentGUI = GUI.GetAtScreenXY(x, y);
Object *currentOBJ = Object.GetAtScreenXY(x, y);
Character *currentCHR = Character.GetAtScreenXY(x, y);
if (currentGUI!=null) Display("GUI %d",currentGUI.ID);
if (currentINV!=null) Display("INV %d",currentINV.ID);
if (currentOBJ!=null) Display("OBJ %d",currentOBJ.ID);
if (currentCHR!=null) Display("CHR %d",currentCHR.ID);
if (currentHS!=null) Display("HS %d",currentHS.ID);
function GetTextWidthX(String message, FontType whatfont, int wrapwidth) {
String line = "";
String remaining = message;
int maxwidth = 0;
int ind = remaining.IndexOf(" ");
if (GetTextWidth(message, whatfont) <= wrapwidth) return GetTextWidth(message, whatfont);
if (ind==-1) return GetTextWidth(message, whatfont);
while (ind!=-1) {
String newremaining = remaining.Truncate(ind+1);
line = line.Append(newremaining);
remaining = remaining.Substring(ind+1, remaining.Length);
int linewidth = GetTextWidth(line, whatfont);
if (linewidth >= wrapwidth) line = "";
else if (linewidth > maxwidth) maxwidth = linewidth;
ind = remaining.IndexOf(" ");
}
return maxwidth;
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.085 seconds with 20 queries.