OSDN Git Service

状態パネルを操作パネル化、前回設定のパネル番号を記憶するようにした。
authorMRSa <mrsa@myad.jp>
Mon, 9 Aug 2021 12:55:28 +0000 (21:55 +0900)
committerMRSa <mrsa@myad.jp>
Mon, 9 Aug 2021 12:55:28 +0000 (21:55 +0900)
app/src/main/java/jp/osdn/gokigen/gokigenassets/camera/console/ConsolePanelControl.kt
app/src/main/res/values-ja/arrays.xml
app/src/main/res/values/arrays.xml

index e627530..49ee2e2 100644 (file)
@@ -70,11 +70,19 @@ class ConsolePanelControl (private val context: AppCompatActivity, private val v
         private const val NOF_AREA_VERTICAL = 9.0f
         private const val RADIUS = 5.0f
         private const val showTouchedPosition = false
-
     }
 
     init
     {
+        try
+        {
+            currentCameraControlId = preference.getCameraOption1().toInt() - 1
+        }
+        catch (e: Exception)
+        {
+            e.printStackTrace()
+            currentCameraControlId = -1
+        }
         ScaleGestureDetectorCompat.setQuickScaleEnabled(scaleGestureDetector, true)
         gestureDetector.setIsLongpressEnabled(true)
     }
@@ -181,8 +189,9 @@ class ConsolePanelControl (private val context: AppCompatActivity, private val v
                 }
                 count++
             } while (count <= MAX_CONTROL_CAMERAS)
+            preference.getUpdater()?.setCameraOption1(currentCameraControlId.toString())
         }
-        catch (e : Exception)
+        catch (e: Exception)
         {
             e.printStackTrace()
         }
index 2dee1d6..952a330 100644 (file)
@@ -16,7 +16,7 @@
 
     <string-array name="connection_method">
         <item>未使用</item>
-        <item>状態パネル</item>
+        <item>操作パネル</item>
         <item>作例表示</item>
         <item>内蔵カメラ</item>
         <item>Ricoh GR / PENTAX</item>
index e67e39e..feb9f07 100644 (file)
@@ -16,7 +16,7 @@
 
     <string-array name="connection_method">
         <item>None</item>
-        <item>Status Panel</item>
+        <item>Console Panel</item>
         <item>Show Example</item>
         <item>Internal Camera</item>
         <item>Ricoh GR / PENTAX</item>