Add missing JavaDoc headers
This commit is contained in:
parent
50b91f276b
commit
2b739899a1
|
@ -5,6 +5,9 @@ import net.fabricmc.fabric.api.registry.CommandRegistry
|
||||||
import net.minecraft.client.MinecraftClient
|
import net.minecraft.client.MinecraftClient
|
||||||
import net.minecraft.server.command.CommandManager
|
import net.minecraft.server.command.CommandManager
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
object ASMR: ModInitializer {
|
object ASMR: ModInitializer {
|
||||||
|
|
||||||
override fun onInitialize() {
|
override fun onInitialize() {
|
||||||
|
|
|
@ -8,6 +8,9 @@ import net.shadowfacts.shadowui.geometry.Size
|
||||||
import net.shadowfacts.shadowui.util.Color
|
import net.shadowfacts.shadowui.util.Color
|
||||||
import net.shadowfacts.shadowui.view.Label
|
import net.shadowfacts.shadowui.view.Label
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
class TestScreen: Screen() {
|
class TestScreen: Screen() {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|
|
@ -2,6 +2,9 @@ package net.shadowfacts.shadowui
|
||||||
|
|
||||||
import no.birkett.kiwi.Variable
|
import no.birkett.kiwi.Variable
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
class LayoutVariable(val owner: View, val property: String): Variable("LayoutVariable") {
|
class LayoutVariable(val owner: View, val property: String): Variable("LayoutVariable") {
|
||||||
|
|
||||||
override fun getName() = "$owner.$property"
|
override fun getName() = "$owner.$property"
|
||||||
|
|
|
@ -5,6 +5,9 @@ import net.minecraft.network.chat.TextComponent
|
||||||
import net.shadowfacts.shadowui.geometry.Point
|
import net.shadowfacts.shadowui.geometry.Point
|
||||||
import no.birkett.kiwi.Solver
|
import no.birkett.kiwi.Solver
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
open class Screen: Screen(TextComponent("Screen")) {
|
open class Screen: Screen(TextComponent("Screen")) {
|
||||||
|
|
||||||
val windows = mutableListOf<Window>()
|
val windows = mutableListOf<Window>()
|
||||||
|
|
|
@ -9,6 +9,9 @@ import net.shadowfacts.shadowui.util.RenderHelper
|
||||||
import no.birkett.kiwi.Constraint
|
import no.birkett.kiwi.Constraint
|
||||||
import no.birkett.kiwi.Solver
|
import no.birkett.kiwi.Solver
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
open class View {
|
open class View {
|
||||||
|
|
||||||
lateinit var solver: Solver
|
lateinit var solver: Solver
|
||||||
|
|
|
@ -3,6 +3,9 @@ package net.shadowfacts.shadowui
|
||||||
import net.shadowfacts.shadowui.geometry.Point
|
import net.shadowfacts.shadowui.geometry.Point
|
||||||
import no.birkett.kiwi.Solver
|
import no.birkett.kiwi.Solver
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
class Window {
|
class Window {
|
||||||
|
|
||||||
var solver = Solver()
|
var solver = Solver()
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package net.shadowfacts.shadowui.geometry
|
package net.shadowfacts.shadowui.geometry
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
class Point(val x: Double, val y: Double) {
|
class Point(val x: Double, val y: Double) {
|
||||||
|
|
||||||
constructor(x: Int, y: Int): this(x.toDouble(), y.toDouble())
|
constructor(x: Int, y: Int): this(x.toDouble(), y.toDouble())
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package net.shadowfacts.shadowui.geometry
|
package net.shadowfacts.shadowui.geometry
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
data class Rect(val left: Double, val top: Double, val width: Double, val height: Double) {
|
data class Rect(val left: Double, val top: Double, val width: Double, val height: Double) {
|
||||||
|
|
||||||
val right: Double by lazy {
|
val right: Double by lazy {
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
package net.shadowfacts.shadowui.geometry
|
package net.shadowfacts.shadowui.geometry
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
data class Size(val width: Double, val height: Double)
|
data class Size(val width: Double, val height: Double)
|
|
@ -1,5 +1,8 @@
|
||||||
package net.shadowfacts.shadowui.util
|
package net.shadowfacts.shadowui.util
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
data class Color(val red: Int, val green: Int, val blue: Int, val alpha: Int = 255) {
|
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)
|
constructor(rgb: Int, alpha: Int = 255): this(rgb shr 16, (rgb shr 8) and 255, rgb and 255, alpha)
|
||||||
|
|
|
@ -3,6 +3,9 @@ package net.shadowfacts.shadowui.util
|
||||||
import net.minecraft.client.gui.DrawableHelper
|
import net.minecraft.client.gui.DrawableHelper
|
||||||
import net.shadowfacts.shadowui.geometry.Rect
|
import net.shadowfacts.shadowui.geometry.Rect
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
object RenderHelper {
|
object RenderHelper {
|
||||||
|
|
||||||
fun fill(rect: Rect, color: Color) {
|
fun fill(rect: Rect, color: Color) {
|
||||||
|
|
|
@ -6,6 +6,9 @@ import net.shadowfacts.shadowui.View
|
||||||
import net.shadowfacts.shadowui.geometry.Size
|
import net.shadowfacts.shadowui.geometry.Size
|
||||||
import net.shadowfacts.shadowui.util.Color
|
import net.shadowfacts.shadowui.util.Color
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author shadowfacts
|
||||||
|
*/
|
||||||
class Label(text: String): View() {
|
class Label(text: String): View() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
Loading…
Reference in New Issue