mirror of
https://github.com/wiiu-env/launchiine.git
synced 2024-11-22 09:49:17 +01:00
Add game title when selected
This commit is contained in:
parent
11c295b2b5
commit
c26ded08f6
@ -30,6 +30,7 @@ GuiIconGrid::GuiIconGrid(int32_t w, int32_t h, uint64_t GameIndex,bool sortByNam
|
|||||||
sortByName(sortByName),
|
sortByName(sortByName),
|
||||||
particleBgImage(w, h, 50, 60.0f, 90.0f, 0.6f, 1.0f)
|
particleBgImage(w, h, 50, 60.0f, 90.0f, 0.6f, 1.0f)
|
||||||
, buttonClickSound(Resources::GetSound("button_click.mp3"))
|
, buttonClickSound(Resources::GetSound("button_click.mp3"))
|
||||||
|
, gameTitle((char*)NULL, 52, glm::vec4(1.0f))
|
||||||
, touchTrigger(GuiTrigger::CHANNEL_1, GuiTrigger::VPAD_TOUCH)
|
, touchTrigger(GuiTrigger::CHANNEL_1, GuiTrigger::VPAD_TOUCH)
|
||||||
, wpadTouchTrigger(GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5, GuiTrigger::BUTTON_A)
|
, wpadTouchTrigger(GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5, GuiTrigger::BUTTON_A)
|
||||||
, leftTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_LEFT | GuiTrigger::STICK_L_LEFT, true)
|
, leftTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_LEFT | GuiTrigger::STICK_L_LEFT, true)
|
||||||
@ -121,6 +122,12 @@ GuiIconGrid::GuiIconGrid(int32_t w, int32_t h, uint64_t GameIndex,bool sortByNam
|
|||||||
dragListener.dragged.connect(this, &GuiIconGrid::OnDrag);
|
dragListener.dragged.connect(this, &GuiIconGrid::OnDrag);
|
||||||
|
|
||||||
append(&dragListener);
|
append(&dragListener);
|
||||||
|
|
||||||
|
gameTitle.setPosition(0, -320);
|
||||||
|
gameTitle.setBlurGlowColor(5.0f, glm::vec4(0.109804, 0.6549, 1.0f, 1.0f));
|
||||||
|
gameTitle.setMaxWidth(900, GuiText::DOTTED);
|
||||||
|
gameTitle.setText("");
|
||||||
|
append(&gameTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiIconGrid::~GuiIconGrid() {
|
GuiIconGrid::~GuiIconGrid() {
|
||||||
@ -159,6 +166,7 @@ void GuiIconGrid::setSelectedGame(uint64_t idx) {
|
|||||||
container = x.second;
|
container = x.second;
|
||||||
if(x.first == idx) {
|
if(x.first == idx) {
|
||||||
container->image->setSelected(true);
|
container->image->setSelected(true);
|
||||||
|
gameTitle.setText(container->info->name.c_str());
|
||||||
} else {
|
} else {
|
||||||
container->image->setSelected(false);
|
container->image->setSelected(false);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,7 @@ private:
|
|||||||
|
|
||||||
GuiSound *buttonClickSound;
|
GuiSound *buttonClickSound;
|
||||||
|
|
||||||
|
GuiText gameTitle;
|
||||||
GuiTrigger touchTrigger;
|
GuiTrigger touchTrigger;
|
||||||
GuiTrigger wpadTouchTrigger;
|
GuiTrigger wpadTouchTrigger;
|
||||||
GuiTrigger leftTrigger;
|
GuiTrigger leftTrigger;
|
||||||
|
Loading…
Reference in New Issue
Block a user