Thread: Text problem

Results 1 to 6 of 6
  1. #1 Text problem 
    Donator


    Join Date
    May 2008
    Posts
    1,234
    Thanks given
    31
    Thanks received
    25
    Rep Power
    279
    Not 100% if its server or client. tried having a look around at what it could be but no luck >.>


    Reply With Quote  
     

  2. #2  
    PHP DEVELOPER

    Join Date
    Mar 2009
    Posts
    357
    Thanks given
    50
    Thanks received
    41
    Rep Power
    16
    Seems like a client issue to me.
    Reply With Quote  
     

  3. #3  
    Donator


    Join Date
    Mar 2011
    Posts
    2,350
    Thanks given
    1,193
    Thanks received
    824
    Rep Power
    856
    drawChatArea method
    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    May 2008
    Posts
    1,234
    Thanks given
    31
    Thanks received
    25
    Rep Power
    279
    Quote Originally Posted by Jerba View Post
    drawChatArea method
    this is the drawChatArea
    private void drawChatArea() {
    aRSImageProducer_1166.initDrawingArea();
    Texture.anIntArray1472 = anIntArray1180;
    chatArea.drawSprite(0, 0);
    backBase1.method361(0, 116);
    drawChannelButtons();
    if(messagePromptRaised) {
    chatTextDrawingArea.drawText(0, aString1121, 60, 259);
    chatTextDrawingArea.drawText(128, promptInput + "*", 80, 259);
    } else if(inputDialogState == 1) {
    chatTextDrawingArea.drawText(0, "Enter amount:", 60, 259);
    chatTextDrawingArea.drawText(128, amountOrNameInput + "*", 80, 259);
    } else if(inputDialogState == 2) {
    chatTextDrawingArea.drawText(0, "Enter name:", 60, 259);
    chatTextDrawingArea.drawText(128, amountOrNameInput + "*", 80, 259);
    } else if(aString844 != null) {
    chatTextDrawingArea.drawText(0, aString844, 60, 259);
    chatTextDrawingArea.drawText(128, "Click to continue", 80, 259);
    } else if(backDialogID != -1) {
    drawInterface(0, 20, RSInterface.interfaceCache[backDialogID], 20);
    } else if(dialogID != -1) {
    drawInterface(0, 20, RSInterface.interfaceCache[dialogID], 20);
    } else {
    int j77 = -3;
    TextDrawingArea textDrawingArea = aTextDrawingArea_1271;
    int j = 0;
    DrawingArea.setDrawingArea(96, 0, 463, 20);
    for(int k = 0; k < 100; k++)
    if(chatMessages[k] != null)
    {
    int l = chatTypes[k];
    int i1 = (90 - j * 15) + anInt1089;
    String s1 = chatNames[k];
    byte byte0 = 0;
    if(s1 != null && s1.startsWith("@cr1@"))
    {
    s1 = s1.substring(5);
    byte0 = 1;
    }
    if(s1 != null && s1.startsWith("@cr2@"))
    {
    s1 = s1.substring(5);
    byte0 = 2;
    }
    if(l == 0)
    {
    if(i1 > 0 && i1 < 110)
    textDrawingArea.method385(0, chatMessages[k], i1, 19);
    j++;
    }
    if((l == 1 || l == 2) && (l == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s1)))
    {
    if(i1 > 0 && i1 < 110)
    {
    int j1 = 19;
    if(byte0 == 1)
    {
    modIcons[0].method361(j1, i1 - 12);
    j1 += 14;
    }
    if(byte0 == 2)
    {
    modIcons[1].method361(j1, i1 - 12);
    j1 += 14;
    }
    textDrawingArea.method385(2, s1 + ":", i1, j1);
    j1 += textDrawingArea.getTextWidth(s1) + 8;
    textDrawingArea.method385(255, chatMessages[k], i1, j1);
    }
    j++;
    }
    if((l == 3 || l == 7) && splitPrivateChat == 0 && (l == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s1)))
    {
    if(i1 > 0 && i1 < 110)
    {
    int k1 = 4;
    textDrawingArea.method385(0, "From", i1, k1);
    k1 += textDrawingArea.getTextWidth("From ");
    if(byte0 == 1)
    {
    modIcons[0].method361(k1, i1 - 12);
    k1 += 14;
    }
    if(byte0 == 2)
    {
    modIcons[1].method361(k1, i1 - 12);
    k1 += 14;
    }
    textDrawingArea.method385(0, s1 + ":", i1, k1);
    k1 += textDrawingArea.getTextWidth(s1) + 8;
    textDrawingArea.method385(0x800000, chatMessages[k], i1, k1);
    }
    j++;
    }
    if(l == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1)))
    {
    if(i1 > 0 && i1 < 110)
    textDrawingArea.method385(0x800080, s1 + " " + chatMessages[k], i1, 18);
    j++;
    }
    if(l == 5 && splitPrivateChat == 0 && privateChatMode < 2)
    {
    if(i1 > 0 && i1 < 110)
    textDrawingArea.method385(0x800000, chatMessages[k], i1, 4);
    j++;
    }
    if(l == 6 && splitPrivateChat == 0 && privateChatMode < 2)
    {
    if(i1 > 0 && i1 < 110)
    {
    textDrawingArea.method385(0, "To " + s1 + ":", i1, 4);
    textDrawingArea.method385(0x800000, chatMessages[k], i1, 12 + textDrawingArea.getTextWidth("To " + s1));
    }
    j++;
    }
    if(l == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1)))
    {
    if(i1 > 0 && i1 < 110)
    textDrawingArea.method385(0x7e3200, s1 + " " + chatMessages[k], i1, 4);
    j++;
    }
    }
    DrawingArea.defaultDrawingAreaSize();
    anInt1211 = j * 14 + 7;
    if(anInt1211 < 78)
    anInt1211 = 78;
    drawScrollbar(77, anInt1211 - anInt1089 - 77, 19, 480, anInt1211);
    String s;
    if(myPlayer != null && myPlayer.name != null)
    s = myPlayer.name;
    else
    s = TextClass.fixName(myUsername);
    textDrawingArea.method385(0, s + ":", 110, 19);
    textDrawingArea.drawChatInput(255, 20 + textDrawingArea.getTextWidth(s + ": "), inputString + "*", 110, false);
    DrawingArea.method339(96, 0x000000, 479, 17);
    }
    if(menuOpen && menuScreenArea == 2) {
    drawMenu();
    }
    aRSImageProducer_1166.drawGraphics(338, super.graphics, 0);
    aRSImageProducer_1165.initDrawingArea();
    Texture.anIntArray1472 = anIntArray1182;
    }
    Reply With Quote  
     

  5. #5  
    Donator


    Join Date
    May 2008
    Posts
    1,234
    Thanks given
    31
    Thanks received
    25
    Rep Power
    279
    bump, anyone?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Santaher0's Avatar
    Join Date
    Sep 2008
    Posts
    2,033
    Thanks given
    324
    Thanks received
    49
    Rep Power
    1282
    This is mine
    Code:
    	public void drawChatArea() {
    		aRSImageProducer_1166.initDrawingArea();
    		Texture.anIntArray1472 = anIntArray1180;
    		chatArea.drawSprite(0, 0);
    		drawChannelButtons();
    		TextDrawingArea textDrawingArea = regularText;
    		if(messagePromptRaised) {
    			boldText.drawText(0, aString1121, 60, 259);
    			boldText.drawText(128, promptInput + "*", 80, 259);
    		} else if(inputDialogState == 1) {
    			boldText.drawText(0, "Enter amount:", 60, 259);
    			boldText.drawText(128, amountOrNameInput + "*", 80, 259);
    		} else if(inputDialogState == 2) {
    			boldText.drawText(0, "Enter name:", 60, 259);
    			boldText.drawText(128, amountOrNameInput + "*", 80, 259);
    		} else if(aString844 != null) {
    			boldText.drawText(0, aString844, 60, 259);
    			boldText.drawText(128, "Click to continue", 80, 259);
    		} else if(backDialogID != -1) {
    			drawInterface(0, 20, RSInterface.interfaceCache[backDialogID], 20);
    		} else if(dialogID != -1) {
    			drawInterface(0, 20, RSInterface.interfaceCache[dialogID], 20);
    		} else {
    			int j77 = -3;
    			int j = 0;
    			DrawingArea.setDrawingArea(122, 8, 497, 7);
    			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) {
    					if(yPos > 0 && yPos < 210)
    						textDrawingArea.method389(false, 11, 0, chatMessages[k], yPos);//chat color enabled
    					j++;
    					j77++;
    					}
    				}
    				if((chatType == 1 || chatType == 2) && (chatType == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s1))) {
    					if (chatTypeView == 1 || chatTypeView == 0) {
    						if(yPos > 0 && yPos < 210) {
    							int xPos = 11;
    							if(byte0 == 1) {
    								modIcons[0].drawBackground(xPos + 1, yPos - 12);
    								xPos += 14;
    							} else if(byte0 == 2) {
    								modIcons[1].drawBackground(xPos + 1, yPos - 12);
    								xPos += 14;
    							} else if(byte0 == 3) {
    								modIcons[2].drawBackground(xPos + 1, yPos - 12);
    								xPos += 14;
    							}
    							textDrawingArea.method385(0, s1 + ":", yPos, xPos);
    							xPos += textDrawingArea.getTextWidth(s1) + 8;
    							textDrawingArea.method389(false, xPos, 255, chatMessages[k], yPos);
    						}
    						j++;
    						j77++;
    					}
    				}
    				if((chatType == 3 || chatType == 7) && (splitPrivateChat == 0 || chatTypeView == 2) && (chatType == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s1))) {
    					if (chatTypeView == 2 || chatTypeView == 0) {
    						if(yPos > 0 && yPos < 210) {
    							int k1 = 11;
    							textDrawingArea.method385(0, "From", yPos, k1);
    							k1 += textDrawingArea.getTextWidth("From ");
    							if(byte0 == 1) {
    								modIcons[0].drawBackground(k1, yPos - 12);
    								k1 += 12;
    							} else if(byte0 == 2) {
    								modIcons[1].drawBackground(k1, yPos - 12);
    								k1 += 12;
    							} else if(byte0 == 3) {
    								modIcons[2].drawBackground(k1, yPos - 12);
    								k1 += 12;
    							}
    							textDrawingArea.method385(0, s1 + ":", yPos, k1);
    							k1 += textDrawingArea.getTextWidth(s1) + 8;
    							textDrawingArea.method385(0x800000, chatMessages[k], yPos, k1);
    						}
    						j++;
    						j77++;
    					}
    				}
    				if(chatType == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
    					if (chatTypeView == 3 || chatTypeView == 0) {
    						if(yPos > 0 && yPos < 210)
    							textDrawingArea.method385(0x800080, s1 + " " + chatMessages[k], yPos, 11);
    						j++;
    						j77++;
    					}
    				}
    				if(chatType == 5 && splitPrivateChat == 0 && privateChatMode < 2) {
    					if (chatTypeView == 2 || chatTypeView == 0) {
    						if(yPos > 0 && yPos < 210)
    							textDrawingArea.method385(0x800000, chatMessages[k], yPos, 11);
    						j++;
    						j77++;
    					}
    				}
    				if(chatType == 6 && (splitPrivateChat == 0 || chatTypeView == 2) && privateChatMode < 2) {
    					if (chatTypeView == 2 || chatTypeView == 0) {
    						if(yPos > 0 && yPos < 210) {
    							textDrawingArea.method385(0, "To " + s1 + ":", yPos, 11);
    							textDrawingArea.method385(0x800000, chatMessages[k], yPos, 15 + textDrawingArea.getTextWidth("To :" + s1));
    						}
    					j++;
    					j77++;
    					}
    				}
    				if(chatType == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
    					if (chatTypeView == 3 || chatTypeView == 0) {
    						if(yPos > 0 && yPos < 210)
    							textDrawingArea.method385(0x7e3200, s1 + " " + chatMessages[k], yPos, 11);
    						j++;
    						j77++;
    					}
    					if(chatType == 11 && (clanChatMode == 0)) {
    						if (chatTypeView == 11) {
    						if(yPos > 0 && yPos < 210)
    							textDrawingArea.method385(0x7e3200, s1 + " " + chatMessages[k], yPos, 11);
    						j++;
    						j77++;
    					}
    					if(chatType == 12) {
    						if(yPos > 0 && yPos < 110)
    							textDrawingArea.method385(0x7e3200, chatMessages[k] + " @blu@" + s1, yPos, 11);
    							j++;
    						}
    					}
    				}
    				if(chatType == 16) {
    					int j2 = 40;
    					int clanNameWidth = textDrawingArea.getTextWidth(clanname);
    					if(chatTypeView == 11 || chatTypeView == 0) {
    						if(yPos > 3 && yPos < 130)
    							switch(chatRights[k]) {
    								case 1:
    									j2 += clanNameWidth;
    									modIcons[0].drawBackground(j2 - 18, yPos - 12);
    									j2 += 14;
    									break;
    									
    								case 2:
    									j2 += clanNameWidth;
    									modIcons[1].drawBackground(j2 - 18, yPos - 12);
    									j2 += 14;
    									break;
    									
    								case 3:
    									j2 += clanNameWidth;
    									modIcons[1].drawBackground(j2 - 18, yPos - 12);
    									j2 += 14;
    								break;
    								
    								case 4:
    									j2 += clanNameWidth;
    									modIcons[2].drawBackground(j2 - 18, yPos - 12);
    									j2 += 14;
    								break;
    				
    								default:
    									j2 += clanNameWidth;
    									break;
    							}
    							textDrawingArea.method385(0, "[", yPos, 8);
    							textDrawingArea.method385(255, ""+clanname+"", yPos, 14);
    							textDrawingArea.method385(0, "]", yPos, clanNameWidth + 14);
    							
    							textDrawingArea.method385(0, capitalize(chatNames[k]) + ":", yPos, j2 - 17); //j2
    							j2 += textDrawingArea.getTextWidth(chatNames[k]) + 7;
    							textDrawingArea.method385(0x800000, chatMessages[k], yPos, j2 - 16);//j2
    							j++;
    							j77++;
    						}
    					}
    			}
    			DrawingArea.defaultDrawingAreaSize();
    			anInt1211 = j * 14 + 7 + 5;
    			if(anInt1211 < 111)
    				anInt1211 = 111;
    			drawScrollbar(114, anInt1211 - anInt1089 - 113, 7, 496, anInt1211);
    			String s;
    			if(myPlayer != null && myPlayer.name != null)
    				s = myPlayer.name;
    			else
    				s = TextClass.fixName(capitalize(myUsername));
    			textDrawingArea.method385(0, s + ":", 133, 11);
    			textDrawingArea.drawChatInput(255, 12 + textDrawingArea.getTextWidth(s + ": "), inputString + "*", 133, false);
    			DrawingArea.method339(121, 0x807660, 506, 7);
    		}
    		if(menuOpen && menuScreenArea == 2) {
    			drawMenu();
    		}
    		aRSImageProducer_1166.drawGraphics(338, super.graphics, 0);
    		aRSImageProducer_1165.initDrawingArea();
    		Texture.anIntArray1472 = anIntArray1182;
    	}
    - Support my project ArkScape

    - Santaher0's MusicBot

    - Santaher0's MovieBot
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [WebSite Text]Simple Problem
    By Zattion in forum Application Development
    Replies: 3
    Last Post: 06-16-2011, 08:49 PM
  2. Forced Text Problem
    By pingpong in forum Help
    Replies: 15
    Last Post: 06-13-2011, 04:24 AM
  3. [PI] Weird interface text problem
    By shotme in forum Help
    Replies: 2
    Last Post: 01-25-2011, 11:22 AM
  4. Replies: 9
    Last Post: 02-19-2010, 12:52 AM
  5. Replies: 6
    Last Post: 11-25-2009, 04:08 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •