layout tool batch edit improvement and tips
This commit is contained in:
1 parent
2d1a1573e1
commit
c08bb232cd
2 files changed
+50
-1
No files matched your search
@@ -2871,6 +2871,35 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bulkEditTip" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Please unfold the folder button before batch editing"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "请先展开 folder 控制夹按键"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "請先展開 folder 控制項夾按鍵"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "請先展開 folder 控制項夾按鍵"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Button label" : {
|
"Button label" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|||||||
+21
-1
@@ -2222,16 +2222,28 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func popBulkEditTip() {
|
||||||
|
AlertControllerUtil.showAlert(
|
||||||
|
in: self,
|
||||||
|
title: LocalizationHelper.localizedString(forKey: "Tips"),
|
||||||
|
message: "\n\(LocalizationHelper.localizedString(forKey: "bulkEditTip"))",
|
||||||
|
withCancel: false,
|
||||||
|
buttonTitle: LocalizationHelper.localizedString(forKey: "Got it!"),
|
||||||
|
countdown: 0,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@objc private func collectionHiddenChanged(_ sender: UISegmentedControl) {
|
@objc private func collectionHiddenChanged(_ sender: UISegmentedControl) {
|
||||||
if let selectedWidget {
|
if let selectedWidget {
|
||||||
OnScreenWidgetView.set(folded: sender.selectedSegmentIndex == 1, for: selectedWidget)
|
OnScreenWidgetView.set(folded: sender.selectedSegmentIndex == 1, for: selectedWidget)
|
||||||
|
if sender.selectedSegmentIndex == 1, bulkEditEnabled {
|
||||||
|
self.bulkEditButtonTapped(self.bulkEditButton)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.bulkEditButton.isEnabled = sender.selectedSegmentIndex == 0
|
self.bulkEditButton.isEnabled = sender.selectedSegmentIndex == 0
|
||||||
self.importFromOtherButton.isEnabled = sender.selectedSegmentIndex == 0
|
self.importFromOtherButton.isEnabled = sender.selectedSegmentIndex == 0
|
||||||
self.clearFolderButton.isEnabled = sender.selectedSegmentIndex == 0
|
self.clearFolderButton.isEnabled = sender.selectedSegmentIndex == 0
|
||||||
self.widgetAlphaSlider.isEnabled = sender.selectedSegmentIndex == 1
|
self.widgetAlphaSlider.isEnabled = sender.selectedSegmentIndex == 1
|
||||||
// self.placeHolderLabel1.isHidden = sender.selectedSegmentIndex == 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func bulkMoveChanged(_ sender: UISegmentedControl) {
|
@objc private func bulkMoveChanged(_ sender: UISegmentedControl) {
|
||||||
@@ -2414,6 +2426,11 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
|
|||||||
let point = touch.location(in: widgetPanelStack)
|
let point = touch.location(in: widgetPanelStack)
|
||||||
return widgetPanelStack.hitTest(point, with: nil) != nil
|
return widgetPanelStack.hitTest(point, with: nil) != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func bulkEditButtonTouched(_ touch: UITouch) -> Bool {
|
||||||
|
let point = touch.location(in: bulkEditButton)
|
||||||
|
return bulkEditButton.bounds.contains(point)
|
||||||
|
}
|
||||||
|
|
||||||
private func handleWidgetPanelMove(_ touch: UITouch) {
|
private func handleWidgetPanelMove(_ touch: UITouch) {
|
||||||
guard widgetPanelMovedByTouch else { return }
|
guard widgetPanelMovedByTouch else { return }
|
||||||
@@ -2441,6 +2458,9 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
|
|||||||
if widgetPanelTouched(touch), selectedWidget != nil {
|
if widgetPanelTouched(touch), selectedWidget != nil {
|
||||||
GenericUtils.handleWidgetPanelTip(in: self)
|
GenericUtils.handleWidgetPanelTip(in: self)
|
||||||
}
|
}
|
||||||
|
if bulkEditButtonTouched(touch), selectedWidget?.isFolder == true, selectedWidget?.folded == true {
|
||||||
|
self.popBulkEditTip()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for touch in touches {
|
for touch in touches {
|
||||||
var touchLocation = touch.location(in: view)
|
var touchLocation = touch.location(in: view)
|
||||||
|
|||||||
Reference in new issue
Block a user