/*!
* This file is part of CameraPlus.
*
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
"icon-m-camera-video-night-selected", "icon-m-camera-video-night"]
];
+var __flash = [
+ [Flash.Auto,"icon-m-camera-flash-auto-selected", "icon-m-camera-flash-auto"],
+ [Flash.On, "icon-m-camera-flash-always-selected", "icon-m-camera-flash-always"],
+ [Flash.Off, "icon-m-camera-flash-off-selected", "icon-m-camera-flash-off"],
+ [Flash.RedEye, "icon-m-camera-flash-red-eye-selected", "icon-m-camera-flash-red-eye"]
+];
+
+// ISO
var __iso = [
[0, "icon-m-camera-iso-auto"],
[100, "icon-m-camera-iso-100"],
[800, "icon-m-camera-iso-800"]
];
+// Image resolutions
var __image = [
["3:2", "low", "icon-m-camera-resolution-3m"],
["3:2", "medium", "icon-m-camera-resolution-6m"],
["16:9", "high", "icon-m-camera-resolution-7m"]
];
+// Video resolutions
var __video = [
["low", "icon-m-camera-video-low-resolution"],
["medium", "icon-m-camera-video-fine-resolution"],
}
function isoIcon(value) {
- var x = 0;
- var len = __iso.length;
- for (x = 0; x < len; x++) {
- if (__iso[x][0] == value) {
- return __iso[x][1];
- }
- }
-
- return "";
+ return filterData(value, __iso, 1);
}
function imageIcon(aspect, res) {
function videoIcon(res) {
return filterData(res, __video, 1);
}
+
+function flashIcon(val) {
+ return filterData(val, __flash, 2);
+}
+
+function flashPressedIcon(val) {
+ return filterData(val, __flash, 1);
+}