Created
November 18, 2014 22:43
-
-
Save TheBizzle/1f112d5b9e1b34e41960 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class InputBoxType[T](val name:String) | |
case object Num extends InputBoxType[Double]("Number") | |
case object Str extends InputBoxType[String]("String") | |
case object StrReporter extends InputBoxType[String]("String (reporter)") | |
case object StrCommand extends InputBoxType[String]("String (commands)") | |
case object Col extends InputBoxType[Int]("Color") | |
case class InputBox[T](left: Int = 0, top: Int = 0, right: Int = 0, bottom: Int = 0, varName: String, value: T, multiline: Boolean = false, boxtype: InputBoxType[T]) | |
val ib = InputBox(0, 0, 0, 0, "apples", 9001, false, Col) | |
ib.boxtype match { case Col => "hello" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment