Commit f6c31eea authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Handle KEY_RECLICK events generated by ScreenManager

parent f585fc98
...@@ -6,6 +6,7 @@ in the source distribution for its full text. ...@@ -6,6 +6,7 @@ in the source distribution for its full text.
*/ */
#include "AffinityPanel.h" #include "AffinityPanel.h"
#include "CRT.h"
#include "CheckItem.h" #include "CheckItem.h"
...@@ -23,6 +24,7 @@ static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) { ...@@ -23,6 +24,7 @@ static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) {
CheckItem* selected = (CheckItem*) Panel_getSelected(this); CheckItem* selected = (CheckItem*) Panel_getSelected(this);
switch(ch) { switch(ch) {
case KEY_MOUSE: case KEY_MOUSE:
case KEY_RECLICK:
case ' ': case ' ':
CheckItem_set(selected, ! (CheckItem_get(selected)) ); CheckItem_set(selected, ! (CheckItem_get(selected)) );
return HANDLED; return HANDLED;
......
...@@ -65,6 +65,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) { ...@@ -65,6 +65,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) {
case 0x0d: case 0x0d:
case KEY_ENTER: case KEY_ENTER:
case KEY_MOUSE: case KEY_MOUSE:
case KEY_RECLICK:
case ' ': case ' ':
for (int i = 0; ColorSchemeNames[i] != NULL; i++) for (int i = 0; ColorSchemeNames[i] != NULL; i++)
CheckItem_set((CheckItem*)Panel_get(super, i), false); CheckItem_set((CheckItem*)Panel_get(super, i), false);
......
...@@ -10,6 +10,7 @@ in the source distribution for its full text. ...@@ -10,6 +10,7 @@ in the source distribution for its full text.
#include "StringUtils.h" #include "StringUtils.h"
#include "ListItem.h" #include "ListItem.h"
#include "CRT.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -49,6 +50,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) { ...@@ -49,6 +50,7 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
case 0x0d: case 0x0d:
case KEY_ENTER: case KEY_ENTER:
case KEY_MOUSE: case KEY_MOUSE:
case KEY_RECLICK:
{ {
if (selected < size - 1) { if (selected < size - 1) {
this->moving = !(this->moving); this->moving = !(this->moving);
......
...@@ -8,6 +8,7 @@ in the source distribution for its full text. ...@@ -8,6 +8,7 @@ in the source distribution for its full text.
#include "DisplayOptionsPanel.h" #include "DisplayOptionsPanel.h"
#include "CheckItem.h" #include "CheckItem.h"
#include "CRT.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -47,6 +48,7 @@ static HandlerResult DisplayOptionsPanel_eventHandler(Panel* super, int ch) { ...@@ -47,6 +48,7 @@ static HandlerResult DisplayOptionsPanel_eventHandler(Panel* super, int ch) {
case 0x0d: case 0x0d:
case KEY_ENTER: case KEY_ENTER:
case KEY_MOUSE: case KEY_MOUSE:
case KEY_RECLICK:
case ' ': case ' ':
CheckItem_set(selected, ! (CheckItem_get(selected)) ); CheckItem_set(selected, ! (CheckItem_get(selected)) );
result = HANDLED; result = HANDLED;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment