Move work on layout list scrollable
This commit is contained in:
parent
3267e52a4d
commit
cc2709aa93
@ -1,8 +1,13 @@
|
|||||||
package electrosphere.renderer.ui.layout;
|
package electrosphere.renderer.ui.layout;
|
||||||
|
|
||||||
|
import electrosphere.renderer.framebuffer.Framebuffer;
|
||||||
import electrosphere.renderer.ui.Widget;
|
import electrosphere.renderer.ui.Widget;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT;
|
||||||
|
import static org.lwjgl.opengl.GL11.GL_DEPTH_BUFFER_BIT;
|
||||||
|
import static org.lwjgl.opengl.GL11.glClear;
|
||||||
|
import static org.lwjgl.opengl.GL11.glClearColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -11,6 +16,7 @@ import java.util.List;
|
|||||||
public class LayoutSchemeListScrollable extends Widget implements LayoutScheme {
|
public class LayoutSchemeListScrollable extends Widget implements LayoutScheme {
|
||||||
|
|
||||||
List<Widget> widgetList = new LinkedList();
|
List<Widget> widgetList = new LinkedList();
|
||||||
|
Framebuffer widgetBuffer = new Framebuffer();
|
||||||
|
|
||||||
public LayoutSchemeListScrollable(int positionX, int positionY, int width, int height, boolean draw){
|
public LayoutSchemeListScrollable(int positionX, int positionY, int width, int height, boolean draw){
|
||||||
super(positionX,positionY,width,height,draw);
|
super(positionX,positionY,width,height,draw);
|
||||||
@ -18,6 +24,9 @@ public class LayoutSchemeListScrollable extends Widget implements LayoutScheme {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw() {
|
public void draw() {
|
||||||
|
widgetBuffer.bind();
|
||||||
|
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
for(Widget child : widgetList){
|
for(Widget child : widgetList){
|
||||||
child.draw();
|
child.draw();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user