equal
deleted
inserted
replaced
267 begin |
267 begin |
268 InputStr.s[0]:= InputStrL[byte(InputStr.s[0])]; |
268 InputStr.s[0]:= InputStrL[byte(InputStr.s[0])]; |
269 SetLine(InputStr, InputStr.s, true) |
269 SetLine(InputStr, InputStr.s, true) |
270 end; |
270 end; |
271 {Esc} |
271 {Esc} |
272 27: SetLine(InputStr, '', true); |
272 27: if Length(InputStr.s) > 0 then SetLine(InputStr, '', true) |
|
273 else |
|
274 begin |
|
275 FreezeEnterKey; |
|
276 SDL_EnableKeyRepeat(0,0); |
|
277 GameState:= gsGame; |
|
278 end; |
273 {Return} |
279 {Return} |
274 3, 13, 271: begin |
280 3, 13, 271: begin |
275 if Length(InputStr.s) > 0 then |
281 if Length(InputStr.s) > 0 then |
276 begin |
282 begin |
277 AcceptChatString(InputStr.s); |
283 AcceptChatString(InputStr.s); |
278 SetLine(InputStr, '', false) |
284 SetLine(InputStr, '', false) |
279 end; |
285 end; |
280 FreezeEnterKey; |
286 FreezeEnterKey; |
281 GameState:= gsGame |
287 SDL_EnableKeyRepeat(0,0); |
|
288 GameState:= gsGame; |
282 end; |
289 end; |
283 else |
290 else |
284 if (Key < $80) then btw:= 1 |
291 if (Key < $80) then btw:= 1 |
285 else if (Key < $800) then btw:= 2 |
292 else if (Key < $800) then btw:= 2 |
286 else if (Key < $10000) then btw:= 3 |
293 else if (Key < $10000) then btw:= 3 |
337 |
344 |
338 procedure chChat(var s: shortstring); |
345 procedure chChat(var s: shortstring); |
339 begin |
346 begin |
340 s:= s; // avoid compiler hint |
347 s:= s; // avoid compiler hint |
341 GameState:= gsChat; |
348 GameState:= gsChat; |
|
349 SDL_EnableKeyRepeat(200,45); |
342 if length(s) = 0 then |
350 if length(s) = 0 then |
343 KeyPressChat(27) |
351 SetLine(InputStr, '', true) |
344 else |
352 else |
345 begin |
353 begin |
|
354 // err, does anyone have any documentation on this sequence? |
346 KeyPressChat(27); |
355 KeyPressChat(27); |
347 KeyPressChat(47); |
356 KeyPressChat(47); |
348 KeyPressChat(116); |
357 KeyPressChat(116); |
349 KeyPressChat(101); |
358 KeyPressChat(101); |
350 KeyPressChat(97); |
359 KeyPressChat(97); |