Hammerhand

Member
The shard I play on uses the old A_Li_N storage boxes system & they work fine. I just added the new SA fish to the FoodStorageBox & ran into a bit of an issue. The amount is showing up on top of the names of some of them (the names are rather long for some). I cant figure out how to move the amount to the right far enough for it to show at least double digits without being on the name. ScreenHunter_147 Oct. 28 20.52.jpg
Help would be appreciated. Gump inclosed (of course). And the only way to remove the Steak part of the name would be to change the fish script, which means removing the CliLocs & renaming things. I'd rather NOT do that.
 

Attachments

  • BaseResourceStorageBoxGump.cs
    4.3 KB · Views: 1
It isnt limited to 2 digits. I was just saying at least 2 digits because these fish are the Rare & Legendary used in making the special fish pies. So 100's of them would be very hard to accomplish, except over time. They can hold up to 100k per item. Probably going to need to increase the size of the gump in the very least.
 
I've increased the width of the gump, so it can accommodate the spacing between the resource name & amount. I'm just not seeing how to shift the amount numbers to the right to get them past the name. If there is even a way to do that. The <16 in the 3rd line is how many resource can be displayed per page. The issue is happening on several of the storage boxes & I'd like to correct it.
Code:
        private void AddButtonsAndLabels()
        {
            for( int i = m_Offset; i < m_StorageBox.ResourceTypes.Length && i < 16 + m_Offset; i++ )
            {
                Type type = m_StorageBox.ResourceTypes[i];

                if( !m_StorageBox.Resources.ContainsKey( type ) )
                    continue;

                if( (i - m_Offset) <= 7 )
                {
                    AddLabel( 110, 75+((i-m_Offset)*25), 1153, type.Name );
                    AddLabel( 225, 75+((i-m_Offset)*25), 1152, ((int)m_StorageBox.Resources[type]).ToString() );
                    AddButton( 75, 75+((i-m_Offset)*25), 4029, 4030, i+100, GumpButtonType.Reply, 0 );
                }
                else
                {
                    AddLabel( 310, 75+((i-8-m_Offset)*25), 1152, type.Name );
                    AddLabel( 425, 75+((i-8-m_Offset)*25), 1152, ((int)m_StorageBox.Resources[type]).ToString() );
                    AddButton( 275, 75+((i-8-m_Offset)*25), 4029, 4030, i+100, GumpButtonType.Reply, 0 );
                }
            }
        }
 
Well for example
Code:
AddLabel(225, 75+((i-m_Offset)*25), 1152, ((int)m_StorageBox.Resources[type]).ToString());
That should be the number, now change the 225 to something bigger and it should move to the right.
 
Of course its the ONE number I didnt mess with. lolScreenHunter_148 Oct. 30 13.13.jpg.Had to bounce it up to 255 & 455 to add a bit of space just in case, but worked great! Thankyou Pyro! :D
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back