private void DrawButtons(SpriteBatch sb)
{
Vector2 vector2 = new Vector2((float)Main.mouseX, (float)Main.mouseY);
int num = 9;
for (int index = 0; index < num; ++index)
{
Texture2D texture2D = Main.inventoryBackTexture;
float scale = 0.8f;
Vector2 position = new Vector2((float)(24 + 46 * index), 24f);
Color color = Main.inventoryBack * 0.8f;
if (SelectedMode == 0 && index == 2)
texture2D = Main.inventoryBack14Texture;
else if (SelectedMode == 1 && index == 3)
texture2D = Main.inventoryBack14Texture;
else if (SelectedMode == 2 && index == 6)
texture2D = Main.inventoryBack14Texture;
else if (index >= 2 && index <= 3)
texture2D = Main.inventoryBack2Texture;
sb.Draw(texture2D, position, new Rectangle?(), color, 0.0f, new Vector2(), scale, SpriteEffects.None, 0.0f);
switch (index)
{
case 0:
texture2D = Main.cameraTexture[7];
break;
case 1:
texture2D = Main.cameraTexture[0];
break;
case 2:
case 3:
case 4:
texture2D = Main.cameraTexture[index];
break;
case 5:
texture2D = Main.mapFullscreen ? Main.mapIconTexture[0] : Main.mapIconTexture[4];
break;
case 6:
texture2D = Main.cameraTexture[1];
break;
case 7:
texture2D = Main.cameraTexture[6];
break;
case 8:
texture2D = Main.cameraTexture[5];
break;
}
sb.Draw(texture2D, position + new Vector2(26f) * scale, new Rectangle?(), Color.White, 0.0f, Utils.Size(texture2D) / 2f, 1f, SpriteEffects.None, 0.0f);
bool flag = false;
switch (index)
{
case 1:
if (!EdgeAPinned || !EdgeBPinned)
{
flag = true;
break;
}
break;
case 5:
if (!Main.mapEnabled)
{
flag = true;
break;
}
break;
case 7:
if (Main.graphics.IsFullScreen)
{
flag = true;
break;
}
break;
}
if (flag)
sb.Draw(Main.cdTexture, position + new Vector2(26f) * scale, new Rectangle?(), Color.White * 0.65f, 0.0f, Utils.Size(Main.cdTexture) / 2f, 1f, SpriteEffects.None, 0.0f);
}
string cursorText = "";
switch (HoveredMode)
{
case -1:
switch (HoveredMode)
{
case 1:
if (!EdgeAPinned || !EdgeBPinned)
{
cursorText = cursorText + "\n" + Lang.inter[112];
break;
}
break;
case 5:
if (!Main.mapEnabled)
{
cursorText = cursorText + "\n" + Lang.inter[114];
break;
}
break;
case 7:
if (Main.graphics.IsFullScreen)
{
cursorText = cursorText + "\n" + Lang.inter[113];
break;
}
break;
}
if (!(cursorText != ""))
break;
Main.instance.MouseText(cursorText, 0, 0);
break;
case 0:
cursorText = Lang.inter[111];
goto case -1;
case 1:
cursorText = Lang.inter[67];
goto case -1;
case 2:
cursorText = Lang.inter[69];
goto case -1;
case 3:
cursorText = Lang.inter[70];
goto case -1;
case 4:
cursorText = Lang.inter[78];
goto case -1;
case 5:
cursorText = Main.mapFullscreen ? Lang.inter[109] : Lang.inter[108];
goto case -1;
case 6:
cursorText = Lang.inter[68];
goto case -1;
case 7:
cursorText = Lang.inter[110];
goto case -1;
case 8:
cursorText = Lang.inter[71];
goto case -1;
default:
cursorText = "???";
goto case -1;
}
}