<commit_before>/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package net.wurstclient.gui.main;

import static org.lwjgl.opengl.GL11.GL_BLEND;
import static org.lwjgl.opengl.GL11.GL_ONE_MINUS_SRC_ALPHA;
import static org.lwjgl.opengl.GL11.GL_SRC_ALPHA;
import static org.lwjgl.opengl.GL11.glBlendFunc;
import static org.lwjgl.opengl.GL11.glEnable;

import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Map.Entry;

import javax.net.ssl.HttpsURLConnection;

import org.lwjgl.opengl.GL11;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiMainMenu;
import net.minecraft.client.gui.GuiYesNo;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation;
import net.wurstclient.WurstClient;
import net.wurstclient.altmanager.screens.AltManagerScreen;
import net.wurstclient.compatibility.WMath;
import net.wurstclient.compatibility.WMinecraft;
import net.wurstclient.files.ConfigFiles;
import net.wurstclient.utils.JsonUtils;
import net.wurstclient.utils.MiscUtils;

public class GuiWurstMainMenu extends GuiMainMenu
{
	private static final ResourceLocation title =
		new ResourceLocation("wurst/wurst_380.png");
	private static final ResourceLocation santaHat =
		new ResourceLocation("wurst/santa_hat.png");
	private JsonObject news;
	private String newsTicker;
	private int newsWidth;
	private static boolean startupMessageDisabled = false;
	
	private String noticeText = "Wurst for Minecraft 1.11 is now available.";
	private String noticeLink =
		"https://www.wurstclient.net/download/minecraft-1-11-x/";
	
	private int noticeWidth2;
	private int noticeWidth1;
	private int noticeX1;
	private int noticeY1;
	private int noticeX2;
	private int noticeY2;
	
	public GuiWurstMainMenu()
	{
		super();
		
		if(WurstClient.INSTANCE.options.wurstNews)
			downloadWurstNews();
		
		WurstClient.INSTANCE.analytics.trackPageView("/", "Main Menu");
	}
	
	private void downloadWurstNews()
	{
		new Thread(new Runnable()
		{
			@Override<commit_msg>Update analytics<commit_after>/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package net.wurstclient.gui.main;

import static org.lwjgl.opengl.GL11.GL_BLEND;
import static org.lwjgl.opengl.GL11.GL_ONE_MINUS_SRC_ALPHA;
import static org.lwjgl.opengl.GL11.GL_SRC_ALPHA;
import static org.lwjgl.opengl.GL11.glBlendFunc;
import static org.lwjgl.opengl.GL11.glEnable;

import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Map.Entry;

import javax.net.ssl.HttpsURLConnection;

import org.lwjgl.opengl.GL11;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiMainMenu;
import net.minecraft.client.gui.GuiYesNo;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation;
import net.wurstclient.WurstClient;
import net.wurstclient.altmanager.screens.AltManagerScreen;
import net.wurstclient.compatibility.WMath;
import net.wurstclient.compatibility.WMinecraft;
import net.wurstclient.files.ConfigFiles;
import net.wurstclient.utils.JsonUtils;
import net.wurstclient.utils.MiscUtils;

public class GuiWurstMainMenu extends GuiMainMenu
{
	private static final ResourceLocation title =
		new ResourceLocation("wurst/wurst_380.png");
	private static final ResourceLocation santaHat =
		new ResourceLocation("wurst/santa_hat.png");
	private JsonObject news;
	private String newsTicker;
	private int newsWidth;
	private static boolean startupMessageDisabled = false;
	
	private String noticeText = "Wurst for Minecraft 1.11 is now available.";
	private String noticeLink =
		"https://www.wurstclient.net/download/minecraft-1-11-x/";
	
	private int noticeWidth2;
	private int noticeWidth1;
	private int noticeX1;
	private int noticeY1;
	private int noticeX2;
	private int noticeY2;
	
	public GuiWurstMainMenu()
	{
		super();
		
		if(WurstClient.INSTANCE.options.wurstNews)
			downloadWurstNews();
	}
	
	private void downloadWurstNews()
	{
		new Thread(new Runnable()
		{
			@Override
{'fraction_non_alphanumeric': 0.09504301515772225, 'fraction_numerical': 0.015977058582548137, 'mean_word_length': 5.08852867830424, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6981179', 'n_tokens_mistral': 1698, 'n_tokens_neox': 1661, 'n_words': 371}