<commit_before>package org.runestar.client.plugins.windowsize

import org.kxtra.slf4j.logger.info
import org.runestar.client.api.Application
import org.runestar.client.game.raw.Client
import org.runestar.client.plugins.spi.AbstractPlugin
import org.runestar.client.plugins.spi.PluginSettings
import java.awt.Component
import java.awt.Dimension

class WindowSize : AbstractPlugin<WindowSize.Settings>() {

    override val defaultSettings = Settings()

    override val name = "Window Size"

    override fun start() {
        (Client.accessor as Component).size = ctx.settings.size
        Application.frame.refit()
        ctx.logger.info { "frame size: ${Application.frame.size}" }
    }

    override fun stop() {

    }

    data class Settings(
            val size: Dimension = Client.accessor.canvas.size<commit_msg>Window Size: lock to selected size<commit_after>package org.runestar.client.plugins.windowsize

import org.kxtra.slf4j.logger.info
import org.runestar.client.api.Application
import org.runestar.client.game.raw.Client
import org.runestar.client.plugins.spi.AbstractPlugin
import org.runestar.client.plugins.spi.PluginSettings
import java.awt.Component
import java.awt.Dimension
import javax.swing.SwingUtilities

class WindowSize : AbstractPlugin<WindowSize.Settings>() {

    override val defaultSettings = Settings()

    override val name = "Window Size"

    override fun start() {
        SwingUtilities.invokeLater {
            (Client.accessor as Component).size = ctx.settings.gameSize
            val frame = Application.frame
            frame.refit()
            frame.isResizable = false
            ctx.logger.info { "frame size: ${frame.size}" }
        }
    }

    override fun stop() {
        SwingUtilities.invokeLater {
            Application.frame.isResizable = true
        }
    }

    data class Settings(
            val gameSize: Dimension = Client.accessor.canvas.size
{'fraction_non_alphanumeric': 0.09484106305367379, 'fraction_numerical': 0.0010422094841063053, 'mean_word_length': 3.129032258064516, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6126331', 'n_tokens_mistral': 547, 'n_tokens_neox': 538, 'n_words': 115}