-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98a4ec6
commit 4b469e0
Showing
6 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,35 @@ | ||
package com.example.opengl3renderer.ui; | ||
|
||
import android.content.Context; | ||
|
||
import com.example.opengl3renderer.layers.Layer; | ||
import com.example.opengl3renderer.math.Vec2; | ||
import com.example.opengl3renderer.math.Vec4; | ||
import com.example.opengl3renderer.ui.object2d.card.Card; | ||
import com.example.opengl3renderer.ui.object2d.card.CardMaterial; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class UI { | ||
public ArrayList<Component> components; | ||
|
||
public UI(Context context){ | ||
components = new ArrayList<Component>(); | ||
CardMaterial material = new CardMaterial(context, new Vec4(0.8f, 0.8f, 0.8f, 0.2f)); | ||
Card card = new Card(material, new Vec2(0.0f, -0.8f), new Vec2(1.0f, 0.2f), 0.0f, 0.5f); | ||
Component menu = new Component(card); | ||
components.add(menu); | ||
} | ||
|
||
public ArrayList getComponents(){ | ||
return components; | ||
} | ||
|
||
public void addToLayerStack(List<Layer> layerStack){ | ||
for(int i = 0; i < components.size(); i++){ | ||
layerStack.add(components.get(i)); | ||
} | ||
} | ||
|
||
} |
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