diff --git a/proj/vs2013/Common/Common.vcxproj b/proj/vs2013/Common/Common.vcxproj
index 8a5e5438..66df272a 100644
--- a/proj/vs2013/Common/Common.vcxproj
+++ b/proj/vs2013/Common/Common.vcxproj
@@ -192,6 +192,7 @@
+
@@ -200,8 +201,11 @@
+
+
+
@@ -267,17 +271,20 @@
+
-
+
+
+
diff --git a/proj/vs2013/Common/Common.vcxproj.filters b/proj/vs2013/Common/Common.vcxproj.filters
index f9e64762..9667b97e 100644
--- a/proj/vs2013/Common/Common.vcxproj.filters
+++ b/proj/vs2013/Common/Common.vcxproj.filters
@@ -731,6 +731,9 @@
FileIO\ResMgr
+
+ DialogXML
+
DialogXML\Widgets
@@ -746,12 +749,21 @@
DialogXML\Widgets
+
+ DialogXML\Widgets
+
+
+ DialogXML\Widgets
+
DialogXML\Widgets
DialogXML\Widgets
+
+ DialogXML\Widgets
+
DialogXML\Widgets
@@ -947,12 +959,21 @@
DialogXML\Widgets
+
+ DialogXML\Widgets
+
+
+ DialogXML\Widgets
+
DialogXML\Widgets
DialogXML\Widgets
+
+ DialogXML\Widgets
+
DialogXML\Widgets
@@ -968,15 +989,15 @@
DialogXML\Dialogs
-
- DialogXML\Dialogs
-
DialogXML\Dialogs
DialogXML\Dialogs
+
+ DialogXML
+
Tools
diff --git a/proj/vs2017/Common/Common.vcxproj b/proj/vs2017/Common/Common.vcxproj
index 265a9727..a94106f8 100644
--- a/proj/vs2017/Common/Common.vcxproj
+++ b/proj/vs2017/Common/Common.vcxproj
@@ -326,6 +326,7 @@
+
@@ -334,8 +335,11 @@
+
+
+
@@ -396,17 +400,20 @@
+
-
+
+
+
diff --git a/proj/vs2017/Common/Common.vcxproj.filters b/proj/vs2017/Common/Common.vcxproj.filters
index baacd966..18768489 100644
--- a/proj/vs2017/Common/Common.vcxproj.filters
+++ b/proj/vs2017/Common/Common.vcxproj.filters
@@ -721,6 +721,9 @@
+
+ DialogXML
+
DialogXML\Dialogs
@@ -745,12 +748,21 @@
DialogXML\Widgets
+
+ DialogXML\Widgets
+
DialogXML\Widgets
DialogXML\Widgets
+
+ DialogXML\Widgets
+
+
+ DialogXML\Widgets
+
DialogXML\Widgets
@@ -935,6 +947,9 @@
+
+ DialogXML
+
DialogXML\Dialogs
@@ -944,9 +959,6 @@
DialogXML\Dialogs
-
- DialogXML\Dialogs
-
DialogXML\Dialogs
@@ -962,12 +974,21 @@
DialogXML\Widgets
+
+ DialogXML\Widgets
+
DialogXML\Widgets
DialogXML\Widgets
+
+ DialogXML\Widgets
+
+
+ DialogXML\Widgets
+
DialogXML\Widgets
diff --git a/proj/xc11/BoE.xcodeproj/project.pbxproj b/proj/xc11/BoE.xcodeproj/project.pbxproj
index 29a7022d..5d38b0f8 100755
--- a/proj/xc11/BoE.xcodeproj/project.pbxproj
+++ b/proj/xc11/BoE.xcodeproj/project.pbxproj
@@ -236,6 +236,14 @@
E2513E9D245350180066C6B1 /* sfml-network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2513E91245343E30066C6B1 /* sfml-network.framework */; };
E2513E9E245350180066C6B1 /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2513E8F245343E30066C6B1 /* sfml-system.framework */; };
E2513E9F245350180066C6B1 /* sfml-window.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2513E90245343E30066C6B1 /* sfml-window.framework */; };
+ E26D458D26FCBBBF007984E6 /* led.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E26D458926FCBBBF007984E6 /* led.cpp */; };
+ E26D458E26FCBBBF007984E6 /* led.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E26D458A26FCBBBF007984E6 /* led.hpp */; };
+ E26D458F26FCBBBF007984E6 /* ledgroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E26D458B26FCBBBF007984E6 /* ledgroup.cpp */; };
+ E26D459026FCBBBF007984E6 /* ledgroup.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E26D458C26FCBBBF007984E6 /* ledgroup.hpp */; };
+ E26D459826FCBBCE007984E6 /* container.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E26D459626FCBBCE007984E6 /* container.hpp */; };
+ E26D459926FCBBCE007984E6 /* container.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E26D459726FCBBCE007984E6 /* container.cpp */; };
+ E26D45A126FCBBF4007984E6 /* keycodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E26D459F26FCBBF4007984E6 /* keycodes.cpp */; };
+ E26D45A226FCBBF4007984E6 /* keycodes.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E26D45A026FCBBF4007984E6 /* keycodes.hpp */; };
E2AE6DAF24CC876500792E44 /* libboost_filesystem-mt.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E2AE6DAE24CC876500792E44 /* libboost_filesystem-mt.dylib */; };
E2AE6DB024CC876500792E44 /* libboost_filesystem-mt.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E2AE6DAE24CC876500792E44 /* libboost_filesystem-mt.dylib */; };
E2AE6DB124CC876500792E44 /* libboost_filesystem-mt.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E2AE6DAE24CC876500792E44 /* libboost_filesystem-mt.dylib */; };
@@ -672,7 +680,6 @@
9185BDA61EA055180027C346 /* res_font.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = res_font.hpp; sourceTree = ""; };
9185BDA71EA055180027C346 /* res_sound.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = res_sound.hpp; sourceTree = ""; };
9185BDA81EA055180027C346 /* res_strings.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = res_strings.hpp; sourceTree = ""; };
- 918D59A718EA513900735B66 /* dialog.keys.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = dialog.keys.hpp; sourceTree = ""; };
919086DF1A65C8E30071F7A0 /* tinyprint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyprint.cpp; sourceTree = ""; };
919086E11A65D3250071F7A0 /* tinyprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyprint.h; sourceTree = ""; };
919145FB18E3A32F005CF3A4 /* boe.appleevents.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = boe.appleevents.mm; sourceTree = ""; };
@@ -843,6 +850,14 @@
E2513E90245343E30066C6B1 /* sfml-window.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "sfml-window.framework"; path = "/usr/local/SFML/Frameworks/sfml-window.framework"; sourceTree = ""; };
E2513E91245343E30066C6B1 /* sfml-network.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "sfml-network.framework"; path = "/usr/local/SFML/Frameworks/sfml-network.framework"; sourceTree = ""; };
E2513E92245343E40066C6B1 /* SFML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SFML.framework; path = /usr/local/SFML/Frameworks/SFML.framework; sourceTree = ""; };
+ E26D458926FCBBBF007984E6 /* led.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = led.cpp; sourceTree = ""; };
+ E26D458A26FCBBBF007984E6 /* led.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = led.hpp; sourceTree = ""; };
+ E26D458B26FCBBBF007984E6 /* ledgroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ledgroup.cpp; sourceTree = ""; };
+ E26D458C26FCBBBF007984E6 /* ledgroup.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ledgroup.hpp; sourceTree = ""; };
+ E26D459626FCBBCE007984E6 /* container.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = container.hpp; sourceTree = ""; };
+ E26D459726FCBBCE007984E6 /* container.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = container.cpp; sourceTree = ""; };
+ E26D459F26FCBBF4007984E6 /* keycodes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = keycodes.cpp; sourceTree = ""; };
+ E26D45A026FCBBF4007984E6 /* keycodes.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = keycodes.hpp; sourceTree = ""; };
E2AE6DAE24CC876500792E44 /* libboost_filesystem-mt.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libboost_filesystem-mt.dylib"; path = "/usr/local/Cellar/boost/1.72.0_3/lib/libboost_filesystem-mt.dylib"; sourceTree = ""; };
E2AE6DB324CC879300792E44 /* libboost_system-mt.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libboost_system-mt.dylib"; path = "/usr/local/Cellar/boost/1.72.0_3/lib/libboost_system-mt.dylib"; sourceTree = ""; };
E2DF0BFA2538C031000C7A1A /* texture.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = texture.hpp; sourceTree = ""; };
@@ -975,6 +990,8 @@
910BBA130FB8BE66001E34EA /* dialogxml */ = {
isa = PBXGroup;
children = (
+ E26D459F26FCBBF4007984E6 /* keycodes.cpp */,
+ E26D45A026FCBBF4007984E6 /* keycodes.hpp */,
910BBA140FB8BE7D001E34EA /* widgets */,
910BBA150FB8BE88001E34EA /* dialogs */,
);
@@ -987,8 +1004,14 @@
children = (
91A32BD10FDB797B00C4E957 /* basicbtns.cpp */,
910BBA890FB8EC57001E34EA /* button.cpp */,
+ E26D459726FCBBCE007984E6 /* container.cpp */,
+ E26D459626FCBBCE007984E6 /* container.hpp */,
910BBA3C0FB8DA8E001E34EA /* control.cpp */,
910BBAB50FB91A26001E34EA /* field.cpp */,
+ E26D458926FCBBBF007984E6 /* led.cpp */,
+ E26D458A26FCBBBF007984E6 /* led.hpp */,
+ E26D458B26FCBBBF007984E6 /* ledgroup.cpp */,
+ E26D458C26FCBBBF007984E6 /* ledgroup.hpp */,
910BBAB90FB91ADB001E34EA /* message.cpp */,
910BBAA90FB8F733001E34EA /* pict.cpp */,
9191460018E63D8E005CF3A4 /* scrollbar.cpp */,
@@ -1019,7 +1042,6 @@
91E128F21BC2077600C8BE1D /* 3choice.hpp */,
91E128F31BC2077700C8BE1D /* choicedlog.hpp */,
910BBA170FB8BECA001E34EA /* dialog.hpp */,
- 918D59A718EA513900735B66 /* dialog.keys.hpp */,
915AF9E91BC04171008AEF49 /* dlogevt.hpp */,
91E128F41BC2077700C8BE1D /* pictchoice.hpp */,
91E128F51BC2077700C8BE1D /* strchoice.hpp */,
@@ -1582,7 +1604,11 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ E26D458E26FCBBBF007984E6 /* led.hpp in Headers */,
+ E26D459026FCBBBF007984E6 /* ledgroup.hpp in Headers */,
+ E26D459826FCBBCE007984E6 /* container.hpp in Headers */,
91F3205123E65EA3009650AF /* framerate_limiter.hpp in Headers */,
+ E26D45A226FCBBF4007984E6 /* keycodes.hpp in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1951,6 +1977,7 @@
buildActionMask = 2147483647;
files = (
919CC24B1B37730300273FDA /* item.cpp in Sources */,
+ E26D459926FCBBCE007984E6 /* container.cpp in Sources */,
919CC24D1B37730E00273FDA /* location.cpp in Sources */,
919CC24E1B37731400273FDA /* monster.cpp in Sources */,
919CC24F1B37731800273FDA /* outdoors.cpp in Sources */,
@@ -1977,6 +2004,7 @@
919CC26D1B3773DB00273FDA /* message.cpp in Sources */,
919CC26E1B3773E000273FDA /* pict.cpp in Sources */,
919CC26F1B3773E700273FDA /* stack.cpp in Sources */,
+ E26D458F26FCBBBF007984E6 /* ledgroup.cpp in Sources */,
919CC2701B3773EC00273FDA /* scrollbar.cpp in Sources */,
919CC2711B3773F300273FDA /* cursors.mac.mm in Sources */,
919CC2721B3773F800273FDA /* fileio.cpp in Sources */,
@@ -2007,10 +2035,12 @@
91EC1F0423DDFF9D00271891 /* res_cursor.cpp in Sources */,
91EC1F0523DDFF9D00271891 /* res_font.cpp in Sources */,
91EC1F0623DDFF9D00271891 /* res_image.cpp in Sources */,
+ E26D45A126FCBBF4007984E6 /* keycodes.cpp in Sources */,
91EC1F0723DDFF9D00271891 /* res_sound.cpp in Sources */,
91EC1F0823DDFF9D00271891 /* res_strings.cpp in Sources */,
91F3205023E65EA3009650AF /* framerate_limiter.cpp in Sources */,
91FE0E3823F084B70084CA6B /* drawable_manager.cpp in Sources */,
+ E26D458D26FCBBBF007984E6 /* led.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/proj/xc4/BoE.xcodeproj/project.pbxproj b/proj/xc4/BoE.xcodeproj/project.pbxproj
index d2f7ee04..c15da78d 100755
--- a/proj/xc4/BoE.xcodeproj/project.pbxproj
+++ b/proj/xc4/BoE.xcodeproj/project.pbxproj
@@ -79,6 +79,14 @@
91279BB80F9D03B7007B0D52 /* boegraphics.icns in Resources */ = {isa = PBXBuildFile; fileRef = 91279BB50F9D03B7007B0D52 /* boegraphics.icns */; };
912DFE8F18E2872400B00D75 /* boe.menus.mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 912DFE8E18E2872300B00D75 /* boe.menus.mac.mm */; };
913D6C050FC57A8E00E12527 /* boeresources.icns in Resources */ = {isa = PBXBuildFile; fileRef = 913D6C040FC57A8E00E12527 /* boeresources.icns */; };
+ 9149924B25913E3F00B5BE97 /* container.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9149924525913E3F00B5BE97 /* container.cpp */; };
+ 9149924C25913E3F00B5BE97 /* container.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 9149924625913E3F00B5BE97 /* container.hpp */; };
+ 9149924D25913E3F00B5BE97 /* led.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9149924725913E3F00B5BE97 /* led.cpp */; };
+ 9149924E25913E3F00B5BE97 /* led.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 9149924825913E3F00B5BE97 /* led.hpp */; };
+ 9149924F25913E3F00B5BE97 /* ledgroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9149924925913E3F00B5BE97 /* ledgroup.cpp */; };
+ 9149925025913E3F00B5BE97 /* ledgroup.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 9149924A25913E3F00B5BE97 /* ledgroup.hpp */; };
+ 91499253259140FF00B5BE97 /* keycodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 91499251259140FF00B5BE97 /* keycodes.cpp */; };
+ 91499254259140FF00B5BE97 /* keycodes.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 91499252259140FF00B5BE97 /* keycodes.hpp */; };
914B2AA318E7E507007B6799 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 914B2AA118E7E500007B6799 /* Cocoa.framework */; };
914B2AA418E7E509007B6799 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 914B2AA118E7E500007B6799 /* Cocoa.framework */; };
914B2AA518E7E50A007B6799 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 914B2AA118E7E500007B6799 /* Cocoa.framework */; };
@@ -607,6 +615,14 @@
914698FD1A747BED00F20F5E /* creature.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = creature.hpp; sourceTree = ""; };
914698FE1A747C4500F20F5E /* creature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = creature.cpp; sourceTree = ""; };
914701A918F64A85008A6DC9 /* dialog.xsd */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = dialog.xsd; sourceTree = ""; };
+ 9149924525913E3F00B5BE97 /* container.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = container.cpp; sourceTree = ""; };
+ 9149924625913E3F00B5BE97 /* container.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = container.hpp; sourceTree = ""; };
+ 9149924725913E3F00B5BE97 /* led.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = led.cpp; sourceTree = ""; };
+ 9149924825913E3F00B5BE97 /* led.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = led.hpp; sourceTree = ""; };
+ 9149924925913E3F00B5BE97 /* ledgroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ledgroup.cpp; sourceTree = ""; };
+ 9149924A25913E3F00B5BE97 /* ledgroup.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = ledgroup.hpp; sourceTree = ""; };
+ 91499251259140FF00B5BE97 /* keycodes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = keycodes.cpp; sourceTree = ""; };
+ 91499252259140FF00B5BE97 /* keycodes.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = keycodes.hpp; sourceTree = ""; };
914B2AA118E7E500007B6799 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
914B2AA218E7E500007B6799 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; };
914B2BB518E892AA007B6799 /* dialog-converting.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "dialog-converting.txt"; sourceTree = ""; };
@@ -660,7 +676,6 @@
9185BDA61EA055180027C346 /* res_font.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = res_font.hpp; sourceTree = ""; };
9185BDA71EA055180027C346 /* res_sound.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = res_sound.hpp; sourceTree = ""; };
9185BDA81EA055180027C346 /* res_strings.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = res_strings.hpp; sourceTree = ""; };
- 918D59A718EA513900735B66 /* dialog.keys.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = dialog.keys.hpp; sourceTree = ""; };
919086DF1A65C8E30071F7A0 /* tinyprint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyprint.cpp; sourceTree = ""; };
919086E11A65D3250071F7A0 /* tinyprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyprint.h; sourceTree = ""; };
919145FB18E3A32F005CF3A4 /* boe.appleevents.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = boe.appleevents.mm; sourceTree = ""; };
@@ -956,6 +971,8 @@
910BBA130FB8BE66001E34EA /* dialogxml */ = {
isa = PBXGroup;
children = (
+ 91499251259140FF00B5BE97 /* keycodes.cpp */,
+ 91499252259140FF00B5BE97 /* keycodes.hpp */,
910BBA140FB8BE7D001E34EA /* widgets */,
910BBA150FB8BE88001E34EA /* dialogs */,
);
@@ -968,16 +985,22 @@
children = (
91A32BD10FDB797B00C4E957 /* basicbtns.cpp */,
910BBA890FB8EC57001E34EA /* button.cpp */,
+ 9149924525913E3F00B5BE97 /* container.cpp */,
910BBA3C0FB8DA8E001E34EA /* control.cpp */,
910BBAB50FB91A26001E34EA /* field.cpp */,
+ 9149924725913E3F00B5BE97 /* led.cpp */,
+ 9149924925913E3F00B5BE97 /* ledgroup.cpp */,
910BBAB90FB91ADB001E34EA /* message.cpp */,
910BBAA90FB8F733001E34EA /* pict.cpp */,
9191460018E63D8E005CF3A4 /* scrollbar.cpp */,
919B13A81BBE2B54009905A4 /* scrollpane.cpp */,
9179A4641A48681800FEF872 /* stack.cpp */,
910BBA880FB8EC57001E34EA /* button.hpp */,
+ 9149924625913E3F00B5BE97 /* container.hpp */,
910BBA3B0FB8DA8E001E34EA /* control.hpp */,
910BBAB40FB91A26001E34EA /* field.hpp */,
+ 9149924825913E3F00B5BE97 /* led.hpp */,
+ 9149924A25913E3F00B5BE97 /* ledgroup.hpp */,
910BBAB80FB91ADB001E34EA /* message.hpp */,
910BBAA80FB8F733001E34EA /* pict.hpp */,
913FB40A1A5C90840067B9D2 /* pictypes.hpp */,
@@ -1000,7 +1023,6 @@
91E128F21BC2077600C8BE1D /* 3choice.hpp */,
91E128F31BC2077700C8BE1D /* choicedlog.hpp */,
910BBA170FB8BECA001E34EA /* dialog.hpp */,
- 918D59A718EA513900735B66 /* dialog.keys.hpp */,
915AF9E91BC04171008AEF49 /* dlogevt.hpp */,
91E128F41BC2077700C8BE1D /* pictchoice.hpp */,
91E128F51BC2077700C8BE1D /* strchoice.hpp */,
@@ -1561,6 +1583,10 @@
buildActionMask = 2147483647;
files = (
91F3205123E65EA3009650AF /* framerate_limiter.hpp in Headers */,
+ 9149924C25913E3F00B5BE97 /* container.hpp in Headers */,
+ 9149924E25913E3F00B5BE97 /* led.hpp in Headers */,
+ 9149925025913E3F00B5BE97 /* ledgroup.hpp in Headers */,
+ 91499254259140FF00B5BE97 /* keycodes.hpp in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1963,6 +1989,10 @@
91EC1F0823DDFF9D00271891 /* res_strings.cpp in Sources */,
91F3205023E65EA3009650AF /* framerate_limiter.cpp in Sources */,
91FE0E3823F084B70084CA6B /* drawable_manager.cpp in Sources */,
+ 9149924B25913E3F00B5BE97 /* container.cpp in Sources */,
+ 9149924D25913E3F00B5BE97 /* led.cpp in Sources */,
+ 9149924F25913E3F00B5BE97 /* ledgroup.cpp in Sources */,
+ 91499253259140FF00B5BE97 /* keycodes.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/src/dialogxml/SConscript b/src/dialogxml/SConscript
index bd933853..7ef3c7c4 100644
--- a/src/dialogxml/SConscript
+++ b/src/dialogxml/SConscript
@@ -4,6 +4,6 @@ Import("env")
env = env.Clone()
if 'msvc' not in env["TOOLS"]:
env.Append(CXXFLAGS="-fpermissive")
-dlog_util = env.StaticLibrary("#build/lib/dlogutil", Glob("dialogs/*.cpp") + Glob("widgets/*.cpp") + Glob("../fileio/xml-parser/*.cpp"))
+dlog_util = env.StaticLibrary("#build/lib/dlogutil", Glob("*.cpp") + Glob("dialogs/*.cpp") + Glob("widgets/*.cpp") + Glob("../fileio/xml-parser/*.cpp"))
Return("dlog_util")
diff --git a/src/dialogxml/dialogs/3choice.hpp b/src/dialogxml/dialogs/3choice.hpp
index e0191744..75d2e4fc 100644
--- a/src/dialogxml/dialogs/3choice.hpp
+++ b/src/dialogxml/dialogs/3choice.hpp
@@ -14,7 +14,7 @@
#include
#include
-#include "dialog.keys.hpp"
+#include "keycodes.hpp"
#include "choicedlog.hpp"
#include "button.hpp"
#include "pictypes.hpp"
diff --git a/src/dialogxml/dialogs/dialog.cpp b/src/dialogxml/dialogs/dialog.cpp
index 9a01f253..a980c493 100644
--- a/src/dialogxml/dialogs/dialog.cpp
+++ b/src/dialogxml/dialogs/dialog.cpp
@@ -14,6 +14,7 @@
#include "pict.hpp"
#include "button.hpp"
#include "field.hpp"
+#include "ledgroup.hpp"
#include "message.hpp"
#include "scrollbar.hpp"
#include "scrollpane.hpp"
@@ -418,42 +419,6 @@ void cDialog::loadFromFile(std::string path){
}
}
-// TODO: Move to a dedicated container.cpp?
-bool cContainer::parseChildControl(ticpp::Element& elem, std::map& controls, std::string& id) {
- std::string tag = elem.Value();
- if(tag == "field") {
- auto field = parent->parse(elem);
- controls.insert(field);
- parent->tabOrder.push_back(field);
- id = field.first;
- } else if(tag == "text") {
- auto text = parent->parse(elem);
- controls.insert(text);
- id = text.first;
- } else if(tag == "pict") {
- auto pict = parent->parse(elem);
- controls.insert(pict);
- id = pict.first;
- } else if(tag == "slider") {
- auto slide = parent->parse(elem);
- controls.insert(slide);
- id = slide.first;
- } else if(tag == "button") {
- auto button = parent->parse(elem);
- controls.insert(button);
- id = button.first;
- } else if(tag == "led") {
- auto led = parent->parse(elem);
- controls.insert(led);
- id = led.first;
- } else if(tag == "group") {
- auto group = parent->parse(elem);
- controls.insert(group);
- id = group.first;
- } else return false;
- return true;
-}
-
void cDialog::recalcRect(){
bool haveRel = false;
for(ctrlIter iter = controls.begin(); iter != controls.end(); iter++) {
diff --git a/src/dialogxml/dialogs/dialog.hpp b/src/dialogxml/dialogs/dialog.hpp
index af6cc62f..85480c76 100644
--- a/src/dialogxml/dialogs/dialog.hpp
+++ b/src/dialogxml/dialogs/dialog.hpp
@@ -21,7 +21,7 @@
#include
#include "ticpp.h"
-#include "dialog.keys.hpp"
+#include "keycodes.hpp"
#include "dlogevt.hpp"
#include "location.hpp"
#include
@@ -321,4 +321,13 @@ public:
const char* what() const throw();
};
+//// This needs cControl to be complete.
+///// @note You need to include control.hpp to use this.
+//template void cDialog::attachEventHandlers(typename event_fcn::type handler, const std::vector& controls) {
+// cDialog& me = *this;
+// for(std::string control : controls) {
+// me[control].attachEventHandler(handler);
+// }
+//}
+
#endif
diff --git a/src/dialogxml/dialogs/dlogevt.hpp b/src/dialogxml/dialogs/dlogevt.hpp
index c991bc93..dc56f22f 100644
--- a/src/dialogxml/dialogs/dlogevt.hpp
+++ b/src/dialogxml/dialogs/dlogevt.hpp
@@ -12,7 +12,7 @@
#include
#include
#include
-#include "dialog.keys.hpp"
+#include "keycodes.hpp"
/// Represents an event that can occur in a dialog.
enum eDlogEvt {
diff --git a/src/dialogxml/dialogs/pictchoice.hpp b/src/dialogxml/dialogs/pictchoice.hpp
index e9567cd8..8c0a0566 100644
--- a/src/dialogxml/dialogs/pictchoice.hpp
+++ b/src/dialogxml/dialogs/pictchoice.hpp
@@ -14,7 +14,7 @@
#include
#include "dialog.hpp"
-#include "button.hpp"
+#include "ledgroup.hpp"
#include "pictypes.hpp"
/// A dialog that presents a list of icons with LEDs and allows you to choose one.
diff --git a/src/dialogxml/dialogs/strchoice.hpp b/src/dialogxml/dialogs/strchoice.hpp
index 143d8e62..cd9102f2 100644
--- a/src/dialogxml/dialogs/strchoice.hpp
+++ b/src/dialogxml/dialogs/strchoice.hpp
@@ -13,7 +13,7 @@
#include
#include
#include "dialog.hpp"
-#include "button.hpp"
+#include "ledgroup.hpp"
/// A dialog that presents a list of strings with LEDs and allows you to choose one.
/// The list may span several pages.
diff --git a/src/dialogxml/keycodes.cpp b/src/dialogxml/keycodes.cpp
new file mode 100644
index 00000000..df3578de
--- /dev/null
+++ b/src/dialogxml/keycodes.cpp
@@ -0,0 +1,116 @@
+/*
+ * control.cpp
+ * BoE
+ *
+ * Created by Celtic Minstrel on 11/05/09.
+ *
+ */
+
+#include "keycodes.hpp"
+//#include
+//#include "dialog.hpp"
+//#include "sounds.hpp"
+//#include "button.hpp"
+//#include "render_shapes.hpp"
+//#include "res_image.hpp"
+//#include "mathutil.hpp"
+//#include "prefs.hpp"
+//#include "cursors.hpp"
+
+eKeyMod operator + (eKeyMod lhs, eKeyMod rhs){
+ if(lhs == rhs) return lhs;
+ else if(lhs == mod_none) return rhs;
+ else if(lhs == mod_alt){
+ if(rhs == mod_shift || rhs == mod_altshift) return mod_altshift;
+ else if(rhs == mod_ctrl || rhs == mod_altctrl) return mod_altctrl;
+ else if(rhs == mod_shiftctrl || rhs == mod_all) return mod_all;
+ else return mod_alt;
+ }else if(lhs == mod_shift){
+ if(rhs == mod_alt || rhs == mod_altshift) return mod_altshift;
+ else if(rhs == mod_ctrl || rhs == mod_shiftctrl) return mod_shiftctrl;
+ else if(rhs == mod_altctrl || rhs == mod_all) return mod_all;
+ else return mod_shift;
+ }else if(lhs == mod_ctrl){
+ if(rhs == mod_alt || rhs == mod_altctrl) return mod_altctrl;
+ else if(rhs == mod_shift || rhs == mod_shiftctrl) return mod_shiftctrl;
+ else if(rhs == mod_altshift || rhs == mod_all) return mod_all;
+ else return mod_ctrl;
+ }else return rhs + lhs;
+}
+
+eKeyMod operator - (eKeyMod lhs, eKeyMod rhs){
+ if(lhs == rhs || lhs == mod_none || rhs == mod_all) return mod_none;
+ else if(rhs == mod_none) return lhs;
+ else if(lhs == mod_all){
+ if(rhs == mod_alt) return mod_shiftctrl;
+ else if(rhs == mod_shift) return mod_altctrl;
+ else if(rhs == mod_ctrl) return mod_altshift;
+ else if(rhs == mod_altshift) return mod_ctrl;
+ else if(rhs == mod_altctrl) return mod_shift;
+ else if(rhs == mod_shiftctrl) return mod_alt;
+ else return mod_all;
+ }else if(lhs == mod_shiftctrl){
+ if(rhs == mod_shift || rhs == mod_altshift) return mod_ctrl;
+ else if(rhs == mod_ctrl || rhs == mod_altctrl) return mod_shift;
+ else return mod_shiftctrl;
+ }else if(lhs == mod_altctrl){
+ if(rhs == mod_alt || rhs == mod_altshift) return mod_ctrl;
+ else if(rhs == mod_ctrl || rhs == mod_shiftctrl) return mod_alt;
+ else return mod_altctrl;
+ }else if(lhs == mod_altshift){
+ if(rhs == mod_alt || rhs == mod_altctrl) return mod_shift;
+ else if(rhs == mod_shift || rhs == mod_shiftctrl) return mod_alt;
+ else return mod_altshift;
+ }else if(lhs == mod_alt && (rhs == mod_altshift || rhs == mod_altctrl))
+ return mod_none;
+ else if(lhs == mod_shift && (rhs == mod_altshift || rhs == mod_shiftctrl))
+ return mod_none;
+ else if(lhs == mod_ctrl && (rhs == mod_altctrl || rhs == mod_shiftctrl))
+ return mod_none;
+ else return lhs;
+}
+
+eKeyMod& operator += (eKeyMod&lhs, eKeyMod rhs){
+ lhs = lhs + rhs;
+ return lhs;
+}
+
+eKeyMod& operator -= (eKeyMod&lhs, eKeyMod rhs){
+ lhs = lhs - rhs;
+ return lhs;
+}
+
+bool operator== (cKey a, cKey b){
+ if(a.spec != b.spec) return false;
+ if(a.mod != b.mod) return false;
+ return a.spec ? a.k == b.k : (a.c == 0 ? false : a.c == b.c);
+}
+
+bool mod_contains(eKeyMod mods, eKeyMod mod) {
+ if((mods & mod) != 0) return true;
+ return false;
+}
+
+unsigned char applyShift(unsigned char c){
+ static const char afterShift[] = {
+ ' ', '!', '"', '#', '$', '%', '&', '"', '(', ')', '*', '+', '<', '_', '>', '?',
+ ')', '!', '@', '#', '$', '%', '^', '&', '*', '(', ':', ':', '<', '+', '>', '?',
+ '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '^', '_',
+ '~', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~',
+ };
+ return afterShift[c - ' '];
+}
+
+unsigned char removeShift(unsigned char c){
+ static const char afterUnShift[] = {
+ ' ', '1', '\'','3', '4', '5', '7', '\'','9', '0', '8', '=', ',', '-', '.', '/',
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ';', ';', ',', '=', '.', '/',
+ '2', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\\',']', '6', '-',
+ '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\\',']', '`',
+ };
+ return afterUnShift[c - ' '];
+}
diff --git a/src/dialogxml/dialogs/dialog.keys.hpp b/src/dialogxml/keycodes.hpp
similarity index 100%
rename from src/dialogxml/dialogs/dialog.keys.hpp
rename to src/dialogxml/keycodes.hpp
diff --git a/src/dialogxml/widgets/button.cpp b/src/dialogxml/widgets/button.cpp
index c345d71a..d97399e6 100644
--- a/src/dialogxml/widgets/button.cpp
+++ b/src/dialogxml/widgets/button.cpp
@@ -8,16 +8,10 @@
*/
#include "button.hpp"
-#include
-#include