<commit_before>﻿using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;
using System.Linq;

public class HighscoreMenu : BaseMenu {

    public Action OnCancel;
    public bool Loading;

    public List<Score> Scores {
        get {
            return scores;
        }
        set {
            scores = value.OrderBy(s => s.Amount).ThenBy(s => s.Updated).Reverse().ToList();
        }
    }

    private List<Score> scores;

    public HighscoreMenu() {
        windowRect = new Rect(Screen.width  / 2 - 100, Screen.height / 2 - 100, 200, 200);
    }
    
    private void ShowWindow(int id) {

        if (Loading) {
            GUILayout.Label("Posting highscore..");
        } else {
            foreach (Score score in scores) {
                GUILayout.Label(score.Updated.ToShortDateString() + " - " + score.Amount.ToString());
            }
            if (GUILayout.Button("OK")) {
                if (OnCancel != null) {
                    OnCancel();
                }
            }
        }
    }

    private void OnGUI() {
        GUI.skin = Skin;
        windowRect = GUILayout.Window(0, windowRect, ShowWindow, "Highscore");
    }
	
}<commit_msg>Added arrow to the HighscoreMenu's list, to show you which score is yours<commit_after>﻿using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;
using System.Linq;

public class HighscoreMenu : BaseMenu {

    public Action OnCancel;
    public bool Loading;
    public Score newestScore;

    public List<Score> Scores {
        get {
            return scores;
        }
        set {
            scores = value.OrderBy(s => s.Amount).ThenBy(s => s.Updated).Reverse().ToList();
            newestScore = scores.OrderByDescending(s => s.Updated).First();
        }
    }

    private List<Score> scores;

    public HighscoreMenu() {
        windowRect = new Rect(Screen.width  / 2 - 100, Screen.height / 2 - 100, 200, 200);
    }
    
    private void ShowWindow(int id) {

        if (Loading) {
            GUILayout.Label("Posting highscore..");
        } else {
            foreach (Score score in scores) {
                GUILayout.Label(score.Updated.ToShortDateString() + " - " + score.Amount.ToString() + (newestScore == score ? " <<<" : ""));
            }
            if (GUILayout.Button("OK")) {
                if (OnCancel != null) {
                    OnCancel();
                }
            }
        }
    }

    private void OnGUI() {
        GUI.skin = Skin;
        windowRect = GUILayout.Window(0, windowRect, ShowWindow, "Highscore");
    }
	
}
{'fraction_non_alphanumeric': 0.11872845653006511, 'fraction_numerical': 0.011489850631941785, 'mean_word_length': 1.829902491874323, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3212379', 'n_tokens_mistral': 798, 'n_tokens_neox': 734, 'n_words': 176}