mirror of
https://github.com/Maschell/GX2_GUI_Template.git
synced 2024-11-22 07:59:21 +01:00
add image+text examples, and update readme
This commit is contained in:
parent
2bf59b2557
commit
86166570ab
@ -5,9 +5,16 @@ This a (hopefully clean) template for GX2 (gui) project. [...]
|
||||
This example with render a white screen and return to the Homewbrew Launcher by pressing the Home button.<br />
|
||||
At menu/MainWindowTV.cpp the magic of drawing the white screen is happening.
|
||||
|
||||
There are also commented out examples of how to quickly add a GuiImage or GuiText.
|
||||
|
||||
#Building#
|
||||
In order to build this application, you need the custom liboGC and portlibs modified/created by dimok. You can find them on the loadiine_gx2 repo (https://github.com/dimok789/loadiine_gx2/releases/tag/v0.2). Simply put the files in your devkit folder and run the Makefile.
|
||||
|
||||
You will also need the submodule from this repo in the folder "src/dynamic_libs", which you can get via:
|
||||
```
|
||||
git clone --recursive https://github.com/Maschell/GX2_GUI_Template.git
|
||||
```
|
||||
|
||||
#Credits#
|
||||
A big thanks goes out to <b>dimok</b> for creating the HBL, the dynamic libs and every stuff he made. The "environment" of this app is copied from HBL. In fact is just a cropped version of the HBL with a few extra GUI Element. So big shoutouts to dimok!
|
||||
|
||||
|
BIN
data/images/pumpkin_pie.jpg
Normal file
BIN
data/images/pumpkin_pie.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
@ -29,6 +29,21 @@ MainWindowTV::MainWindowTV(int w, int h)
|
||||
bgImageColor.setImageColor((GX2Color){ 248, 248, 249, 255 }, 2);
|
||||
bgImageColor.setImageColor((GX2Color){ 248, 248, 249, 255 }, 3);
|
||||
append(&bgImageColor);
|
||||
|
||||
// The below code will draw a pumpkin_pie.jpg mage from
|
||||
// the /data folder when uncommented
|
||||
// GuiImageData* pieImgData = Resources::GetImageData("pumpkin_pie.jpg");
|
||||
// GuiImage* pie = new GuiImage(pieImgData);
|
||||
// pie->setPosition(-200, 50); // moves left by 200, up 50 from the center
|
||||
// append(pie);
|
||||
|
||||
// The below code wll draw "Hello World!" as a string
|
||||
// opionally underneath the pie, if it is available
|
||||
// const char* cpName = "Hello World!";
|
||||
// GuiText* hello = new GuiText(cpName, 28, glm::vec4(0, 0, 0, 1));
|
||||
// hello->setAlignment(ALIGN_RIGHT | ALIGN_CENTER); // start from midright
|
||||
// hello->setPosition(-250, 0); // move the text left 200 from the right
|
||||
// append(hello);
|
||||
}
|
||||
|
||||
MainWindowTV::~MainWindowTV()
|
||||
|
Loading…
Reference in New Issue
Block a user