Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void drawChatArea() {
- int yOffset = frameMode == ScreenMode.FIXED ? 0 : frameHeight - 165;
- if (frameMode == ScreenMode.FIXED) {
- aRSImageProducer_1166.initDrawingArea();
- }
- Texture.anIntArray1472 = anIntArray1180;
- if (chatStateCheck()) {
- extendChatArea = 0;
- showChatComponents = true;
- cacheSprite[20].drawSprite(0, yOffset);
- }
- if (showChatComponents) {
- if (changeChatArea && !chatStateCheck()) {
- cacheSprite[28].drawARGBSprite(256, yOffset - extendChatArea - 3, 112);
- Canvas.method339(7 + yOffset - extendChatArea, 0x575757, 506, 7);
- Canvas.drawAlphaGradient(7, 7 + yOffset - extendChatArea, 506, 135 + extendChatArea, 0, 0xFFFFFF, 20);
- } else {
- cacheSprite[20].drawSprite(0, yOffset);
- }
- }
- if (!showChatComponents || changeChatArea) {
- Canvas.drawAlphaPixels(7, frameHeight - 23, 506, 24, 0, 100);
- }
- drawChannelButtons();
- TextDrawingArea textDrawingArea = regularText;
- if (messagePromptRaised) {
- extendChatArea = 0;
- newBoldFont.drawCenteredString(aString1121, 259, 60 + yOffset, 0, -1);
- newBoldFont.drawCenteredString(promptInput + "*", 259, 80 + yOffset, 128, -1);
- } else if (inputDialogState == 1) {
- extendChatArea = 0;
- newBoldFont.drawCenteredString("Enter amount:", 259, yOffset + 60, 0, -1);
- newBoldFont.drawCenteredString(amountOrNameInput + "*", 259, 80 + yOffset, 128, -1);
- } else if (inputDialogState == 2) {
- extendChatArea = 0;
- newBoldFont.drawCenteredString("Enter Name:", 259, 60 + yOffset, 0, -1);
- newBoldFont.drawCenteredString(amountOrNameInput + "*", 259, 80 + yOffset, 128, -1);
- } else if (aString844 != null) {
- extendChatArea = 0;
- newBoldFont.drawCenteredString(aString844, 259, 60 + yOffset, 0, -1);
- newBoldFont.drawCenteredString("Click to continue", 259, 80 + yOffset, 128, -1);
- } else if (backDialogID != -1) {
- extendChatArea = 0;
- drawInterface(0, 20, RSInterface.interfaceCache[backDialogID], 20 + yOffset);
- } else if (dialogID != -1) {
- extendChatArea = 0;
- drawInterface(0, 20, RSInterface.interfaceCache[dialogID], 20 + yOffset);
- } else if (showChatComponents) {
- int j77 = -3;
- int j = 0;
- int shadow = changeChatArea ? 0 : -1;
- Canvas.setDrawingArea(122 + yOffset, 8, 497, 7 + yOffset - extendChatArea);
- for (int k = 0; k < 500; k++) {
- if (chatMessages[k] != null) {
- int chatType = chatTypes[k];
- int yPos = (70 - j77 * 14) + anInt1089 + 5;
- String s1 = chatNames[k];
- byte byte0 = 0;
- if (s1 != null && s1.startsWith("@cr1@")) {
- s1 = s1.substring(5);
- byte0 = 1;
- } else if (s1 != null && s1.startsWith("@cr2@")) {
- s1 = s1.substring(5);
- byte0 = 2;
- } else if (s1 != null && s1.startsWith("@cr3@")) {
- s1 = s1.substring(5);
- byte0 = 3;
- }
- if (chatType == 0) {
- if (chatTypeView == 5 || chatTypeView == 0) {
- newRegularFont.drawBasicString(chatMessages[k], 11, yPos + yOffset, changeChatArea ? 0xFFFFFF : 0, shadow);
- j++;
- j77++;
- }
- }
- if ((chatType == 1 || chatType == 2) && (chatType == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 1 || chatTypeView == 0) {
- int xPos = 11;
- if (byte0 == 1) {
- modIcons[0].drawSprite(xPos + 1, yPos - 12 + yOffset);
- xPos += 14;
- } else if (byte0 == 2) {
- modIcons[1].drawSprite(xPos + 1, yPos - 12 + yOffset);
- xPos += 14;
- } else if (byte0 == 3) {
- modIcons[2].drawSprite(xPos + 1, yPos - 12 + yOffset);
- xPos += 14;
- }
- newRegularFont.drawBasicString(s1 + ":", xPos, yPos + yOffset, changeChatArea ? 0xFFFFFF : 0, shadow);
- xPos += textDrawingArea.getTextWidth(s1) + 8;
- newRegularFont.drawBasicString(chatMessages[k], xPos, yPos + yOffset, changeChatArea ? 0x7FA9FF : 255, shadow);
- j++;
- j77++;
- }
- }
- if ((chatType == 3 || chatType == 7) && (splitPrivateChat == 0 || chatTypeView == 2) && (chatType == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 2 || chatTypeView == 0) {
- int k1 = 11;
- newRegularFont.drawBasicString("From", k1, yPos + yOffset, changeChatArea ? 0 : 0xFFFFFF, shadow);
- k1 += textDrawingArea.getTextWidth("From ");
- if (byte0 == 1) {
- modIcons[0].drawSprite(k1, yPos - 12 + yOffset);
- k1 += 12;
- } else if (byte0 == 2) {
- modIcons[1].drawSprite(k1, yPos - 12 + yOffset);
- k1 += 12;
- } else if (byte0 == 3) {
- modIcons[2].drawSprite(k1, yPos - 12 + yOffset);
- k1 += 12;
- }
- newRegularFont.drawBasicString(s1 + ":", k1, yPos + yOffset, changeChatArea ? 0xFFFFFF : 0, shadow);
- k1 += textDrawingArea.getTextWidth(s1) + 8;
- newRegularFont.drawBasicString(chatMessages[k], k1, yPos + yOffset, 0x800080, shadow);
- j++;
- j77++;
- }
- }
- if (chatType == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 3 || chatTypeView == 0) {
- newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 11, yPos + yOffset, 0x800080, shadow);
- j++;
- j77++;
- }
- }
- if (chatType == 5 && splitPrivateChat == 0 && privateChatMode < 2) {
- if (chatTypeView == 2 || chatTypeView == 0) {
- newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 11, yPos + yOffset, 0x800080, shadow);
- j++;
- j77++;
- }
- }
- if (chatType == 6 && (splitPrivateChat == 0 || chatTypeView == 2) && privateChatMode < 2) {
- if (chatTypeView == 2 || chatTypeView == 0) {
- newRegularFont.drawBasicString("To " + s1 + ":", 11, yPos + yOffset, changeChatArea ? 0xFFFFFF : 0, shadow);
- newRegularFont.drawBasicString(chatMessages[k], 15 + textDrawingArea.getTextWidth("To :" + s1), yPos + yOffset, 0x800080, shadow);
- j++;
- j77++;
- }
- }
- if (chatType == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 3 || chatTypeView == 0) {
- newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 11, yPos + yOffset, 0x7e3200, shadow);
- j++;
- j77++;
- }
- if (chatType == 11 && (clanChatMode == 0)) {
- if (chatTypeView == 11) {
- newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 11, yPos + yOffset, 0x7e3200, shadow);
- j++;
- j77++;
- }
- if (chatType == 12) {
- newRegularFont.drawBasicString(chatMessages[k] + "", 11, yPos + yOffset, 0x7e3200, shadow);
- j++;
- }
- }
- }
- if (chatType == 16) {
- int j2 = 40;
- int clanNameWidth = textDrawingArea.getTextWidth(clanname);
- if (chatTypeView == 11 || chatTypeView == 0) {
- switch (chatRights[k]) {
- case 1:
- j2 += clanNameWidth;
- modIcons[0].drawSprite(j2 - 18, yPos - 12 + yOffset);
- j2 += 14;
- break;
- case 2:
- j2 += clanNameWidth;
- modIcons[1].drawSprite(j2 - 18, yPos - 12 + yOffset);
- j2 += 14;
- break;
- case 3:
- j2 += clanNameWidth;
- modIcons[1].drawSprite(j2 - 18, yPos - 12 + yOffset);
- j2 += 14;
- break;
- default:
- j2 += clanNameWidth;
- break;
- }
- newRegularFont.drawBasicString("[", 8, yPos + yOffset, changeChatArea? 0xFFFFFF : 0, shadow);
- newRegularFont.drawBasicString(clanname, 14, yPos + yOffset, changeChatArea ? 0x7FA9FF : 255, shadow);
- newRegularFont.drawBasicString("]", clanNameWidth + 14, yPos + yOffset, changeChatArea? 0xFFFFFF : 0, shadow);
- newRegularFont.drawBasicString(chatNames[k] + ":", j2 - 17, yPos + yOffset, changeChatArea? 0xFFFFFF : 0, shadow);
- j2 += textDrawingArea.getTextWidth(chatNames[k]) + 7;
- newRegularFont.drawBasicString(chatMessages[k], j2 - 16, yPos + yOffset, 0x800080, shadow);
- j++;
- j77++;
- }
- }
- }
- }
- Canvas.defaultDrawingAreaSize();
- anInt1211 = j * 14 + 7 + 5;
- if (anInt1211 < 111) {
- anInt1211 = 111;
- }
- drawScrollbar(114 + extendChatArea, anInt1211 - anInt1089 - 113, 7 + yOffset - extendChatArea, 496, anInt1211 + extendChatArea, changeChatArea);
- String s;
- if (myPlayer != null && myPlayer.name != null) {
- s = myPlayer.name;
- } else {
- s = TextClass.fixName(myUsername);
- }
- Canvas.setDrawingArea(140 + yOffset, 8, 509, 120 + yOffset);
- int xOffset = 0;
- if (myPrivilege > 0) {
- modIcons[myPrivilege - 1].drawSprite(10, 122 + yOffset);
- xOffset += 14;
- }
- newRegularFont.drawBasicString(s + ":", xOffset + 11, 133 + yOffset, changeChatArea ? 0xFFFFFF : 0, shadow);
- newRegularFont.drawBasicString(inputString + "*", xOffset + 12 + textDrawingArea.getTextWidth(s + ": "), 133 + yOffset, changeChatArea ? 0x7FA9FF : 255, shadow);
- Canvas.method339(121 + yOffset, changeChatArea ? 0x575757 : 0x807660, 506, 7);
- Canvas.defaultDrawingAreaSize();
- }
- if (menuOpen) {
- drawMenu(0, frameMode == ScreenMode.FIXED ? 338 : 0);
- }
- if (frameMode == ScreenMode.FIXED) {
- aRSImageProducer_1166.drawGraphics(338, super.graphics, 0);
- }
- aRSImageProducer_1165.initDrawingArea();
- Texture.anIntArray1472 = anIntArray1182;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement