All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.woojiahao.modifiers.yaml.YamlConfiguration.kt Maven / Gradle / Ivy

package com.github.woojiahao.modifiers.yaml

import com.github.woojiahao.style.Settings
import com.github.woojiahao.style.Settings.Theme
import com.github.woojiahao.style.utility.FontFamily
import com.github.woojiahao.style.utility.Measurement

data class YamlConfiguration(
  val font: FontFamily? = null,
  val monospaceFont: FontFamily? = null,
  val fontSize: Measurement? = null,
  val theme: Settings.Theme? = null
) {
  constructor(
    font: List?,
    monospaceFont: List?,
    fontSize: Int?,
    theme: String?
  ) : this(
    font?.let { FontFamily(*it.toTypedArray()) },
    monospaceFont?.let { FontFamily(*it.toTypedArray()) },
    fontSize?.let { Measurement(it.toDouble(), Measurement.Type.PIXELS) },
    theme?.let { Theme.valueOf(it.toUpperCase()) }
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy