- add keyboard bindings button to options
- hooked keyboard binding panel to button
- WIP bindings drawn in activity
- keyboard binding keys finally appear
- keyboard binding input widget
- reserved keys logic working
- removed debug logs
- pref saved on key release
- more reserved keys
- fixed memory bad alloc error
- modifier bindings
- scroll panel for bindings view
- added sdl id to bindings
- cache sdl scan id into prefs
- function ids are getting picked up
- more keyboard mappings
- more key bindings + reserved keys
- keyboard bindings working
- write keyboard bindings pref on load
- sync new functions to prefs
- final touches
- Keep those include trees flat (see 0179cefc)
- Fix tabs
- WIP - many to one binding
- WriteDefaultPrefs is now instance method
- model add, remove and save methods
- clear prefs before saving
- added method for checking binding conflict
- notify view on key combo change
- route binding notification to gameview
- view foundations for overhaul
- fixed memory issue + has conflicting key issue
- fixed prefs not being cleared before save
- override text input to do nothing
- fixed many complications due to duplicated hotkeys
- missing index on new model caused problems
- WIP - view adaptation
- WIP - add and remove button layout
- more patches
- fixed empty textboxes problem
- WIP - frontend overhaul
- fixed ordering issue
- binding removal - wip
- function store to hold no shortcut data
- reset to defaults button added
- add from no shortcut works
- error message on conflict
- better summary for PopBindingByFunctionId
- keyboard bindings hooked to gameview keypress
- do not return correcty function id if no shortcut
- flatten include trees
- remove debug comment
- spaces to tabs
That wrap_if_needed call would sometimes cause empty newlines
to appear under otherwise already well-wrapped blocks of text.
The idea is that whenever a new character is about to be appended,
the current line is checked for being too long with that character
included, and the character is only actually appended after the
wrapper makes sure that appending it won't overflow the line by
inserting a newline. This means that wrap_if_needed is only ever
called before pushing the current character to records, never
after, as was the case here.
The metrics of the rectangles comprising the selection background
were calculated based on the selected range and the unformatted
text, so these rectangles would be off when the formatted text
was different (i.e. had any formatting).
keys like 0-9, tab, enter, ctrl/shift/alt, ins, and del are still looking for keys instead of scan codes, just in case (but I expect them to be always equivalent anyway)
Also:
recreate the window when enabling resizable window, same workaround I applied to my mod for jacob1/The-Powder-Toy#24
recreate the window when toggling fullscreen, to work around some bugs where the window is sized incorrectly or the mouse position doesn't match where the cursor is
Don't capture mouse cursor when this is a debug build
don't recreate window every scale / fullscreen change
better renderer handling, input scaling no longer needed even if window resizing is enabled
load/save window position (replaces old windows code to do this)
calculate initial mouse position on startup because sdl no longer does this for us
mouse movement captured outside the window when mouse is down
fullscreen now focuses the window (there is a bug where you have to click once to get mouse input, though)
add linux icon, will need to be redone properly because it's offcentered with a black border (mask isn't present)
allow typing ~ into the console + some other fixes
Still currently in process, there are some issues:
Windows version doesn't work, mac version might not work, opengl might not work
Icon doesn't work (on Linux at least)
Lua will need some changes, there are some sdl 1.2 hacks in there
When entering fullscreen, the window loses focus
When holding down mouse out of bounds, mouse move events stop being sent
When letting go of mouse out of bounds, mouseup event doesn't take into account double scale mode
Clicking on startup without moving mouse will draw at 0,0 for a frame
Renderer probably won't compile because USE_SDL doesn't entirely work
... and maybe others
Some nice things were done though:
no more blit2, sdl can do the scaling itself
3d effect removed, no reason to support this joke any longer
No need to support copy/paste ourselves, sdl does it now
text handling done much better now, separate events for key presses and text input
when a new window is shown, all events ignored until next tick (ignore textinput event if window shown from key press event like console)
Apparently C++11 is more strict regarding default argument and return
value conversions. Also return brace-initializer construction has had
little support.