<commit_before>package gameEngine.view.gameFrame.gameObjects;

import jgame.JGObject;

/**
 * 
 * @author alex
 * Slider to set frame rate proportional to slider position
 */
public class FrameRateSlider extends JGObject {

    protected double initial_x;
    
    public FrameRateSlider (String name,
                            boolean unique_id,
                            double x,
                            double y,
                            int collisionid,
                            String gfxname) {
        super(name, unique_id, x, y, collisionid, gfxname);
        initial_x=x;
        this.resume_in_view=false;
    }
    
    @Override
    public void move(){
        if (this.eng.getMouseButton(1)){
            if (Math.abs(this.eng.getMouseX()-initial_x)<=100){
                this.setPos(this.eng.getMouseX(),y);
            }
            this.eng.setFrameRate((x-initial_x)+101, 2);
        }
    }

}<commit_msg>Fixed bug with frame rate slider<commit_after>package gameEngine.view.gameFrame.gameObjects;

import jgame.JGObject;

/**
 * 
 * @author alex
 * Slider to set frame rate proportional to slider position
 */
public class FrameRateSlider extends JGObject {

    protected double initial_x,initial_y;
    
    public FrameRateSlider (String name,
                            boolean unique_id,
                            double x,
                            double y,
                            int collisionid,
                            String gfxname) {
        super(name, unique_id, x, y, collisionid, gfxname);
        initial_x=x;
        initial_y=y;
        this.resume_in_view=false;
    }
    
    @Override
    public void move(){
        if (this.eng.getMouseButton(1) && eng.getMouseY() > initial_y){
            if (Math.abs(this.eng.getMouseX()-initial_x)<=100){
                this.setPos(this.eng.getMouseX(),y);
            }
            this.eng.setFrameRate((x-initial_x)+101, 2);
        }
    }

}
{'fraction_non_alphanumeric': 0.09535951045385008, 'fraction_numerical': 0.00815910249872514, 'mean_word_length': 1.6442048517520216, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '7390687', 'n_tokens_mistral': 581, 'n_tokens_neox': 564, 'n_words': 120}