Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void drawLoginScreen(boolean flag) {
- resetImageProducers();
- titleScreen.initDrawingArea();
- DrawingArea474.drawFilledPixels(0, 0, clientWidth, clientHeight, 0);
- int alpha = 0;
- titleAlpha += titleAlpha < 250 ? 10 : 0;
- if (alpha < 250)
- title.drawSprite1((clientWidth / 2) - (title.myWidth / 2), (clientHeight / 2) - (title.myHeight / 2), titleAlpha);
- else
- title.drawSprite((clientWidth / 2) - (title.myWidth / 2), (clientHeight / 2) - (title.myHeight / 2));
- int centerX = clientWidth / 2;
- int centerY = clientHeight / 2;
- if (titleAlpha >= 250) {
- if (loginScreenState != 2) {
- titleButton[2].drawSprite(clientWidth - 37, clientHeight - 36);
- if (mouseInRegion(clientWidth - 37, clientHeight - 36, clientWidth - 5, clientHeight - 5)) {
- optionsWidth += optionsWidth >= 0 && optionsWidth <= 92 ? 5 : 0;
- optionsWidth = optionsWidth > 92 ? optionsWidth = 92 : optionsWidth;
- titleButtonH[2] = new Sprite("titlescreen/titlebutton_hover 2", 32 + optionsWidth, 31);
- titleButtonH[2].drawSprite(clientWidth - 37 - optionsWidth, clientHeight - 36);
- hoverPiece.drawSprite(clientWidth - 37, clientHeight - 36);
- } else {
- optionsWidth -= optionsWidth >= 0 && optionsWidth <= 92 ? 5 : 0;
- optionsWidth = optionsWidth < 0 ? optionsWidth = 0 : optionsWidth;
- if (optionsWidth > 0) {
- titleButtonH[2] = new Sprite("titlescreen/titlebutton_hover 2", 32 + optionsWidth, 31);
- titleButtonH[2].drawSprite(clientWidth - 37 - optionsWidth, clientHeight - 36);
- hoverPiece.drawSprite(clientWidth - 37, clientHeight - 36);
- }
- }
- optionsIcon.drawSprite(clientWidth - 31, clientHeight - 31);
- }
- if (loginScreenState == 0) {
- drawTitleBox(centerX - (266 / 2), centerY - (225 / 2), 266, 225, 0);
- titleText.drawSprite(centerX - (titleText.myWidth / 2), centerY - 90);
- /* Username */
- titleButton[0].drawSprite(centerX - (titleButton[0].myWidth / 2), centerY - 44);
- if (mouseInRegion(centerX - (titleButton[0].myWidth / 2), centerY - 44, centerX + (titleButton[0].myWidth / 2), centerY - 9))
- titleButtonH[0].drawSprite(centerX - (titleButton[0].myWidth / 2), centerY - 44);
- /* Password */
- titleButton[0].drawSprite(centerX - (titleButton[0].myWidth / 2), centerY + 9);
- if (mouseInRegion(centerX - (titleButton[0].myWidth / 2), centerY + 9, centerX + (titleButton[0].myWidth / 2), centerY + 36))
- titleButtonH[0].drawSprite(centerX - (titleButton[0].myWidth / 2), centerY + 9);
- /* Log In */
- titleButton[1].drawSprite(centerX - (titleButton[1].myWidth / 2), centerY + 47);
- if (mouseInRegion(centerX - (titleButton[1].myWidth / 2), centerY + 47, centerX + (titleButton[1].myWidth / 2), centerY + 78))
- titleButtonH[1].drawSprite(centerX - (titleButton[1].myWidth / 2), centerY + 47);
- regularText.method389(true, centerX - (titleButton[0].myWidth / 2), 0xffffff, "Username:", centerY - 48);
- regularText.method389(true, centerX - (titleButton[0].myWidth / 2) + 5, 0xffffff, capitalize(myUsername) + ((loginScreenCursorPos == 0) & (loopCycle % 40 < 20) ? "@yel@|" : ""), centerY - 25);
- regularText.method389(true, centerX - (titleButton[0].myWidth / 2), 0xffffff, "Password:", centerY + 5);
- regularText.method389(true, centerX - (titleButton[0].myWidth / 2) + 5, 0xffffff, TextClass.passwordAsterisks(myPassword) + ((loginScreenCursorPos == 1) & (loopCycle % 40 < 20) ? "@yel@|" : ""), centerY + 28);
- if (loginMessage1.length() > 0 || loginMessage2.length() > 0) {
- int x1 = centerX - (266 / 2);
- int y1 = centerY - (225 / 2) + 227;
- drawTitleBox(x1, y1, 266, 45, 0);
- titleButton[3].drawSprite(x1 + 246, y1 + 4);
- if (mouseInRegion(x1 + 246, y1 + 4, x1 + 262, y1 + 20))
- titleButtonH[3].drawSprite(x1 + 246, y1 + 4);
- if (loginMessage1.length() > 0) {
- regularText.method382(0xffffff, centerX, loginMessage1, y1 + 20, true);
- regularText.method382(0xffffff, centerX, loginMessage2, y1 + 35, true);
- } else {
- regularText.method382(0xffffff, centerX, loginMessage2, y1 + 27, true);
- }
- }
- }
- if (loginScreenState == 1) {
- int accountX = centerX - 125;
- int accountY = centerY - (((50 * account.length) / 2) + 12);
- drawTitleBox(accountX, accountY, 250, (50 * account.length) + 25, 1);
- regularText.method382(0xffffff, centerX, "Accounts", accountY + 16, true);
- if (account.length > 0) {
- for (int a = 0; a < account.length; a++) {
- titleButton[0].drawSprite(centerX - (titleButton[0].myWidth / 2), accountY + 30 + (a * 30));
- }
- }
- }
- if (loginScreenState == 2) {
- drawTitleBox(centerX - (225 / 2), centerY - (settingHeight / 2), 225, settingHeight, 1);
- titleButton[3].drawSprite(centerX - (225 / 2) + 206, centerY - (settingHeight / 2) + 3);
- if (mouseInRegion(centerX - (225 / 2) + 206, centerY - (settingHeight / 2) + 3, centerX - (225 / 2) + 222, centerY - (settingHeight / 2) + 19))
- titleButtonH[3].drawSprite(centerX - (225 / 2) + 206, centerY - (settingHeight / 2) + 3);
- regularText.method382(0xffffff, centerX, "Client Settings", centerY - (settingHeight / 2) + 16, true);
- if (!settingsEnabled) {
- smallText.method382(0xff9933, centerX, "There are no settings", centerY - (settingHeight / 2) + 40, true);
- smallText.method382(0xff9933, centerX, "that have been enabled.", centerY - (settingHeight / 2) + 50, true);
- } else {
- for (int i1 = 0, yPos = centerY - (settingHeight / 2) + 40; i1 < settingNames.length; i1++, yPos += 16) {
- smallText.method389(true, centerX - 85, 0xffffff, settingNames[i1], yPos);
- if (settingEnabled[i1])
- selectedOption.drawSprite(centerX - 102, yPos - 13);
- else
- unselectedOption.drawSprite(centerX - 102, yPos - 13);
- }
- }
- }
- }
- titleScreen.drawGraphics(0, super.graphics, 0);
- if(welcomeScreenRaised) {
- welcomeScreenRaised = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement