1
0
forked from 0ad/0ad
Commit Graph

19 Commits

Author SHA1 Message Date
ee38f0db37 Implement readonly Input GUI objects and use it in the file location indicator in the replay menu,
so that the user can copy the file path.

Fixes #4225
Refs D763
Patch By: Vladislav
This was SVN commit r20075.
2017-08-29 23:53:23 +00:00
23118ba847 Split the Input GUI object key processing into two methods (methods changing the text and methods not changing it).
Patch By: Vladislav
Refs #4225, D763

Also use SDL_Keycode instead of int, remove an outdated history lookup
comment and some other unneeded comments.

This was SVN commit r20074.
2017-08-29 23:29:29 +00:00
74c420f658 GUI code cleanup. Fixes #3354.
Lots of code style fixes:
 * type [*&]varname -> type[*&] varname
 * else
   if (...)
   ->
   else if (...)
 * Spaces around some ops.
 * i++ -> ++i.
 * switch-case style fixes.
 * Indentation fixes.
 * Removing some commented out code.
 * include header sorting
 * Changed multiple pointer var declarations to be one per line.
 * Removed strange spaces in some places.
 * Changed some include header guards to be consistent with the rest of
the codebase.
 * Use UNUSED() instead of UNUSED2().

Some small code fixes:
 * Using .find() instead of .count() == 0.
 * !.empty() instead of .size() == 0.
 * Range-based for loops.
 * Making some member functions const by small changes.
   * Adds GetScrollBarPos(idx) const for this.
 * Using early returns/continues in some places.
 * Uses size_t for some loops in CList and COList.
 * Removes unused heading element (not attribute) from COList.
 * Use ENSURE in one case where some custom code did something similar.
 * Made some parameters const ptrs/refs.
 * Change removal loop in GUItext.cpp to erase-unique.
 * Made some static things const.
 * Allow iterating over children of IGUIObject with range-based for
loops by
   exposing begin() and end() (rename from ChildrenIt{Begin,End}()) and
use it.

Comments:
 * Comment COList.
 * Update a few comments.
 * Remove useless or duplicated comments.

This was SVN commit r16931.
2015-08-21 17:08:41 +00:00
53b335f5ae Improve auto-completition of nick names and add it to the in-game chat. Patch by trompetin17. Refs #1767.
This was SVN commit r16261.
2015-02-02 23:44:06 +00:00
9c4eb0295a Fixes some bugs related to IME text input in SDL2, including a possible crash, refs #2041. Behavior seems reasonably consistent now on Windows and OS X
This was SVN commit r15830.
2014-10-03 23:33:41 +00:00
5593f573f4 Cleans up handling of SDL2 text input events, no behavior change expected.
Implements SDL2 text editing handler for input fields, this is for IME
support, so users entering CJK text can see what they're composing
before committing it. Should have no effect on SDL1 or normal text
input.

This was SVN commit r15785.
2014-09-22 19:00:20 +00:00
a074eb814a Adds blinking cursors with configurable rate, based on patch by kingadami. Fixes #876
This was SVN commit r13068.
2013-01-12 01:20:01 +00:00
492e49da38 add support for selection and deletion of entire words in text controls (ctrl+backspace/delete/left/right) based on patch by Chakakhan/kenny (thanks!)
also refactored wclipboard
closes #511

This was SVN commit r9646.
2011-06-23 10:12:43 +00:00
67ca7461cd Adds Skip method to SGUIMessage which works more or less like wxEvent.Skip: GUI objects can allow other event handlers to process an input event after they finish.
Allows hotkey handling of mousewheel events after minimap. Fixes #673.
Adds SendEvent to GUI objects, used in place of separate calls to
HandleMessage and ScriptEvent.

This was SVN commit r9340.
2011-04-28 20:42:11 +00:00
d600a400fe Fix GUI text input box scrollbars not moving when the window is resized.
This was SVN commit r8932.
2011-02-18 22:49:24 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
bc24974496 # sweng
forward declare SDL_event. remove SDL dependency of network code.
refs #140

This was SVN commit r4252.
2006-08-26 21:52:18 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
32cfc6d807 minimap: now use GUI event system instead of polling. fixes broken click feature.
textureentry: add performance note
list, text: fix mousewheel direction
input: was going to add a deque to allow registering handlers in back
and front. obviated by minimap fix, though. cleaned up a bit and renamed
stuff (again, sigh).
loaderthunks: fixed weird alignment/padding warning

This was SVN commit r2979.
2005-10-20 15:27:39 +00:00
bed9363bfe lib/input.h was old+bad code. fixed in_add_handler return type to enum; renamed EV_PASS to IN_PASS; no longer include sdl.h from other code (instead rely on input.h)
This was SVN commit r2975.
2005-10-20 17:44:56 +00:00
Gee
4113aa0a36 GUI Update. Mostly with Input Control Beta :)
This was SVN commit r1904.
2005-02-05 07:25:16 +00:00
Gee
0adc8f6ca2 Unfinished Input box.
This was SVN commit r1394.
2004-11-24 23:39:52 +00:00
Gee
fd91563f42 Sorry! Totally forgot to add the CInput.cpp/h
This was SVN commit r1237.
2004-10-14 21:01:13 +00:00