2
0
Эх сурвалжийг харах

Merge pull request #565 from Lulu04/dev_rainmorereactive

Rain quantity more reactive
circular17 2 жил өмнө
parent
commit
eb57066778

+ 28 - 27
lazpaint/dialog/filter/uformrain.lfm

@@ -20,20 +20,20 @@ object FRain: TFRain
   OnHide = FormHide
   OnShow = FormShow
   Position = poMainFormCenter
-  LCLVersion = '1.6.0.4'
+  LCLVersion = '2.2.4.0'
   object Label_Wind: TLabel
     Left = 8
-    Height = 20
+    Height = 15
     Top = 8
-    Width = 124
+    Width = 130
     Caption = 'Wind :'
     ParentColor = False
   end
   object PaintBox_Wind: TPaintBox
     Left = 8
     Height = 105
-    Top = 36
-    Width = 124
+    Top = 31
+    Width = 130
     OnMouseDown = PaintBox_WindMouseDown
     OnMouseMove = PaintBox_WindMouseMove
     OnMouseUp = PaintBox_WindMouseUp
@@ -41,29 +41,30 @@ object FRain: TFRain
   end
   object Label_Quantity: TLabel
     Left = 8
-    Height = 20
-    Top = 149
-    Width = 124
+    Height = 15
+    Top = 144
+    Width = 130
     Caption = 'Quantity:'
     ParentColor = False
   end
   object Panel2: TPanel
     Left = 8
     Height = 25
-    Top = 177
-    Width = 124
+    Top = 167
+    Width = 130
     BevelOuter = bvNone
     ClientHeight = 25
-    ClientWidth = 124
+    ClientWidth = 130
     TabOrder = 1
     object TrackBar_Quantity: TTrackBar
       Left = 0
       Height = 25
       Top = 0
-      Width = 124
+      Width = 130
       Frequency = 100
       Max = 100
-      PageSize = 200
+      OnChange = TrackBar_QuantityChange
+      PageSize = 10
       Position = 0
       ScalePos = trRight
       Align = alClient
@@ -72,35 +73,35 @@ object FRain: TFRain
   end
   object Panel1: TPanel
     Left = 8
-    Height = 30
-    Top = 210
-    Width = 124
+    Height = 25
+    Top = 200
+    Width = 130
     BevelOuter = bvNone
     ChildSizing.HorizontalSpacing = 8
     ChildSizing.Layout = cclLeftToRightThenTopToBottom
     ChildSizing.ControlsPerLine = 2
-    ClientHeight = 30
-    ClientWidth = 124
+    ClientHeight = 25
+    ClientWidth = 130
     TabOrder = 0
     object Button_OK: TButton
       Left = 0
-      Height = 30
+      Height = 25
       Top = 0
-      Width = 46
+      Width = 51
       AutoSize = True
-      Caption = 'OK'
+      Caption = 'rsOK'
       Default = True
       OnClick = Button_OKClick
       TabOrder = 0
     end
     object Button_Cancel: TButton
-      Left = 54
-      Height = 30
+      Left = 59
+      Height = 25
       Top = 0
-      Width = 70
+      Width = 71
       AutoSize = True
       Cancel = True
-      Caption = 'Cancel'
+      Caption = 'rsCancel'
       ModalResult = 2
       TabOrder = 1
     end
@@ -109,7 +110,7 @@ object FRain: TFRain
     Enabled = False
     Interval = 100
     OnTimer = Timer1Timer
-    left = 96
-    top = 40
+    Left = 96
+    Top = 40
   end
 end

+ 2 - 2
lazpaint/dialog/filter/uformrain.lrj

@@ -2,6 +2,6 @@
 {"hash":362494,"name":"tfrain.caption","sourcebytes":[82,97,105,110],"value":"Rain"},
 {"hash":98584122,"name":"tfrain.label_wind.caption","sourcebytes":[87,105,110,100,32,58],"value":"Wind :"},
 {"hash":140202874,"name":"tfrain.label_quantity.caption","sourcebytes":[81,117,97,110,116,105,116,121,58],"value":"Quantity:"},
-{"hash":1339,"name":"tfrain.button_ok.caption","sourcebytes":[79,75],"value":"OK"},
-{"hash":77089212,"name":"tfrain.button_cancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}
+{"hash":497723,"name":"tfrain.button_ok.caption","sourcebytes":[114,115,79,75],"value":"rsOK"},
+{"hash":127421996,"name":"tfrain.button_cancel.caption","sourcebytes":[114,115,67,97,110,99,101,108],"value":"rsCancel"}
 ]}

+ 11 - 1
lazpaint/dialog/filter/uformrain.pas

@@ -37,6 +37,7 @@ type
       {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
     procedure PaintBox_WindPaint(Sender: TObject);
     procedure Timer1Timer(Sender: TObject);
+    procedure TrackBar_QuantityChange(Sender: TObject);
   private
     { private declarations }
     wind: single;
@@ -64,7 +65,7 @@ function ShowRainDlg(AFilterConnector: TObject): TScriptResult;
 
 implementation
 
-uses LCScaleDPI, umac, LazPaintType;
+uses LCScaleDPI, umac, LazPaintType, UResourceStrings;
 
 function ShowRainDlg(AFilterConnector: TObject): TScriptResult;
 var
@@ -128,6 +129,9 @@ begin
   PreviewNeeded;
   Left := FilterConnector.LazPaintInstance.MainFormBounds.Left;
   Timer1.Enabled := true;
+
+  Button_OK.Caption := rsOK;
+  Button_Cancel.Caption := rsCancel;
 end;
 
 procedure TFRain.PaintBox_WindMouseDown(Sender: TObject; Button: TMouseButton;
@@ -189,6 +193,12 @@ begin
   Timer1.Enabled:= true;
 end;
 
+procedure TFRain.TrackBar_QuantityChange(Sender: TObject);
+begin
+  FreeAndNil(FRenderer);
+  PreviewNeeded;
+end;
+
 function TFRain.GetRainRenderer: TRainRenderer;
 begin
   if FRenderer = nil then

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.ar.po

@@ -2450,16 +2450,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "نصف القطر :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "إلغاء"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "موافق"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr ""

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.bg.po

@@ -2438,16 +2438,6 @@ msgctxt "TFRADIALBLUR.LABEL_RADIUS.CAPTION"
 msgid "Radius :"
 msgstr "Радиус:"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Отказ"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "Добре"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Дъжд"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.cs.po

@@ -2299,16 +2299,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Poloměr :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Zrušit"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Déšť"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.de.po

@@ -2461,16 +2461,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Radius:"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Abbruch"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Regen"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.es.po

@@ -2443,16 +2443,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Radio:"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Cancelar"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "Aceptar"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Lluvia"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.fi.po

@@ -2443,16 +2443,6 @@ msgctxt "TFRADIALBLUR.LABEL_RADIUS.CAPTION"
 msgid "Radius :"
 msgstr "Säde :"
 
-#: tfrain.button_cancel.caption
-msgctxt "TFRAIN.BUTTON_CANCEL.CAPTION"
-msgid "Cancel"
-msgstr "Peru"
-
-#: tfrain.button_ok.caption
-msgctxt "TFRAIN.BUTTON_OK.CAPTION"
-msgid "OK"
-msgstr ""
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Sade"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.fr.po

@@ -2456,16 +2456,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Rayon :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Annuler"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Pluie"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.it.po

@@ -2439,16 +2439,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Raggio :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Cancella"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr ""
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Pioggia"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.ja.po

@@ -2448,16 +2448,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "半径:"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "キャンセル"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr ""

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.kab.po

@@ -2452,16 +2452,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Aqqar :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Sefsex"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "Ih"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Agfur"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.lv.po

@@ -2456,16 +2456,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Rādiuss:"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Atcelt"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "Labi"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Lietus"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.nl.po

@@ -2449,16 +2449,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Straal :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Annuleren"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Regen"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.pl.po

@@ -2461,16 +2461,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Promień:"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Anuluj"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Deszcz"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.pot

@@ -2288,16 +2288,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr ""
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr ""
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr ""
-
 #: tfrain.caption
 msgid "Rain"
 msgstr ""

+ 0 - 11
lazpaint/release/bin/i18n/lazpaint.pt_BR.po

@@ -2451,17 +2451,6 @@ msgctxt "TFRADIALBLUR.LABEL_RADIUS.CAPTION"
 msgid "Radius :"
 msgstr "Raio :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Cancelar"
-
-#: tfrain.button_ok.caption
-#, fuzzy
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Chuva"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.ru.po

@@ -2436,16 +2436,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Радиус:"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Отмена"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "ОК"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Дождь"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.sv.po

@@ -2453,16 +2453,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "Radie :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "Avbryt"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "OK"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "Regn"

+ 0 - 10
lazpaint/release/bin/i18n/lazpaint.zh_CN.po

@@ -2449,16 +2449,6 @@ msgctxt "tfradialblur.label_radius.caption"
 msgid "Radius :"
 msgstr "半径 :"
 
-#: tfrain.button_cancel.caption
-msgctxt "tfrain.button_cancel.caption"
-msgid "Cancel"
-msgstr "取消"
-
-#: tfrain.button_ok.caption
-msgctxt "tfrain.button_ok.caption"
-msgid "OK"
-msgstr "确定"
-
 #: tfrain.caption
 msgid "Rain"
 msgstr "雨"