mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-19 19:59:35 +00:00
added WidgetMultipane
This commit is contained in:
1 parent
9f6e2d7533
commit
97b3e0ea1d
1 file changed
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) bdew, 2013 - 2014
|
||||
* https://github.com/bdew/bdlib
|
||||
*
|
||||
* This mod is distributed under the terms of the Minecraft Mod Public
|
||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||
* https://raw.github.com/bdew/bdlib/master/MMPL-1.0.txt
|
||||
*/
|
||||
|
||||
package net.bdew.lib.gui.widgets
|
||||
|
||||
import net.bdew.lib.gui.{Point, Rect}
|
||||
import scala.collection.mutable
|
||||
import org.lwjgl.opengl.GL11
|
||||
|
||||
abstract class WidgetMultipane(rect: Rect) extends WidgetSubcontainer(rect) {
|
||||
def getActivePane: BaseWidget
|
||||
|
||||
def addPane[T <: BaseWidget](w: T): T = {
|
||||
w.init(this)
|
||||
return w
|
||||
}
|
||||
override def activeWidgets = super.activeWidgets ++: List(getActivePane)
|
||||
}
|
||||
Reference in new issue
Block a user