Changeset 3163 in orxonox.OLD for orxonox/trunk/gui
- Timestamp:
- Dec 13, 2004, 2:14:18 AM (20 years ago)
- Location:
- orxonox/trunk/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui_keys.cc
r3161 r3163 32 32 { 33 33 keysFrame = new Frame ("Keyboard-Options:"); 34 keysFrame->setGroupName("Keyboard");35 keysBox = new Box (' v');34 // keysFrame->setGroupName("Keyboard"); 35 keysBox = new Box ('h'); 36 36 player1 = new Player("player1"); 37 //player2 = new Player("player2");37 player2 = new Player("player2"); 38 38 39 39 keysBox->fill(player1->getOpenButton()); 40 //keysBox->fill(player2->getOpenButton());40 keysBox->fill(player2->getOpenButton()); 41 41 42 42 keysFrame->fill (keysBox); … … 57 57 Player::Player(char* player) 58 58 { 59 60 pKeyWindow = new Window("keys of player"); 61 pKeyFrame = new Frame ("keys"); 59 char windowName[100] = "Keyboard settings of "; 60 strcat (windowName, player); 61 pKeyWindow = new Window(windowName); 62 pKeyFrame = new Frame (windowName); 62 63 pKeysBox = new Box('v'); 63 pKeysBox->setGroupName ( "player1");64 pKeysBox->setGroupName (player); 64 65 pKeysBox->fill(addKey(UP, "up")); 65 66 pKeysBox->fill(addKey(DOWN, "down")); … … 144 145 case GDK_Up: 145 146 printf("Up arrow key!\n"); 146 s printf(title, "%s", "up");147 strcpy(title, "up"); 147 148 break; 148 149 case GDK_Down: 149 150 printf("Down arrow key!\n"); 150 s printf(title, "%s", "down");151 strcpy(title, "down"); 151 152 break; 152 153 case GDK_Left: 153 154 printf("Left arrow key!\n"); 154 s printf(title, "%s", "left");155 strcpy(title, "left"); 155 156 break; 156 157 case GDK_Right: 157 158 printf("Right arrow key!\n"); 158 s printf(title, "%s", "right");159 strcpy(title, "right"); 159 160 break; 160 161 161 162 case GDK_space: 162 163 printf("Space Pressed.\n"); 163 sprintf(title, "%s", "space"); 164 break; 165 166 /* case GDK_escape: 167 printf("Esc Pressed.\n"); 168 sprintf(title, "%s", "esc"); 169 */ 164 strcpy(title, "space"); 165 break; 166 170 167 case 65293: 171 168 printf("Enter Pressed\n"); 172 s printf(title, "%s", "enter");169 strcpy(title, "enter"); 173 170 break; 174 171 175 172 // Special Keys // 173 case GDK_Escape: 174 printf("Esc Pressed.\n"); 175 strcpy(title, "esc"); 176 break; 177 case GDK_Tab: 178 printf("Tab Pressed.\n"); 179 strcpy(title, "tab"); 180 break; 176 181 case GDK_Shift_L: 177 182 printf("Left Shift!\n"); 178 s printf(title, "%s", "l_shift");183 strcpy(title, "l_shift"); 179 184 break; 180 185 case GDK_Shift_R: 181 186 printf("Right Shift!\n"); 182 s printf(title, "%s", "r_shift");187 strcpy(title, "r_shift"); 183 188 break; 184 189 case GDK_Control_L: 185 190 printf("Left Control!\n"); 186 s printf(title, "%s", "l_ctrl");191 strcpy(title, "l_ctrl"); 187 192 break; 188 193 case GDK_Control_R: 189 194 printf("Right Control!\n"); 190 s printf(title, "%s", "r_ctrl");195 strcpy(title, "r_ctrl"); 191 196 break; 192 197 case GDK_Alt_L: 193 198 printf("Left Alt!\n"); 194 s printf(title, "%s", "l_alt");199 strcpy(title, "l_alt"); 195 200 break; 196 201 case GDK_Alt_R: 197 202 printf("Rigth Alt!\n"); 198 s printf(title, "%s", "r_alt");203 strcpy(title, "r_alt"); 199 204 break; 200 205 // FXX KEYS // 201 206 case GDK_F1: 202 207 printf("F1!\n"); 203 s printf(title, "%s", "f1");208 strcpy(title, "f1"); 204 209 break; 205 210 case GDK_F2: 206 211 printf("F2!\n"); 207 s printf(title, "%s", "f2");212 strcpy(title, "f2"); 208 213 break; 209 214 case GDK_F3: 210 215 printf("F3!\n"); 211 s printf(title, "%s", "f3");216 strcpy(title, "f3"); 212 217 break; 213 218 case GDK_F4: 214 219 printf("F4!\n"); 215 s printf(title, "%s", "f4");220 strcpy(title, "f4"); 216 221 break; 217 222 case GDK_F5: 218 223 printf("F5!\n"); 219 s printf(title, "%s", "f5");224 strcpy(title, "f5"); 220 225 break; 221 226 case GDK_F6: 222 227 printf("F6!\n"); 223 s printf(title, "%s", "f6");228 strcpy(title, "f6"); 224 229 break; 225 230 case GDK_F7: 226 231 printf("F7!\n"); 227 s printf(title, "%s", "f7");232 strcpy(title, "f7"); 228 233 break; 229 234 case GDK_F8: 230 235 printf("F8!\n"); 231 s printf(title, "%s", "f8");236 strcpy(title, "f8"); 232 237 break; 233 238 case GDK_F9: 234 239 printf("F9\n"); 235 s printf(title, "%s", "f9");240 strcpy(title, "f9"); 236 241 break; 237 242 case GDK_F10: 238 243 printf("F10!\n"); 239 s printf(title, "%s", "f10");244 strcpy(title, "f10"); 240 245 break; 241 246 case GDK_F11: 242 247 printf("F11!\n"); 243 s printf(title, "%s", "f11");248 strcpy(title, "f11"); 244 249 break; 245 250 case GDK_F12: 246 251 printf("F12!\n"); 247 s printf(title, "%s", "f12");252 strcpy(title, "f12"); 248 253 break; 249 254 … … 253 258 sprintf(tmp, "%c", event->keyval); 254 259 printf ("other key %s \n", tmp); 255 s printf(title, "%s", tmp);260 strcpy(title, tmp); 256 261 break; 257 262 } -
orxonox/trunk/gui/orxonox_gui_keys.h
r3156 r3163 23 23 Box* keysBox; 24 24 Player* player1; 25 //Player* player2;25 Player* player2; 26 26 Button* misc; 27 27
Note: See TracChangeset
for help on using the changeset viewer.