mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
some buttons are invoked via key press
This commit is contained in:
+12
-10
@@ -205,20 +205,22 @@ namespace battleship{
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void GuiAppState::onRawKeyPress(SEvent::SKeyInput event){
|
||||
updateControlsListbox(event.Key);
|
||||
void GuiAppState::onRawKeyPress(u8 trigger){
|
||||
Button *button = nullptr;
|
||||
|
||||
for(Button *b : buttons)
|
||||
if(b->getTrigger() == trigger){
|
||||
button = b;
|
||||
break;
|
||||
}
|
||||
|
||||
if(button)
|
||||
button->onClick();
|
||||
}
|
||||
|
||||
void GuiAppState::onRawMousePress(SEvent::SMouseInput event){
|
||||
int trigger=0;
|
||||
if(event.isMiddlePressed())
|
||||
trigger=1;
|
||||
else if(event.isRightPressed())
|
||||
trigger=2;
|
||||
void GuiAppState::onRawMousePress(u8 trigger){
|
||||
updateControlsListbox(trigger);
|
||||
}
|
||||
*/
|
||||
|
||||
Textbox* GuiAppState::getOpenTextbox() {
|
||||
Textbox* t = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user