Opened 17 years ago

Closed 16 years ago

Last modified 6 years ago

#8711 closed patch (outdated)

backends lib patches

Reported by: SF/sbatyuk Owned by: sev-
Priority: normal Component: --Other--
Version: Keywords:
Cc: Game:

Description

This patch is dealing with the new key mapping architecture. I have added the buttons.h which similar to keyboard.h but also includes codes for mouse buttons. EventManager class has been modified, and the GenericEventManager was added to provide a base class for specific backend event managers' implementations.

Ticket imported from: #1752243. Ticket imported from: patches/816.

Attachments (16)

backends-lib.v1.patch (15.3 KB ) - added by SF/sbatyuk 17 years ago.
new key mapping architecture patch v1
backends-lib.v2.patch (92.8 KB ) - added by SF/sbatyuk 17 years ago.
common backend class patch v2
backends-lib.v3.patch (24.6 KB ) - added by SF/sbatyuk 17 years ago.
key to key mapping patch v3
backends-lib.v3.1.patch (25.8 KB ) - added by (none) 17 years ago.
bug fixes in patch v3
backends-lib.v3.2.patch (18.7 KB ) - added by SF/sbatyuk 17 years ago.
patch v3.1 architecture fix
backends-lib.v3.3.patch (19.0 KB ) - added by SF/sbatyuk 17 years ago.
v3.2 update: STL replaced with Common:: - debug.cpp in sky engine does not compile
backends-lib.v3.4.patch (20.5 KB ) - added by SF/sbatyuk 17 years ago.
v3.4 is the same as v3.3 except that it was created in the up to date trunk
backends-lib.v3.5.patch (23.8 KB ) - added by SF/sbatyuk 17 years ago.
final patch with key mapper and virtual keyboard API skeletons
backends-lib.v4.1.patch (58.5 KB ) - added by (none) 17 years ago.
key mapper dialog added
backends-lib.v4.2.patch (101.7 KB ) - added by SF/sbatyuk 17 years ago.
key mapper tab in edit game dialog
backends-lib.v5.1 (7.1 KB ) - added by SF/sbatyuk 17 years ago.
port specific tabs and disabling GUI elements patch
backends-lib.v5.2 (4.4 KB ) - added by SF/sbatyuk 17 years ago.
disabling GUI elements patch
backends-lib.v5.3 (3.4 KB ) - added by SF/sbatyuk 17 years ago.
port specific tabs patch
backends-lib.v5.4 (50.3 KB ) - added by SF/sbatyuk 17 years ago.
prefinal key mapper patch
backends-lib.v5.5 (16.5 KB ) - added by SF/sbatyuk 17 years ago.
drag and drop and VK stub patch
backends-lib.v5.6.patch (54.9 KB ) - added by SF/sbatyuk 17 years ago.
key mapper patch

Download all attachments as: .zip

Change History (44)

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v1.patch added

new key mapping architecture patch v1

comment:1 by sev-, 17 years ago

Owner: set to sev-

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v2.patch added

common backend class patch v2

comment:2 by SF/sbatyuk, 17 years ago

added common backend OSystem class File Added: backends-lib.v2.patch

comment:3 by SF/sbatyuk, 17 years ago

Summary: backends lib patch v1backends lib patches

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v3.patch added

key to key mapping patch v3

comment:4 by SF/sbatyuk, 17 years ago

v3 patch is a totally new patch for key mapping. It considers Max's comments regarding the key to key mapping, plus it introduces OSystem_Common, a base class for other OSystem classes. At the moment it provides support for key mapping and virtual keyboard. Their functionality goes into key-mapper.h/cpp and virtual-keyboard.h/cpp respectfully. File Added: backends-lib.v3.patch

comment:5 by SF/sbatyuk, 17 years ago

Note: v3 patch should applied upon a fresh trunk without the v1 and v2 patches

by (none), 17 years ago

Attachment: backends-lib.v3.1.patch added

bug fixes in patch v3

comment:6 by fingolfin, 17 years ago

Serhiy, did you also add patch v3.1, or where does that come from?

comment:7 by SF/sbatyuk, 17 years ago

Yes, I've also added patch v3.1. fixed the bug of substituting the EVENT_KEYUP with EVENT_KEYDOWN

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v3.2.patch added

patch v3.1 architecture fix

comment:8 by SF/sbatyuk, 17 years ago

- removed OSystem_Common in favour for a modularised approach - removed getAvailableKeys() in KeyMapper class - hooking up key mapper and virtual keyboard in default event manager

File Added: backends-lib.v3.2.patch

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v3.3.patch added

v3.2 update: STL replaced with Common:: - debug.cpp in sky engine does not compile

comment:9 by SF/sbatyuk, 17 years ago

Patch v3.2 update. STL replaced with Common:: but debug.cpp in sky engine does not compile File Added: backends-lib.v3.3.patch

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v3.4.patch added

v3.4 is the same as v3.3 except that it was created in the up to date trunk

comment:10 by SF/sbatyuk, 17 years ago

File Added: backends-lib.v3.4.patch

comment:11 by wjp, 17 years ago

The compile error in engines/sky/debug.cpp is caused by a #define T2 8192 in skydefs.h.

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v3.5.patch added

final patch with key mapper and virtual keyboard API skeletons

comment:12 by SF/sbatyuk, 17 years ago

File Added: backends-lib.v3.5.patch

by (none), 17 years ago

Attachment: backends-lib.v4.1.patch added

key mapper dialog added

comment:13 by SF/sbatyuk, 17 years ago

Patch v4.1 includes a basic key mapper dialog implementation. It has to be fixed though, so that once a key is mapped to a new one it (the old key) does not invoke the action.

comment:14 by SF/sbatyuk, 17 years ago

Patch v3.4 is the same as v3.3 except (has a compile error in sky/debug.cpp) that it was created with the newer trunk as of 2007-07-19 11:40. Patch v3.5 is a compilable version of v3.4 (fixed common/list.h)

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v4.2.patch added

key mapper tab in edit game dialog

comment:15 by SF/sbatyuk, 17 years ago

Patch v4.2 contains code refinements of v4.1 (resolved several kyra engine compilation errors due to missing includes, etc.). It also has implementation of action mappings save/load functionality, and GUI implementation of key mapper tab in edit game dialog with stubs for actual button functionality (modified themes: built-in classic, classic.ini, and modern.ini). File Added: backends-lib.v4.2.patch

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v5.1 added

port specific tabs and disabling GUI elements patch

comment:16 by SF/sbatyuk, 17 years ago

Patch v5.1 contains full implementations of port specific tabs and disabling GUI elements tasks over the current scummvm trunk. File Added: backends-lib.v5.1

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v5.2 added

disabling GUI elements patch

comment:17 by SF/sbatyuk, 17 years ago

Patch v5.2 is a part of v5.1 which contains only disabling GUI elements task. File Added: backends-lib.v5.2

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v5.3 added

port specific tabs patch

comment:18 by SF/sbatyuk, 17 years ago

Patch v5.3 is a part of v5.1 which contains only port specific tabs task. File Added: backends-lib.v5.3

comment:19 by sev-, 17 years ago

Patch 5.2 is ready for inclusion. I will commit it once you add description to Wiki. You should add example code there as well as typical usage patterns (disabling unneeded elements, adding port-specific tabs)

Patch 5.3. I don't see how do you handle loading values to GUI elements as well as storing them to ConfMan. I.e. there are no hooks for that. See EditGameDialog::open() and EditGameDialog::close() in gui/launcher.cpp. For your test code, please, add not just a button, but add a drop-down widget, a list, some text input fields and a checkbox. Also make another checkbox which will turn off some elements, i.e. see how our Edit Game dialog works with 'override default' checkboxes.

Additionally I want to have both game-specific and global tabs there which are port-specific. I.e. just add another hook which will put elements to game options.

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v5.4 added

prefinal key mapper patch

comment:20 by SF/sbatyuk, 17 years ago

Patch v5.3 contains a full key mapper implementation. It still a few minor fixes (like adding a couple of popup warnings. code formatting, etc.) File Added: backends-lib.v5.4

comment:21 by SF/sbatyuk, 17 years ago

Ups, in the last comment: Patch v5.3 contains a full key mapper implementation. It should have been: Patch v5.4 contains a full key mapper implementation.

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v5.5 added

drag and drop and VK stub patch

comment:22 by SF/sbatyuk, 17 years ago

Patch v5.5 contains a full drag and drop implementation and a stub implementation of virtual keyboard. Right now the VK is shown whenever you press 'k' on your keyboard. But this is used for testing purposes only. File Added: backends-lib.v5.5

by SF/sbatyuk, 17 years ago

Attachment: backends-lib.v5.6.patch added

key mapper patch

comment:23 by SF/sbatyuk, 17 years ago

Patch v5.6 contains a full key mapper implementation, fully tested, with all bugs fixed and improvements made (with regard to previous v5.4 patch). File Added: backends-lib.v5.6.patch

comment:24 by sev-, 17 years ago

A _brief_ inspection if the patch revealed one thing which has to be fixed. In common/gameactions.h there should NOT be any engine names. The goal is to avoid use of engine and game names, not rewrap them in another way.

Solution for this is this: let engine provide this string, save it as is. I.e. Engine uses something:

registerKeyMapper("sky"); specifyPerGameKeymap("indy3", keymap);

or something like that. And you store those string as is and associate them with your keymaps. Of course, to speedup use our StrMap class.

comment:25 by sev-, 17 years ago

Patch v5.2 has been committed to trunk. Some documentation has been emailed to -devel, and doxygen description was added.

comment:26 by sev-, 16 years ago

Resolution: outdated
Status: newclosed

comment:27 by sev-, 16 years ago

Now this work is out of date. Current student implemented both virtual keyboard and keymapper.

comment:28 by digitall, 6 years ago

Component: --Other--
Note: See TracTickets for help on using tickets.