dang, thought I might be onto something but the word "is" should score a point.
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
function RemoveItemByName ( GUIControl* listbox, String name )
{
int i = 0;
while ( i < listbox.AsListBox.ItemCount )
{
if ( listbox.AsListBox.Items[i] == name )
listbox.AsListBox.RemoveItem ( i );
i++;
}
}
function AddListboxItemByName(GUIControl* listbox, String desc)
{
int i = 0;
String buffer = "";
while (i < desc.Length) {
if (GetTextWidth(buffer.AppendChar(desc.Chars[i]), listbox.Font) <= listbox.Width) buffer = buffer.AppendChar(desc.Chars[i]);
else {
while ((buffer.Contains(" ") != -1) && (buffer.Chars[buffer.Length - 1] != ' ')) {
buffer = buffer.Truncate(buffer.Length - 1); // since there's no reverse-contains, take off one character at a time
i--;
}
listbox.AddItem(buffer);
i--;
buffer = "";
if (listbox.Items[listbox.ItemCount - 1].Contains("[") != -1) {
int temp = listbox.Items[listbox.ItemCount - 1].Contains("[");
buffer = listbox.Items[listbox.ItemCount - 1].Substring(temp + 1, listbox.Items[listbox.ItemCount - 1].Length);
listbox.Items[listbox.ItemCount - 1] = listbox.Items[listbox.ItemCount - 1].Substring(0, temp);
}
}
i++;
}
listbox.AddItem(buffer);
if (buffer.Contains("[") != -1) {
int temp = buffer.Contains("[");
listbox.Items[listbox.ItemCount - 1] = buffer.Truncate(temp);
listbox.AddItem(buffer.Substring(temp + 1, buffer.Length));
}
}
function RemoveListboxItemByName(GUIControl* listbox, String desc)
{
int i = 0;
String buffer = "";
while (i < desc.Length) {
if (GetTextWidth(buffer.AppendChar(desc.Chars[i]), listbox.Font) <= listbox.Width) buffer = buffer.AppendChar(desc.Chars[i]);
else {
while ((buffer.Contains(" ") != -1) && (buffer.Chars[buffer.Length - 1] != ' ')) {
buffer = buffer.Truncate(buffer.Length - 1); // since there's no reverse-contains, take off one character at a time
i--;
}
RemoveItemByName(listbox, buffer);
i--;
buffer = "";
if (listbox.Items[listbox.ItemCount - 1].Contains("[") != -1) {
int temp = listbox.Items[listbox.ItemCount - 1].Contains("[");
buffer = listbox.Items[listbox.ItemCount - 1].Substring(temp + 1, listbox.Items[listbox.ItemCount - 1].Length);
listbox.Items[listbox.ItemCount - 1] = listbox.Items[listbox.ItemCount - 1].Substring(0, temp);
}
}
i++;
}
RemoveItemByName(listbox, buffer);
if (buffer.Contains("[") != -1) {
int temp = buffer.Contains("[");
listbox.Items[listbox.ItemCount - 1] = buffer.Truncate(temp);
RemoveItemByName(listbox, buffer.Substring(temp + 1, buffer.Length));
}
}
InventoryItem *item = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
player.SayAt(26, 0, 270,String.Format("To my knowledge %s and %s do not mix.",player.ActiveInventory.Name, item.Name));
Quote from: Amayirot Akago on Tue 08/08/2017 17:57:57Correct Amayirot
Sol 0: Mars Colonization.
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.227 seconds with 15 queries.