[Scummvm-cvs-logs] SF.net SVN: scummvm:[40404] scummvm/trunk
sev at users.sourceforge.net
sev at users.sourceforge.net
Sun May 10 00:36:57 CEST 2009
Revision: 40404
http://scummvm.svn.sourceforge.net/scummvm/?rev=40404&view=rev
Author: sev
Date: 2009-05-09 22:36:57 +0000 (Sat, 09 May 2009)
Log Message:
-----------
Original GSoC'08 keymapper now works.
Plans:
- Make remap dialog less ugly
- Port dialog to other resolutions and classic theme
- Stop polluting config namespaces with keymap
- Improve automapper
- Add support to the engines and backends
Modified Paths:
--------------
scummvm/trunk/backends/keymapper/remap-dialog.cpp
scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx
Modified: scummvm/trunk/backends/keymapper/remap-dialog.cpp
===================================================================
--- scummvm/trunk/backends/keymapper/remap-dialog.cpp 2009-05-09 22:25:28 UTC (rev 40403)
+++ scummvm/trunk/backends/keymapper/remap-dialog.cpp 2009-05-09 22:36:57 UTC (rev 40404)
@@ -80,6 +80,8 @@
keymapCount += _gameKeymaps->size();
}
+ debug(3, "keymaps: %d", keymapCount);
+
_keymapTable = (Keymap **)malloc(sizeof(Keymap*) * keymapCount);
Keymapper::Domain::iterator it;
@@ -125,14 +127,15 @@
int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
int scrollbarWidth = g_gui.xmlEval()->getVar("Globals.Scrollbar.Width", 0);
- int areaX = g_gui.xmlEval()->getVar("KeyRemapper.KeymapArea.x");
- int areaY = g_gui.xmlEval()->getVar("KeyRemapper.KeymapArea.y");
- int areaW = g_gui.xmlEval()->getVar("KeyRemapper.KeymapArea.w");
- int areaH = g_gui.xmlEval()->getVar("KeyRemapper.KeymapArea.h");
- int spacing = 10; //g_gui.xmlEval()->getVar("remap_spacing");
- int labelWidth = 100; //g_gui.xmlEval()->getVar("remap_label_width");
- int buttonWidth = 80; //g_gui.xmlEval()->getVar("remap_button_width");
+ int16 areaX, areaY;
+ uint16 areaW, areaH;
+ int spacing = g_gui.xmlEval()->getVar("Globals.KeyRemapper.Spacing");
+ int labelWidth = g_gui.xmlEval()->getVar("Globals.KeyRemapper.LabelWidth");
+ int buttonWidth = g_gui.xmlEval()->getVar("Globals.KeyRemapper.ButtonWidth");
int colWidth = labelWidth + buttonWidth + spacing;
+
+ g_gui.xmlEval()->getWidgetData((const String&)String("KeyRemapper.KeymapArea"), areaX, areaY, areaW, areaH);
+
_colCount = (areaW - scrollbarWidth) / colWidth;
_rowCount = (areaH + spacing) / (buttonHeight + spacing);
if (_colCount <= 0 || _rowCount <= 0)
Modified: scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx
===================================================================
--- scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx 2009-05-09 22:25:28 UTC (rev 40403)
+++ scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx 2009-05-09 22:36:57 UTC (rev 40404)
@@ -45,6 +45,10 @@
<def var = 'ScummSaveLoad.ExtInfo.Visible' value = '1'/>
+ <def var = 'KeyRemapper.Spacing' value = '10'/>
+ <def var = 'KeyRemapper.LabelWidth' value = '100'/>
+ <def var = 'KeyRemapper.ButtonWidth' value = '80'/>
+
<widget name = 'OptionsLabel'
size = '110, Globals.Line.Height'
/>
@@ -712,8 +716,11 @@
<layout type = 'vertical' padding = '8, 8, 32, 8' center = 'true'>
<widget name = 'Popup'
type = 'PopUp'
+ width = '600'
/>
- <widget name = 'KeymapArea'
+ <widget name = 'KeymapArea'
+ width = '600'
+ height = '378'
/>
<widget name = 'Close'
type = 'Button'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list