<commit_before>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using Sphere.Core;

namespace SphereStudio.Plugins.Forms
{
    public partial class LayerForm : Form
    {
        private Layer layer;
        
        public LayerForm(Layer layer)
        {
            InitializeComponent();
            this.layer = layer;
            plxXSlide.SetRange(-160, 160);
            plxYSlide.SetRange(-160, 160);
            scrollXSlide.SetRange(-160, 160);
            scrollYSlide.SetRange(-160, 160);
            parallaxCheck.Checked = layer.Parallax;
        }

        private void updateLabels()
        {
            plxXLabel.Text = String.Format("X:{0}", plxXSlide.Value / 10.0);
            plxYLabel.Text = String.Format("Y:{0}", plxYSlide.Value / 10.0);
            scrollXLabel.Text = String.Format("X:{0}", scrollXSlide.Value / 10.0);
            scrollYLabel.Text = String.Format("Y:{0}", scrollYSlide.Value / 10.0);
        }

        private void LayerForm_Load(object sender, EventArgs e)
        {
            nameBox.Text = layer.Name;
            xSizeBox.Value = layer.Width; ySizeBox.Value = layer.Height;
            plxXSlide.Value = (int)(layer.ParallaxX * 10.0);
            plxYSlide.Value = (int)(layer.ParallaxY * 10.0);
            scrollXSlide.Value = (int)(layer.ScrollX * 10.0);
            scrollYSlide.Value = (int)(layer.ScrollY * 10.0);
            visibleCheck.Checked = layer.Visible;
            reflectCheck.Checked = layer.Reflective;
            updateLabels();
        }

        private void plxXSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }

        private void plxYSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }

        private void scrollXSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }

        private void scrollYSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }<commit_msg>Fix wrong parallax values in layer properties<commit_after>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using Sphere.Core;

namespace SphereStudio.Plugins.Forms
{
    public partial class LayerForm : Form
    {
        private Layer layer;
        
        public LayerForm(Layer layer)
        {
            InitializeComponent();
            this.layer = layer;
            plxXSlide.SetRange(-160, 160);
            plxYSlide.SetRange(-160, 160);
            scrollXSlide.SetRange(-160, 160);
            scrollYSlide.SetRange(-160, 160);
            parallaxCheck.Checked = layer.Parallax;
        }

        private void updateLabels()
        {
            plxXLabel.Text = String.Format("X:{0}", plxXSlide.Value / 10.0);
            plxYLabel.Text = String.Format("Y:{0}", plxYSlide.Value / 10.0);
            scrollXLabel.Text = String.Format("X:{0}", scrollXSlide.Value / 10.0);
            scrollYLabel.Text = String.Format("Y:{0}", scrollYSlide.Value / 10.0);
        }

        private void LayerForm_Load(object sender, EventArgs e)
        {
            nameBox.Text = layer.Name;
            xSizeBox.Value = layer.Width; ySizeBox.Value = layer.Height;
            plxXSlide.Value = (int)Math.Round(layer.ParallaxX * 10.0f);
            plxYSlide.Value = (int)Math.Round(layer.ParallaxY * 10.0f);
            scrollXSlide.Value = (int)Math.Round(layer.ScrollX * 10.0f);
            scrollYSlide.Value = (int)Math.Round(layer.ScrollY * 10.0f);
            visibleCheck.Checked = layer.Visible;
            reflectCheck.Checked = layer.Reflective;
            updateLabels();
        }

        private void plxXSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }

        private void plxYSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }

        private void scrollXSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }

        private void scrollYSlide_Scroll(object sender, EventArgs e)
        {
            updateLabels();
        }
{'fraction_non_alphanumeric': 0.10741920801092399, 'fraction_numerical': 0.023668639053254437, 'mean_word_length': 2.041522491349481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2340640', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1285, 'n_words': 250}