Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DrawButtons()

void Terraria.Graphics.Capture.CaptureInterface.DrawButtons ( SpriteBatch sb)
inlineprivate

Definition at line 1117 of file CaptureInterface.cs.

1118 {
1119 new Vector2(Main.mouseX, Main.mouseY);
1120 int num = 9;
1121 for (int i = 0; i < num; i++)
1122 {
1124 float num2 = 0.8f;
1125 Vector2 vector = new Vector2(24 + 46 * i, 24f);
1126 Color color = Main.inventoryBack * 0.8f;
1127 if (SelectedMode == 0 && i == 2)
1128 {
1130 }
1131 else if (SelectedMode == 1 && i == 3)
1132 {
1134 }
1135 else if (SelectedMode == 2 && i == 6)
1136 {
1138 }
1139 else if (i >= 2 && i <= 3)
1140 {
1142 }
1143 sb.Draw(texture2D, vector, null, color, 0f, default(Vector2), num2, SpriteEffects.None, 0f);
1144 switch (i)
1145 {
1146 case 0:
1147 texture2D = TextureAssets.Camera[7].Value;
1148 break;
1149 case 1:
1150 texture2D = TextureAssets.Camera[0].Value;
1151 break;
1152 case 2:
1153 case 3:
1154 case 4:
1156 break;
1157 case 5:
1158 texture2D = (Main.mapFullscreen ? TextureAssets.MapIcon[0].Value : TextureAssets.MapIcon[4].Value);
1159 break;
1160 case 6:
1161 texture2D = TextureAssets.Camera[1].Value;
1162 break;
1163 case 7:
1164 texture2D = TextureAssets.Camera[6].Value;
1165 break;
1166 case 8:
1167 texture2D = TextureAssets.Camera[5].Value;
1168 break;
1169 }
1170 sb.Draw(texture2D, vector + new Vector2(26f) * num2, null, Color.White, 0f, texture2D.Size() / 2f, 1f, SpriteEffects.None, 0f);
1171 bool flag = false;
1172 switch (i)
1173 {
1174 case 1:
1175 if (!EdgeAPinned || !EdgeBPinned)
1176 {
1177 flag = true;
1178 }
1179 break;
1180 case 7:
1181 if (Main.graphics.IsFullScreen)
1182 {
1183 flag = true;
1184 }
1185 break;
1186 case 5:
1187 if (!Main.mapEnabled)
1188 {
1189 flag = true;
1190 }
1191 break;
1192 }
1193 if (flag)
1194 {
1195 sb.Draw(TextureAssets.Cd.Value, vector + new Vector2(26f) * num2, null, Color.White * 0.65f, 0f, TextureAssets.Cd.Value.Size() / 2f, 1f, SpriteEffects.None, 0f);
1196 }
1197 }
1198 string text = "";
1199 switch (HoveredMode)
1200 {
1201 case 0:
1202 text = Lang.inter[111].Value;
1203 break;
1204 case 1:
1205 text = Lang.inter[67].Value;
1206 break;
1207 case 2:
1208 text = Lang.inter[69].Value;
1209 break;
1210 case 3:
1211 text = Lang.inter[70].Value;
1212 break;
1213 case 4:
1214 text = Lang.inter[78].Value;
1215 break;
1216 case 5:
1217 text = (Main.mapFullscreen ? Lang.inter[109].Value : Lang.inter[108].Value);
1218 break;
1219 case 6:
1220 text = Lang.inter[68].Value;
1221 break;
1222 case 7:
1223 text = Lang.inter[110].Value;
1224 break;
1225 case 8:
1226 text = Lang.inter[71].Value;
1227 break;
1228 default:
1229 text = "???";
1230 break;
1231 case -1:
1232 break;
1233 }
1234 switch (HoveredMode)
1235 {
1236 case 1:
1237 if (!EdgeAPinned || !EdgeBPinned)
1238 {
1239 text = text + "\n" + Lang.inter[112].Value;
1240 }
1241 break;
1242 case 7:
1243 if (Main.graphics.IsFullScreen)
1244 {
1245 text = text + "\n" + Lang.inter[113].Value;
1246 }
1247 break;
1248 case 5:
1249 if (!Main.mapEnabled)
1250 {
1251 text = text + "\n" + Lang.inter[114].Value;
1252 }
1253 break;
1254 }
1255 if (text != "")
1256 {
1257 Main.instance.MouseText(text, 0, 0);
1258 }
1259 }
void Draw(Texture2D texture, Vector2 position, Color color)
static Asset< Texture2D > InventoryBack
static Asset< Texture2D > Cd
static Asset< Texture2D > InventoryBack14
static Asset< Texture2D >[] MapIcon
static Asset< Texture2D >[] Camera
static Asset< Texture2D > InventoryBack2

References Terraria.GameContent.TextureAssets.Camera, Terraria.GameContent.TextureAssets.Cd, Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), Terraria.Graphics.Capture.CaptureInterface.EdgeAPinned, Terraria.Graphics.Capture.CaptureInterface.EdgeBPinned, Terraria.Main.graphics, Terraria.Graphics.Capture.CaptureInterface.HoveredMode, Terraria.Main.instance, Terraria.Lang.inter, Terraria.GameContent.TextureAssets.InventoryBack, Terraria.GameContent.TextureAssets.InventoryBack14, Terraria.GameContent.TextureAssets.InventoryBack2, Terraria.Main.mapEnabled, Terraria.GameContent.TextureAssets.MapIcon, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Graphics.Capture.CaptureInterface.SelectedMode, System.text, Microsoft.Xna.Framework.Graphics.Vector2, and Microsoft.Xna.Framework.Color.White.

Referenced by Terraria.Graphics.Capture.CaptureInterface.Draw().