Add missing JavaDoc headers

This commit is contained in:
Shadowfacts 2019-06-22 10:59:18 -04:00
parent 50b91f276b
commit 2b739899a1
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
12 changed files with 36 additions and 0 deletions

View File

@ -5,6 +5,9 @@ import net.fabricmc.fabric.api.registry.CommandRegistry
import net.minecraft.client.MinecraftClient
import net.minecraft.server.command.CommandManager
/**
* @author shadowfacts
*/
object ASMR: ModInitializer {
override fun onInitialize() {

View File

@ -8,6 +8,9 @@ import net.shadowfacts.shadowui.geometry.Size
import net.shadowfacts.shadowui.util.Color
import net.shadowfacts.shadowui.view.Label
/**
* @author shadowfacts
*/
class TestScreen: Screen() {
init {

View File

@ -2,6 +2,9 @@ package net.shadowfacts.shadowui
import no.birkett.kiwi.Variable
/**
* @author shadowfacts
*/
class LayoutVariable(val owner: View, val property: String): Variable("LayoutVariable") {
override fun getName() = "$owner.$property"

View File

@ -5,6 +5,9 @@ import net.minecraft.network.chat.TextComponent
import net.shadowfacts.shadowui.geometry.Point
import no.birkett.kiwi.Solver
/**
* @author shadowfacts
*/
open class Screen: Screen(TextComponent("Screen")) {
val windows = mutableListOf<Window>()

View File

@ -9,6 +9,9 @@ import net.shadowfacts.shadowui.util.RenderHelper
import no.birkett.kiwi.Constraint
import no.birkett.kiwi.Solver
/**
* @author shadowfacts
*/
open class View {
lateinit var solver: Solver

View File

@ -3,6 +3,9 @@ package net.shadowfacts.shadowui
import net.shadowfacts.shadowui.geometry.Point
import no.birkett.kiwi.Solver
/**
* @author shadowfacts
*/
class Window {
var solver = Solver()

View File

@ -1,5 +1,8 @@
package net.shadowfacts.shadowui.geometry
/**
* @author shadowfacts
*/
class Point(val x: Double, val y: Double) {
constructor(x: Int, y: Int): this(x.toDouble(), y.toDouble())

View File

@ -1,5 +1,8 @@
package net.shadowfacts.shadowui.geometry
/**
* @author shadowfacts
*/
data class Rect(val left: Double, val top: Double, val width: Double, val height: Double) {
val right: Double by lazy {

View File

@ -1,3 +1,6 @@
package net.shadowfacts.shadowui.geometry
/**
* @author shadowfacts
*/
data class Size(val width: Double, val height: Double)

View File

@ -1,5 +1,8 @@
package net.shadowfacts.shadowui.util
/**
* @author shadowfacts
*/
data class Color(val red: Int, val green: Int, val blue: Int, val alpha: Int = 255) {
constructor(rgb: Int, alpha: Int = 255): this(rgb shr 16, (rgb shr 8) and 255, rgb and 255, alpha)

View File

@ -3,6 +3,9 @@ package net.shadowfacts.shadowui.util
import net.minecraft.client.gui.DrawableHelper
import net.shadowfacts.shadowui.geometry.Rect
/**
* @author shadowfacts
*/
object RenderHelper {
fun fill(rect: Rect, color: Color) {

View File

@ -6,6 +6,9 @@ import net.shadowfacts.shadowui.View
import net.shadowfacts.shadowui.geometry.Size
import net.shadowfacts.shadowui.util.Color
/**
* @author shadowfacts
*/
class Label(text: String): View() {
companion object {