Commit 84ecb7380151c05922da910fdd6146e4199b41ee

Authored by Carlos Picanco
1 parent 183cd075
Exists in master

improve popup customization

experiment_designer/form_main.lfm
1 1 object FormDesigner: TFormDesigner
2   - Left = 291
3   - Height = 635
4   - Top = 44
5   - Width = 656
6   - HorzScrollBar.Page = 315
7   - VertScrollBar.Page = 615
  2 + Left = 127
  3 + Height = 712
  4 + Top = 29
  5 + Width = 674
  6 + HorzScrollBar.Page = 387
  7 + VertScrollBar.Page = 693
8 8 AutoScroll = True
9 9 Caption = 'Planejar Experimento'
10   - ClientHeight = 615
11   - ClientWidth = 639
  10 + ClientHeight = 693
  11 + ClientWidth = 664
12 12 Menu = MainMenu1
13 13 OnActivate = FormActivate
14 14 OnCreate = FormCreate
15 15 OnDestroy = FormDestroy
16   - SessionProperties = 'Caption;ComboCurrentCondition.ItemIndex;ComboCurrentCondition.Items;ComboCurrentCondition.Text;ComboCurrentContingency.ItemIndex;ComboCurrentContingency.Items;ComboCurrentContingency.Text;Height;LabelIf.Caption;Left;PageControl.TabIndex;Top;Width;WindowState;RGContingencyType.ItemIndex'
  16 + SessionProperties = 'Caption;ComboCurrentCondition.ItemIndex;ComboCurrentCondition.Items;ComboCurrentCondition.Text;ComboCurrentContingency.ItemIndex;ComboCurrentContingency.Items;ComboCurrentContingency.Text;Height;LabelIf.Caption;Left;PageControl.TabIndex;RGContingencyType.ItemIndex;Top;Width;WindowState;LabelCsq3.Caption'
17 17 ShowHint = True
18 18 LCLVersion = '1.6.2.0'
19 19 object PageControl: TPageControl
20 20 Left = 0
21   - Height = 726
  21 + Height = 825
22 22 Top = 0
23   - Width = 639
24   - ActivePage = TabSheetExperiment
  23 + Width = 664
  24 + ActivePage = TabSheetContingencies
25 25 Align = alClient
26 26 TabIndex = 2
27 27 TabOrder = 0
... ... @@ -32,54 +32,54 @@ object FormDesigner: TFormDesigner
32 32 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
33 33 ChildSizing.Layout = cclLeftToRightThenTopToBottom
34 34 ChildSizing.ControlsPerLine = 1
35   - ClientHeight = 698
36   - ClientWidth = 631
  35 + ClientHeight = 792
  36 + ClientWidth = 658
37 37 object LabelResearcherName: TLabel
38 38 Left = 0
39 39 Height = 15
40 40 Top = 10
41   - Width = 631
  41 + Width = 640
42 42 Caption = 'Nome do Pesquisador'
43 43 ParentColor = False
44 44 end
45 45 object EditResearcherName: TEdit
46 46 Left = 0
47   - Height = 23
  47 + Height = 25
48 48 Hint = 'Uma pasta será criada com o seu nome. Os seus experimentos serão salvos dentro dela.'
49 49 Top = 30
50   - Width = 631
  50 + Width = 640
51 51 TabOrder = 0
52 52 end
53 53 object LabelExperimentName: TLabel
54 54 Left = 0
55 55 Height = 15
56   - Top = 58
57   - Width = 631
  56 + Top = 60
  57 + Width = 640
58 58 Caption = 'Nome do Experimento'
59 59 ParentColor = False
60 60 end
61 61 object EditExperimentName: TEdit
62 62 Left = 0
63   - Height = 23
  63 + Height = 25
64 64 Hint = 'Uma pasta será criada com o nome do experimento. Os dados desse experimento serão salvos dentro dela.'
65   - Top = 78
66   - Width = 631
  65 + Top = 80
  66 + Width = 640
67 67 TabOrder = 1
68 68 end
69 69 object GBExperimentAim: TGroupBox
70 70 Left = 0
71   - Height = 162
72   - Top = 106
73   - Width = 631
  71 + Height = 159
  72 + Top = 110
  73 + Width = 640
74 74 Caption = 'Objetivo do Experimento'
75 75 ClientHeight = 142
76   - ClientWidth = 627
  76 + ClientWidth = 636
77 77 TabOrder = 2
78 78 object MemoExperimentAim: TMemo
79 79 Left = 0
80 80 Height = 142
81 81 Top = 0
82   - Width = 627
  82 + Width = 636
83 83 Align = alCustom
84 84 Anchors = [akTop, akLeft, akRight]
85 85 TabOrder = 0
... ... @@ -87,10 +87,10 @@ object FormDesigner: TFormDesigner
87 87 end
88 88 object CGGlobal: TCheckGroup
89 89 Left = 0
90   - Height = 108
  90 + Height = 113
91 91 Hint = 'Aplicáveis ao longo de todo o experimento'
92   - Top = 273
93   - Width = 631
  92 + Top = 274
  93 + Width = 640
94 94 AutoFill = True
95 95 Caption = 'Configurações globais'
96 96 ChildSizing.LeftRightSpacing = 6
... ... @@ -101,8 +101,8 @@ object FormDesigner: TFormDesigner
101 101 ChildSizing.ShrinkVertical = crsScaleChilds
102 102 ChildSizing.Layout = cclLeftToRightThenTopToBottom
103 103 ChildSizing.ControlsPerLine = 1
104   - ClientHeight = 88
105   - ClientWidth = 627
  104 + ClientHeight = 96
  105 + ClientWidth = 636
106 106 Items.Strings = (
107 107 'Enviar histórico do bate-papo a novos participantes'
108 108 'Gerar participantes automaticamente'
... ... @@ -116,9 +116,9 @@ object FormDesigner: TFormDesigner
116 116 end
117 117 object RGPoints: TRadioGroup
118 118 Left = 0
119   - Height = 58
120   - Top = 386
121   - Width = 631
  119 + Height = 59
  120 + Top = 392
  121 + Width = 640
122 122 AutoFill = True
123 123 Caption = 'Tipo de pontuação'
124 124 ChildSizing.LeftRightSpacing = 6
... ... @@ -128,8 +128,8 @@ object FormDesigner: TFormDesigner
128 128 ChildSizing.ShrinkVertical = crsScaleChilds
129 129 ChildSizing.Layout = cclLeftToRightThenTopToBottom
130 130 ChildSizing.ControlsPerLine = 1
131   - ClientHeight = 38
132   - ClientWidth = 627
  131 + ClientHeight = 42
  132 + ClientWidth = 636
133 133 ItemIndex = 0
134 134 Items.Strings = (
135 135 'A e B'
... ... @@ -140,21 +140,21 @@ object FormDesigner: TFormDesigner
140 140 end
141 141 object GBMatrix: TGroupBox
142 142 Left = 0
143   - Height = 134
144   - Top = 449
145   - Width = 631
  143 + Height = 143
  144 + Top = 456
  145 + Width = 640
146 146 Caption = 'Tipo da Matrix'
147 147 ChildSizing.LeftRightSpacing = 5
148 148 ChildSizing.Layout = cclLeftToRightThenTopToBottom
149 149 ChildSizing.ControlsPerLine = 1
150   - ClientHeight = 114
151   - ClientWidth = 627
  150 + ClientHeight = 126
  151 + ClientWidth = 636
152 152 TabOrder = 6
153 153 object ChkColors: TCheckBox
154 154 Left = 5
155   - Height = 19
  155 + Height = 21
156 156 Top = 0
157   - Width = 215
  157 + Width = 239
158 158 Caption = '5 cores'
159 159 Checked = True
160 160 Enabled = False
... ... @@ -163,9 +163,9 @@ object FormDesigner: TFormDesigner
163 163 end
164 164 object ChkRows: TCheckBox
165 165 Left = 5
166   - Height = 19
167   - Top = 19
168   - Width = 215
  166 + Height = 21
  167 + Top = 21
  168 + Width = 239
169 169 Caption = '10 linhas'
170 170 Checked = True
171 171 Enabled = False
... ... @@ -174,35 +174,35 @@ object FormDesigner: TFormDesigner
174 174 end
175 175 object ChkCols: TCheckBox
176 176 Left = 5
177   - Height = 19
178   - Top = 38
179   - Width = 215
  177 + Height = 21
  178 + Top = 42
  179 + Width = 239
180 180 Caption = '10 colunas'
181 181 TabOrder = 2
182 182 end
183 183 object ChkDots: TCheckBox
184 184 Left = 5
185   - Height = 19
186   - Top = 57
187   - Width = 215
  185 + Height = 21
  186 + Top = 63
  187 + Width = 239
188 188 Caption = 'Com Círculos Preechidos'
189 189 OnChange = ChkDotsChange
190 190 TabOrder = 3
191 191 end
192 192 object ChkCleanDots: TCheckBox
193 193 Left = 5
194   - Height = 19
195   - Top = 76
196   - Width = 215
  194 + Height = 21
  195 + Top = 84
  196 + Width = 239
197 197 Caption = 'Com Círculos Vazados'
198 198 OnChange = ChkCleanDotsChange
199 199 TabOrder = 4
200 200 end
201 201 object ChkDotsCleanDots: TCheckBox
202 202 Left = 5
203   - Height = 19
204   - Top = 95
205   - Width = 215
  203 + Height = 21
  204 + Top = 105
  205 + Width = 239
206 206 Caption = 'Com Círculos Vazados e Preenchidos'
207 207 OnChange = ChkDotsCleanDotsChange
208 208 TabOrder = 5
... ... @@ -210,22 +210,23 @@ object FormDesigner: TFormDesigner
210 210 end
211 211 object GBConditions: TGroupBox
212 212 Left = 0
213   - Height = 100
214   - Top = 588
215   - Width = 631
  213 + Height = 97
  214 + Top = 604
  215 + Width = 640
216 216 Caption = 'Condições'
217 217 ClientHeight = 80
218   - ClientWidth = 627
  218 + ClientWidth = 636
219 219 TabOrder = 5
220 220 object ListBoxConditions: TListBox
221 221 Left = 0
222 222 Height = 80
223 223 Top = 0
224   - Width = 627
  224 + Width = 636
225 225 Anchors = [akTop, akLeft, akRight]
226 226 ItemHeight = 0
227 227 ScrollWidth = 634
228 228 TabOrder = 0
  229 + TopIndex = -1
229 230 end
230 231 end
231 232 end
... ... @@ -236,14 +237,14 @@ object FormDesigner: TFormDesigner
236 237 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
237 238 ChildSizing.Layout = cclLeftToRightThenTopToBottom
238 239 ChildSizing.ControlsPerLine = 1
239   - ClientHeight = 583
240   - ClientWidth = 650
  240 + ClientHeight = 792
  241 + ClientWidth = 658
241 242 object ComboCurrentCondition: TComboBox
242 243 Left = 0
243 244 Height = 23
244 245 Top = 10
245 246 Width = 640
246   - ItemHeight = 15
  247 + ItemHeight = 0
247 248 OnChange = ComboCurrentConditionChange
248 249 Style = csDropDownList
249 250 TabOrder = 0
... ... @@ -371,7 +372,7 @@ object FormDesigner: TFormDesigner
371 372 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
372 373 ChildSizing.Layout = cclLeftToRightThenTopToBottom
373 374 ChildSizing.ControlsPerLine = 1
374   - ClientHeight = 144
  375 + ClientHeight = 147
375 376 ClientWidth = 636
376 377 TabOrder = 5
377 378 object CheckBoxShouldAskQuestion: TCheckBox
... ... @@ -416,7 +417,7 @@ object FormDesigner: TFormDesigner
416 417 ChildSizing.ShrinkVertical = crsScaleChilds
417 418 ChildSizing.Layout = cclLeftToRightThenTopToBottom
418 419 ChildSizing.ControlsPerLine = 1
419   - ClientHeight = 51
  420 + ClientHeight = 54
420 421 ClientWidth = 532
421 422 Items.Strings = (
422 423 'Reverter consequências das metacontingências e contingências'
... ... @@ -444,7 +445,7 @@ object FormDesigner: TFormDesigner
444 445 ChildSizing.ShrinkVertical = crsScaleChilds
445 446 ChildSizing.Layout = cclLeftToRightThenTopToBottom
446 447 ChildSizing.ControlsPerLine = 1
447   - ClientHeight = 60
  448 + ClientHeight = 63
448 449 ClientWidth = 636
449 450 ItemIndex = 2
450 451 Items.Strings = (
... ... @@ -466,7 +467,7 @@ object FormDesigner: TFormDesigner
466 467 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
467 468 ChildSizing.Layout = cclLeftToRightThenTopToBottom
468 469 ChildSizing.ControlsPerLine = 1
469   - ClientHeight = 89
  470 + ClientHeight = 92
470 471 ClientWidth = 636
471 472 TabOrder = 7
472 473 object LabelEndCriteriaAbsCycles: TLabel
... ... @@ -496,7 +497,7 @@ object FormDesigner: TFormDesigner
496 497 ChildSizing.HorizontalSpacing = 5
497 498 ChildSizing.Layout = cclLeftToRightThenTopToBottom
498 499 ChildSizing.ControlsPerLine = 4
499   - ClientHeight = 22
  500 + ClientHeight = 25
500 501 ClientWidth = 532
501 502 TabOrder = 1
502 503 object SpinEditEndCriteriaInterlockingPorcentage: TSpinEdit
... ... @@ -547,7 +548,7 @@ object FormDesigner: TFormDesigner
547 548 Top = 641
548 549 Width = 640
549 550 Caption = 'Contingências e Metacontingências'
550   - ClientHeight = 77
  551 + ClientHeight = 80
551 552 ClientWidth = 636
552 553 TabOrder = 8
553 554 object ListBoxContingencies: TListBox
... ... @@ -559,6 +560,7 @@ object FormDesigner: TFormDesigner
559 560 ItemHeight = 0
560 561 ScrollWidth = 634
561 562 TabOrder = 0
  563 + TopIndex = -1
562 564 end
563 565 end
564 566 end
... ... @@ -569,14 +571,14 @@ object FormDesigner: TFormDesigner
569 571 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
570 572 ChildSizing.Layout = cclLeftToRightThenTopToBottom
571 573 ChildSizing.ControlsPerLine = 1
572   - ClientHeight = 583
573   - ClientWidth = 650
  574 + ClientHeight = 792
  575 + ClientWidth = 658
574 576 Enabled = False
575 577 object RGContingencyType: TRadioGroup
576 578 Left = 0
577 579 Height = 59
578 580 Top = 10
579   - Width = 650
  581 + Width = 658
580 582 AutoFill = True
581 583 Caption = 'Mostrar'
582 584 ChildSizing.LeftRightSpacing = 6
... ... @@ -586,8 +588,8 @@ object FormDesigner: TFormDesigner
586 588 ChildSizing.ShrinkVertical = crsScaleChilds
587 589 ChildSizing.Layout = cclLeftToRightThenTopToBottom
588 590 ChildSizing.ControlsPerLine = 1
589   - ClientHeight = 39
590   - ClientWidth = 646
  591 + ClientHeight = 42
  592 + ClientWidth = 654
591 593 Items.Strings = (
592 594 'Contingências Operantes'
593 595 'Metacontingências'
... ... @@ -597,10 +599,10 @@ object FormDesigner: TFormDesigner
597 599 end
598 600 object ComboCurrentContingency: TComboBox
599 601 Left = 0
600   - Height = 23
  602 + Height = 27
601 603 Top = 74
602   - Width = 650
603   - ItemHeight = 15
  604 + Width = 658
  605 + ItemHeight = 0
604 606 OnChange = ComboCurrentContingencyChange
605 607 Style = csDropDownList
606 608 TabOrder = 0
... ... @@ -609,38 +611,38 @@ object FormDesigner: TFormDesigner
609 611 Left = 0
610 612 Height = 26
611 613 Top = 106
612   - Width = 650
  614 + Width = 658
613 615 ChildSizing.LeftRightSpacing = 25
614 616 ChildSizing.HorizontalSpacing = 50
615 617 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
616 618 ChildSizing.Layout = cclLeftToRightThenTopToBottom
617 619 ChildSizing.ControlsPerLine = 3
618 620 ClientHeight = 26
619   - ClientWidth = 650
  621 + ClientWidth = 658
620 622 TabOrder = 1
621 623 object BtnAppendContingency: TButton
622 624 Left = 25
623 625 Height = 25
624 626 Top = 0
625   - Width = 166
  627 + Width = 168
626 628 Caption = 'Adicionar'
627 629 OnClick = BtnAppendContingencyClick
628 630 TabOrder = 0
629 631 end
630 632 object BtnRemoveContingency: TButton
631   - Left = 241
  633 + Left = 243
632 634 Height = 25
633 635 Top = 0
634   - Width = 163
  636 + Width = 165
635 637 Caption = 'Remover'
636 638 OnClick = BtnRemoveContingencyClick
637 639 TabOrder = 1
638 640 end
639 641 object BtnReorderContingency: TButton
640   - Left = 454
  642 + Left = 458
641 643 Height = 25
642 644 Top = 0
643   - Width = 171
  645 + Width = 175
644 646 Caption = 'Reordenar'
645 647 OnClick = BtnReorderContingencyClick
646 648 TabOrder = 2
... ... @@ -650,7 +652,7 @@ object FormDesigner: TFormDesigner
650 652 Left = 0
651 653 Height = 15
652 654 Top = 137
653   - Width = 650
  655 + Width = 658
654 656 Caption = 'Nome da contingência'
655 657 ParentColor = False
656 658 end
... ... @@ -658,7 +660,7 @@ object FormDesigner: TFormDesigner
658 660 Left = 0
659 661 Height = 25
660 662 Top = 157
661   - Width = 650
  663 + Width = 658
662 664 OnEditingDone = EditContingencyNameEditingDone
663 665 TabOrder = 2
664 666 end
... ... @@ -666,7 +668,7 @@ object FormDesigner: TFormDesigner
666 668 Left = 0
667 669 Height = 122
668 670 Top = 187
669   - Width = 650
  671 + Width = 658
670 672 AutoFill = True
671 673 Caption = 'Estilo da Resposta'
672 674 ChildSizing.LeftRightSpacing = 6
... ... @@ -676,8 +678,8 @@ object FormDesigner: TFormDesigner
676 678 ChildSizing.ShrinkVertical = crsScaleChilds
677 679 ChildSizing.Layout = cclLeftToRightThenTopToBottom
678 680 ChildSizing.ControlsPerLine = 1
679   - ClientHeight = 102
680   - ClientWidth = 646
  681 + ClientHeight = 105
  682 + ClientWidth = 654
681 683 ItemIndex = 0
682 684 Items.Strings = (
683 685 'Extinção'
... ... @@ -694,7 +696,7 @@ object FormDesigner: TFormDesigner
694 696 Left = 0
695 697 Height = 15
696 698 Top = 314
697   - Width = 650
  699 + Width = 658
698 700 Alignment = taCenter
699 701 Caption = 'SE O PARTICIPANTE ESCOLHER'
700 702 ParentColor = False
... ... @@ -704,7 +706,7 @@ object FormDesigner: TFormDesigner
704 706 Left = 0
705 707 Height = 17
706 708 Top = 334
707   - Width = 650
  709 + Width = 658
708 710 Caption = 'Linhas'
709 711 ChildSizing.LeftRightSpacing = 5
710 712 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
... ... @@ -717,7 +719,7 @@ object FormDesigner: TFormDesigner
717 719 Left = 0
718 720 Height = 15
719 721 Top = 356
720   - Width = 650
  722 + Width = 658
721 723 Alignment = taCenter
722 724 Caption = 'E'
723 725 ParentColor = False
... ... @@ -727,7 +729,7 @@ object FormDesigner: TFormDesigner
727 729 Left = 0
728 730 Height = 17
729 731 Top = 376
730   - Width = 650
  732 + Width = 658
731 733 Caption = 'Cores'
732 734 ChildSizing.HorizontalSpacing = 5
733 735 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
... ... @@ -740,7 +742,7 @@ object FormDesigner: TFormDesigner
740 742 Left = 0
741 743 Height = 15
742 744 Top = 398
743   - Width = 650
  745 + Width = 658
744 746 Alignment = taCenter
745 747 Caption = 'ENTÃO'
746 748 ParentColor = False
... ... @@ -748,105 +750,221 @@ object FormDesigner: TFormDesigner
748 750 end
749 751 object GBContingencyConsequence: TGroupBox
750 752 Left = 0
751   - Height = 59
  753 + Height = 364
752 754 Top = 418
753   - Width = 650
  755 + Width = 658
754 756 Caption = 'Consequência'
755 757 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
756   - ChildSizing.Layout = cclTopToBottomThenLeftToRight
  758 + ChildSizing.Layout = cclLeftToRightThenTopToBottom
757 759 ChildSizing.ControlsPerLine = 2
758   - ClientHeight = 39
759   - ClientWidth = 646
  760 + ClientHeight = 347
  761 + ClientWidth = 654
760 762 TabOrder = 6
761 763 Visible = False
762   - object LabelC6: TLabel
  764 + object LabelCsq1: TLabel
763 765 Left = 0
764 766 Height = 15
765 767 Top = 0
766   - Width = 154
767   - Caption = 'do Tipo'
  768 + Width = 416
  769 + Caption = 'Pontos'
768 770 ParentColor = False
769 771 end
770   - object CBPointsType: TComboBox
771   - Left = 0
772   - Height = 23
773   - Top = 15
774   - Width = 154
775   - ItemHeight = 15
776   - OnChange = ConsequenceStyleChange
777   - Style = csDropDownList
778   - TabOrder = 4
779   - end
780   - object LabelC1: TLabel
781   - Left = 154
  772 + object LabelCsq2: TLabel
  773 + Left = 416
782 774 Height = 15
783 775 Top = 0
784   - Width = 134
785   - Caption = 'Prefixo'
786   - ParentColor = False
787   - end
788   - object EditMessPrefix: TEdit
789   - Left = 154
790   - Height = 27
791   - Top = 15
792   - Width = 134
793   - TabOrder = 0
794   - Text = '$NICNAME produziu'
795   - end
796   - object LabelC4: TLabel
797   - Left = 288
798   - Height = 15
799   - Top = 0
800   - Width = 104
801   - Caption = 'Pontos'
  776 + Width = 238
  777 + Caption = 'do Tipo'
802 778 ParentColor = False
803 779 end
804 780 object SpinEditContingencyPoints: TSpinEdit
805   - Left = 288
  781 + Left = 0
806 782 Height = 27
807 783 Top = 15
808   - Width = 104
  784 + Width = 416
809 785 MaxValue = 0
810 786 OnEditingDone = ConsequenceStyleChange
811   - TabOrder = 2
  787 + TabOrder = 0
812 788 Value = 1
813 789 end
814   - object LabelC2: TLabel
815   - Left = 392
816   - Height = 15
817   - Top = 0
818   - Width = 134
819   - Caption = 'Sufixo'
820   - ParentColor = False
821   - end
822   - object EditMessSufix: TEdit
823   - Left = 392
  790 + object CBPointsType: TComboBox
  791 + Left = 416
824 792 Height = 27
825   - Hint = 'singular|plural'
826 793 Top = 15
827   - Width = 134
  794 + Width = 238
  795 + ItemHeight = 0
  796 + OnChange = ConsequenceStyleChange
  797 + Style = csDropDownList
828 798 TabOrder = 1
829   - Text = 'ponto.|pontos.'
830 799 end
831   - object LabelC5: TLabel
832   - Left = 526
833   - Height = 15
834   - Top = 0
835   - Width = 120
836   - Caption = 'Apresentar'
  800 + object RGBroadcastMessage: TRadioGroup
  801 + Left = 0
  802 + Height = 80
  803 + Top = 42
  804 + Width = 416
  805 + AutoFill = True
  806 + Caption = 'Apresentar mensagem de notificação'
  807 + ChildSizing.Layout = cclLeftToRightThenTopToBottom
  808 + ChildSizing.ControlsPerLine = 1
  809 + ClientHeight = 63
  810 + ClientWidth = 412
  811 + ItemIndex = 0
  812 + Items.Strings = (
  813 + 'a todos os participantes'
  814 + 'apenas ao participante alvo da pontuação'
  815 + 'Não apresentar mensagem de notificação'
  816 + )
  817 + OnClick = RGBroadcastMessageClick
  818 + TabOrder = 9
  819 + end
  820 + object CheckBoxImutableMessage: TCheckBox
  821 + Left = 416
  822 + Height = 80
  823 + Hint = 'Marque se deseja uma mensagem fixa; o programa não atualizará o texto da mensagem caso o valor da pontuação mude ao longo do experimento.'
  824 + Top = 42
  825 + Width = 238
  826 + AutoSize = False
  827 + Caption = 'imutável'
  828 + OnChange = CheckBoxImutableMessageChange
  829 + TabOrder = 10
  830 + end
  831 + object LabelCsq3: TLabel
  832 + Left = 0
  833 + Height = 25
  834 + Top = 122
  835 + Width = 416
  836 + Caption = 'Texto no início da mensagem'
837 837 ParentColor = False
838 838 end
839   - object CheckBoxBroadcast: TCheckBox
840   - Left = 526
841   - Height = 27
842   - Top = 15
843   - Width = 120
844   - AllowGrayed = True
845   - Caption = 'a todos'
846   - Checked = True
847   - OnChange = CheckBoxBroadcastChange
848   - State = cbChecked
  839 + object EditMessPrefix: TEdit
  840 + Left = 416
  841 + Height = 25
  842 + Top = 122
  843 + Width = 238
  844 + TabOrder = 2
  845 + Text = '$NICNAME'
  846 + end
  847 + object LabelCsq4: TLabel
  848 + Left = 0
  849 + Height = 25
  850 + Top = 147
  851 + Width = 416
  852 + Caption = 'Prefixo ao perder pontos'
  853 + ParentColor = False
  854 + end
  855 + object EditMessPrefixLoss: TEdit
  856 + Left = 416
  857 + Height = 25
  858 + Top = 147
  859 + Width = 238
849 860 TabOrder = 3
  861 + Text = 'perdeu'
  862 + end
  863 + object LabelCsq5: TLabel
  864 + Left = 0
  865 + Height = 25
  866 + Top = 172
  867 + Width = 416
  868 + Caption = 'Sufixo ao perder pontos (Singular)'
  869 + ParentColor = False
  870 + end
  871 + object EditMessSufixLossSingular: TEdit
  872 + Left = 416
  873 + Height = 25
  874 + Top = 172
  875 + Width = 238
  876 + TabOrder = 4
  877 + Text = 'ponto.'
  878 + end
  879 + object LabelCsq6: TLabel
  880 + Left = 0
  881 + Height = 25
  882 + Top = 197
  883 + Width = 416
  884 + Caption = 'Sufixo ao perder pontos (Plural)'
  885 + ParentColor = False
  886 + end
  887 + object EditMessSufixLossPlural: TEdit
  888 + Left = 416
  889 + Height = 25
  890 + Top = 197
  891 + Width = 238
  892 + TabOrder = 5
  893 + Text = 'pontos.'
  894 + end
  895 + object LabelCsq7: TLabel
  896 + Left = 0
  897 + Height = 25
  898 + Top = 222
  899 + Width = 416
  900 + Caption = 'Prefixo ao ganhar pontos'
  901 + ParentColor = False
  902 + end
  903 + object EditMessPrefixEarn: TEdit
  904 + Left = 416
  905 + Height = 25
  906 + Top = 222
  907 + Width = 238
  908 + TabOrder = 6
  909 + Text = 'ganhou'
  910 + end
  911 + object LabelCsq8: TLabel
  912 + Left = 0
  913 + Height = 25
  914 + Top = 247
  915 + Width = 416
  916 + Caption = 'Sufixo ao ganhar pontos (Singular)'
  917 + ParentColor = False
  918 + end
  919 + object EditMessSufixEarnSingular: TEdit
  920 + Left = 416
  921 + Height = 25
  922 + Top = 247
  923 + Width = 238
  924 + TabOrder = 7
  925 + Text = 'ponto.'
  926 + end
  927 + object LabelCsq9: TLabel
  928 + Left = 0
  929 + Height = 25
  930 + Top = 272
  931 + Width = 416
  932 + Caption = 'Sufixo ao ganhar pontos (Plural)'
  933 + ParentColor = False
  934 + end
  935 + object EditMessSufixEarnPlural: TEdit
  936 + Left = 416
  937 + Height = 25
  938 + Top = 272
  939 + Width = 238
  940 + TabOrder = 8
  941 + Text = 'pontos.'
  942 + end
  943 + object LabelCsq10: TLabel
  944 + Left = 0
  945 + Height = 25
  946 + Top = 297
  947 + Width = 416
  948 + Caption = 'Sufixo ao ganhar pontos (Plural)'
  949 + ParentColor = False
  950 + end
  951 + object EditMessSufixZero: TEdit
  952 + Left = 416
  953 + Height = 25
  954 + Top = 297
  955 + Width = 238
  956 + OnChange = EditMessSufixZeroChange
  957 + TabOrder = 11
  958 + Text = 'não ganhou nem perdeu pontos.'
  959 + end
  960 + object ButtonPreviewMessage: TButton
  961 + Left = 0
  962 + Height = 25
  963 + Top = 322
  964 + Width = 416
  965 + Caption = 'Ver como a mensagem pode ser apresentada'
  966 + OnClick = ButtonPreviewMessageClick
  967 + TabOrder = 12
850 968 end
851 969 end
852 970 end
... ...
experiment_designer/form_main.pas
... ... @@ -15,7 +15,8 @@ interface
15 15  
16 16 uses
17 17 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
18   - Menus, ExtCtrls, StdCtrls, XMLPropStorage, IniFiles, Spin, PropertyStorage;
  18 + Menus, ExtCtrls, StdCtrls, XMLPropStorage, IniFiles, Spin, PropertyStorage,
  19 + PopupNotifier;
19 20  
20 21 type
21 22  
... ... @@ -28,22 +29,29 @@ type
28 29 BtnRemoveContingency: TButton;
29 30 BtnReorderCond: TButton;
30 31 BtnReorderContingency: TButton;
  32 + ButtonPreviewMessage: TButton;
31 33 CGGlobal: TCheckGroup;
  34 + CheckBoxImutableMessage: TCheckBox;
32 35 ChkDotsCleanDots: TCheckBox;
33 36 ChkColors: TCheckBox;
34 37 ChkRows: TCheckBox;
35 38 ChkCols: TCheckBox;
36 39 ChkDots: TCheckBox;
37 40 ChkCleanDots: TCheckBox;
38   - CheckBoxBroadcast: TCheckBox;
39 41 CheckBoxShouldAskQuestion: TCheckBox;
40 42 CGQuestion: TCheckGroup;
41 43 CBPointsType: TComboBox;
42 44 ComboCurrentCondition: TComboBox;
43 45 ComboCurrentContingency: TComboBox;
44   - EditMessPrefix: TEdit;
45   - EditMessSufix: TEdit;
46 46 EditContingencyName: TEdit;
  47 + EditMessPrefix: TEdit;
  48 + EditMessSufixEarnPlural: TEdit;
  49 + EditMessPrefixEarn: TEdit;
  50 + EditMessSufixZero: TEdit;
  51 + EditMessPrefixLoss: TEdit;
  52 + EditMessSufixLossSingular: TEdit;
  53 + EditMessSufixLossPlural: TEdit;
  54 + EditMessSufixEarnSingular: TEdit;
47 55 EditQuestion: TEdit;
48 56 EditConditionName: TEdit;
49 57 EditExperimentName: TEdit;
... ... @@ -58,13 +66,18 @@ type
58 66 GBContingencyRows: TGroupBox;
59 67 GBContingencyConsequence: TGroupBox;
60 68 GBMatrix: TGroupBox;
  69 + LabelCsq10: TLabel;
  70 + LabelCsq3: TLabel;
  71 + LabelCsq5: TLabel;
  72 + LabelCsq8: TLabel;
  73 + LabelCsq6: TLabel;
  74 + LabelCsq9: TLabel;
  75 + LabelCsq4: TLabel;
  76 + LabelCsq7: TLabel;
61 77 LabelQuestion: TLabel;
62 78 LabelPointsOnConditionBegin: TLabel;
63   - LabelC1: TLabel;
64   - LabelC2: TLabel;
65   - LabelC4: TLabel;
66   - LabelC5: TLabel;
67   - LabelC6: TLabel;
  79 + LabelCsq1: TLabel;
  80 + LabelCsq2: TLabel;
68 81 LabelThen: TLabel;
69 82 LabelOperator: TLabel;
70 83 LabelContingencyName: TLabel;
... ... @@ -89,6 +102,7 @@ type
89 102 PageControl: TPageControl;
90 103 PanelConditionButtons: TPanel;
91 104 PanelContingenciesButtons: TPanel;
  105 + RGBroadcastMessage: TRadioGroup;
92 106 RGContingencyType: TRadioGroup;
93 107 RGContingencyStyle: TRadioGroup;
94 108 RGEndCriteriaStyle: TRadioGroup;
... ... @@ -110,13 +124,14 @@ type
110 124 procedure BtnRemoveContingencyClick(Sender: TObject);
111 125 procedure BtnReorderCondClick(Sender: TObject);
112 126 procedure BtnReorderContingencyClick(Sender: TObject);
  127 + procedure ButtonPreviewMessageClick(Sender: TObject);
  128 + procedure CheckBoxImutableMessageChange(Sender: TObject);
113 129 procedure ChkDotsCleanDotsChange(Sender: TObject);
114 130 //
115 131 procedure ConsequenceMessageEditingDone(Sender: TObject);
116 132 procedure ConsequenceStyleChange(Sender: TObject);
117 133  
118 134 procedure CGQuestionItemClick(Sender: TObject; Index: integer);
119   - procedure CheckBoxBroadcastChange(Sender: TObject);
120 135 procedure CheckBoxColorsRowsChange(Sender: TObject);
121 136 procedure CheckBoxShouldAskQuestionChange(Sender: TObject);
122 137 procedure ChkCleanDotsChange(Sender: TObject);
... ... @@ -125,12 +140,14 @@ type
125 140 procedure ComboCurrentContingencyChange(Sender: TObject);
126 141 procedure EditConditionNameEditingDone(Sender: TObject);
127 142 procedure EditContingencyNameEditingDone(Sender: TObject);
  143 + procedure EditMessSufixZeroChange(Sender: TObject);
128 144 procedure EditQuestionEditingDone(Sender: TObject);
129 145 procedure FormActivate(Sender: TObject);
130 146 procedure FormCreate(Sender: TObject);
131 147 procedure FormDestroy(Sender: TObject);
132 148 procedure MenuItemExitClick(Sender: TObject);
133 149 procedure MenuItemOpenClick(Sender: TObject);
  150 + procedure RGBroadcastMessageClick(Sender: TObject);
134 151 procedure RGContingencyStyleClick(Sender: TObject);
135 152 procedure RGContingencyStyleExit(Sender: TObject);
136 153  
... ... @@ -187,7 +204,7 @@ var
187 204  
188 205 implementation
189 206  
190   -uses game_resources, game_actors, string_methods, strutils;
  207 +uses game_resources, game_actors, game_actors_point, string_methods, strutils;
191 208  
192 209 {$R *.lfm}
193 210  
... ... @@ -205,6 +222,35 @@ begin
205 222 end;
206 223 end;
207 224  
  225 +procedure TFormDesigner.RGBroadcastMessageClick(Sender: TObject);
  226 +var
  227 + LVisible : Boolean;
  228 +begin
  229 + case RGBroadcastMessage.ItemIndex of
  230 + 0,1: LVisible := True;
  231 + 2 : LVisible := False;
  232 + end;
  233 + CheckBoxImutableMessage.Visible := LVisible;
  234 + LabelCsq3.Visible := LVisible;
  235 + LabelCsq4.Visible := LVisible;
  236 + LabelCsq5.Visible := LVisible;
  237 + LabelCsq6.Visible := LVisible;
  238 + LabelCsq7.Visible := LVisible;
  239 + LabelCsq8.Visible := LVisible;
  240 + LabelCsq9.Visible := LVisible;
  241 + LabelCsq10.Visible := LVisible;
  242 + EditMessPrefix.Visible := LVisible;
  243 + EditMessPrefixLoss.Visible:= LVisible;
  244 + EditMessSufixLossPlural.Visible:= LVisible;
  245 + EditMessSufixLossSingular.Visible:= LVisible;
  246 + EditMessPrefixEarn.Visible:= LVisible;
  247 + EditMessSufixEarnPlural.Visible:= LVisible;
  248 + EditMessSufixEarnSingular.Visible:= LVisible;
  249 + EditMessSufixZero.Visible:= LVisible;
  250 + ButtonPreviewMessage.Visible:=LVisible;
  251 + ConsequenceStyleChange(RGBroadcastMessage);
  252 +end;
  253 +
208 254 procedure TFormDesigner.RGContingencyStyleClick(Sender: TObject);
209 255 var
210 256 LVisible: boolean;
... ... @@ -716,19 +762,14 @@ begin
716 762 // end;
717 763  
718 764 if gscBroadcastMessage in CS then
719   - CheckBoxBroadcast.State := cbChecked
  765 + RGBroadcastMessage.ItemIndex := 0
720 766 else
721 767 if gscMessage in CS then
722   - CheckBoxBroadcast.State := cbGrayed
  768 + RGBroadcastMessage.ItemIndex := 1
723 769 else
724   - CheckBoxBroadcast.State := cbUnchecked;
  770 + RGBroadcastMessage.ItemIndex := 2;
725 771  
726 772  
727   - case CheckBoxBroadcast.State of
728   - cbChecked: CheckBoxBroadcast.Caption := 'a todos';
729   - cbUnchecked: CheckBoxBroadcast.Caption := 'ao participante';
730   - cbGrayed: CheckBoxBroadcast.Caption := 'a ninguém';
731   - end;
732 773 end;
733 774  
734 775 procedure TFormDesigner.UpdateContingencyList(ASection: String);
... ... @@ -854,15 +895,21 @@ begin
854 895 WriteString(ASection, AContingency + KEY_CRITERIA, GetContingencyCriteria);
855 896 WriteString(ASection, AContingency + KEY_CONSEQUE, GetConsequenceStyle);
856 897 WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND, EditMessPrefix.Text);
857   - try
858   - WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDS, ExtractDelimited(1,EditMessSufix.Text,['|']));
859   - WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDP, ExtractDelimited(2,EditMessSufix.Text,['|']));
860   - except
861   - on E: Exception do
862   - Exit;
863   - //if E.Message = 'E';
864 898  
865   - end;
  899 + if EditMessPrefixLoss.Text <> '' then
  900 + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS,EditMessPrefixLoss.Text);
  901 + if EditMessSufixLossSingular.Text <> '' then
  902 + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S,EditMessSufixLossSingular.Text);
  903 + if EditMessSufixLossPlural.Text <> '' then
  904 + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P,EditMessSufixLossPlural.Text);
  905 + if EditMessPrefixEarn.Text <> '' then
  906 + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_EARN,EditMessPrefixEarn.Text);
  907 + if EditMessSufixEarnSingular.Text <> '' then
  908 + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S,EditMessSufixEarnSingular.Text);
  909 + if EditMessSufixEarnPlural.Text <> '' then
  910 + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P,EditMessSufixEarnPlural.Text);
  911 + if EditMessSufixZero.Text <> '' then
  912 + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_ZERO, EditMessSufixZero.Text);
866 913 end;
867 914 end;
868 915  
... ... @@ -874,8 +921,13 @@ begin
874 921 DeleteKey(ASection, AContingency + KEY_CRITERIA);
875 922 DeleteKey(ASection, AContingency + KEY_CONSEQUE);
876 923 DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND);
877   - DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDS);
878   - DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDP);
  924 + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS);
  925 + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S);
  926 + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P);
  927 + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_EARN);
  928 + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S);
  929 + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P);
  930 + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_ZERO);
879 931 end;
880 932 end;
881 933  
... ... @@ -968,10 +1020,10 @@ begin
968 1020 end;
969 1021 end;
970 1022  
971   - case CheckBoxBroadcast.State of
972   - cbChecked : CS += [gscBroadcastMessage];
973   - cbUnchecked: { do nothing };
974   - cbGrayed: CS -= [gscMessage];
  1023 + case RGBroadcastMessage.ItemIndex of
  1024 + 0 : CS += [gscBroadcastMessage];
  1025 + 1: { do nothing };
  1026 + 2: CS -= [gscMessage];
975 1027 end;
976 1028  
977 1029 Result := IntToStr(SpinEditContingencyPoints.Value)+',0|';
... ... @@ -1090,8 +1142,20 @@ begin
1090 1142 SetContingencyCriteria(ReadString(ASection, AContingency + KEY_CRITERIA, ''));
1091 1143 SetConsequenceStyle(ReadString(ASection, AContingency + KEY_CONSEQUE, ''));
1092 1144 EditMessPrefix.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND,'');
1093   - EditMessSufix.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDS,'')+'|'+
1094   - ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDP,'');
  1145 + EditMessPrefixLoss.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS,'');
  1146 + EditMessSufixLossSingular.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S,'');
  1147 + EditMessSufixLossPlural.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P,'');
  1148 + EditMessPrefixEarn.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_EARN,'');
  1149 + EditMessSufixEarnSingular.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S,'');
  1150 + EditMessSufixEarnPlural.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P,'');
  1151 + EditMessSufixZero.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_ZERO, '');
  1152 +
  1153 + if (EditMessPrefixLoss.Text = '') and (EditMessSufixLossSingular.Text = '') and (EditMessSufixLossPlural.Text = '') and
  1154 + (EditMessPrefixEarn.Text = '') and (EditMessSufixEarnSingular.Text = '') and (EditMessSufixEarnPlural.Text = '') and
  1155 + (EditMessSufixZero.Text = '') then
  1156 + CheckBoxImutableMessage.Checked := True
  1157 + else
  1158 + CheckBoxImutableMessage.Checked := False;
1095 1159 end;
1096 1160 end;
1097 1161  
... ... @@ -1215,6 +1279,11 @@ begin
1215 1279 end;
1216 1280 end;
1217 1281  
  1282 +procedure TFormDesigner.EditMessSufixZeroChange(Sender: TObject);
  1283 +begin
  1284 +
  1285 +end;
  1286 +
1218 1287 procedure TFormDesigner.ConsequenceMessageEditingDone(Sender: TObject);
1219 1288 var
1220 1289 LS, LC: String;
... ... @@ -1241,16 +1310,6 @@ begin
1241 1310 FLoading := False;
1242 1311 end;
1243 1312  
1244   -procedure TFormDesigner.CheckBoxBroadcastChange(Sender: TObject);
1245   -begin
1246   - case TCheckBox(Sender).State of
1247   - cbChecked: TCheckBox(Sender).Caption := 'a todos';
1248   - cbUnchecked: TCheckBox(Sender).Caption := 'ao participante';
1249   - cbGrayed: TCheckBox(Sender).Caption := 'a ninguém';
1250   - end;
1251   - ConsequenceStyleChange(CheckBoxBroadcast);
1252   -end;
1253   -
1254 1313  
1255 1314 procedure TFormDesigner.BtnAppendCondClick(Sender: TObject);
1256 1315 var
... ... @@ -1355,8 +1414,13 @@ var
1355 1414 Keys.Values[LC + KEY_CRITERIA] := ReadString(LS, LC + KEY_CRITERIA,'');
1356 1415 Keys.Values[LC + KEY_CONSEQUE] := ReadString(LS, LC + KEY_CONSEQUE,'');
1357 1416 Keys.Values[LC + KEY_CONSEQUE_MESSAGE_PREPEND] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_PREPEND,'');
1358   - Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPENDS] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPENDS,'');
1359   - Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPENDP] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPENDP,'');
  1417 + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS,'');
  1418 + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S,'');
  1419 + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P,'');
  1420 + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_PREPEND_EARN] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_PREPEND_EARN,'');
  1421 + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S,'');
  1422 + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P,'');
  1423 + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_ZERO] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_ZERO,'');
1360 1424 end;
1361 1425 Keys.EndUpdate;
1362 1426 end;
... ... @@ -1427,6 +1491,89 @@ begin
1427 1491 ShowMessage('Não implementado.');
1428 1492 end;
1429 1493  
  1494 +procedure TFormDesigner.ButtonPreviewMessageClick(Sender: TObject);
  1495 +var
  1496 + LGamePoint : TGamePoint;
  1497 + LMessage : TPopupNotifier;
  1498 + i: Integer;
  1499 + procedure CreateMessage(AValue : integer = 0);
  1500 + begin
  1501 + if CheckBoxImutableMessage.Checked then
  1502 + LGamePoint := TGamePoint.Create(Nil,IntToStr(SpinEditContingencyPoints.Value))
  1503 + else
  1504 + LGamePoint := TGamePoint.Create(Nil,IntToStr(AValue));
  1505 + LMessage := TPopupNotifier.Create(nil);
  1506 + LMessage.Title := '';
  1507 + LMessage.Color := clTeal;
  1508 + LMessage.Text := LGamePoint.PointMessage(EditMessPrefix.Text,
  1509 + EditMessPrefixLoss.Text,EditMessSufixLossSingular.Text,EditMessSufixLossPlural.Text,
  1510 + EditMessPrefixEarn.Text,EditMessSufixEarnSingular.Text,EditMessSufixEarnPlural.Text,
  1511 + EditMessSufixZero.Text,
  1512 + RGContingencyType.ItemIndex = 1);
  1513 + LMessage.ShowAtPos(
  1514 + (Screen.Width div 2)-150,(Screen.Height div 2)-50);
  1515 + end;
  1516 +
  1517 +begin
  1518 + if CheckBoxImutableMessage.Checked then
  1519 + CreateMessage
  1520 + else
  1521 + for i := -2 to 2 do
  1522 + CreateMessage(i);
  1523 +end;
  1524 +
  1525 +procedure TFormDesigner.CheckBoxImutableMessageChange(Sender: TObject);
  1526 +var
  1527 + LVisible : Boolean;
  1528 + LGamePoint : TGamePoint;
  1529 +begin
  1530 + LVisible := TCheckBox(Sender).Checked;
  1531 + if LVisible then
  1532 + begin
  1533 + LabelCsq3.Caption := 'Texto da mensagem de notificação';
  1534 + LGamePoint := TGamePoint.Create(Self,IntToStr(SpinEditContingencyPoints.Value));
  1535 + if not FLoading then
  1536 + case RGContingencyType.ItemIndex of
  1537 + 0:EditMessPrefix.Text := LGamePoint.PointMessage('','','','','','','','',False);
  1538 + 1:EditMessPrefix.Text := LGamePoint.PointMessage('','','','','','','','',True);
  1539 + end;
  1540 + LGamePoint.Free;
  1541 + ButtonPreviewMessage.Caption:= 'Ver como a mensagem será apresentada';
  1542 + end
  1543 + else
  1544 + begin
  1545 + LabelCsq3.Caption := 'Texto no início da mensagem';
  1546 + if not FLoading then
  1547 + case RGContingencyType.ItemIndex of
  1548 + 0:EditMessPrefix.Text := '$NICNAME';
  1549 + 1:EditMessPrefix.Text := 'Vocês';
  1550 + end;
  1551 + ButtonPreviewMessage.Caption:= 'Ver como a mensagem pode ser apresentada';
  1552 + end;
  1553 +
  1554 + LabelCsq4.Visible := not LVisible;
  1555 + LabelCsq5.Visible := not LVisible;
  1556 + LabelCsq6.Visible := not LVisible;
  1557 + LabelCsq7.Visible := not LVisible;
  1558 + LabelCsq8.Visible := not LVisible;
  1559 + LabelCsq9.Visible := not LVisible;
  1560 + LabelCsq10.Visible := not LVisible;
  1561 + EditMessPrefixLoss.Visible:= not LVisible;
  1562 + EditMessPrefixLoss.Text := '';
  1563 + EditMessSufixLossPlural.Visible:= not LVisible;
  1564 + EditMessSufixLossPlural.Text := '';
  1565 + EditMessSufixLossSingular.Visible:= not LVisible;
  1566 + EditMessSufixLossSingular.Text := '';
  1567 + EditMessPrefixEarn.Visible:= not LVisible;
  1568 + EditMessPrefixEarn.Text := '';
  1569 + EditMessSufixEarnPlural.Visible:= not LVisible;
  1570 + EditMessSufixEarnPlural.Text := '';
  1571 + EditMessSufixEarnSingular.Visible:= not LVisible;
  1572 + EditMessSufixEarnSingular.Text := '';
  1573 + EditMessSufixZero.Visible:= not LVisible;
  1574 + EditMessSufixZero.Text := '';
  1575 +end;
  1576 +
1430 1577  
1431 1578 procedure TFormDesigner.ConsequenceStyleChange(Sender: TObject);
1432 1579 var
... ...
units/game_actors_point.pas
... ... @@ -29,7 +29,6 @@ type
29 29 function GetResultAsString: string;
30 30 function GetValue: integer;
31 31 public
32   - //Cycles : integer; // specify when present points regarding condition cycles
33 32 constructor Create(AOwner:TComponent;AValue : integer);overload;
34 33 constructor Create(AOwner:TComponent;AValue : array of integer); overload;
35 34 constructor Create(AOwner:TComponent;AResult : string); overload;
... ... @@ -37,17 +36,17 @@ type
37 36 APrependEarn,AAppendiceEarnSingular,AAppendiceEarnPlural,AAppendiceZero: string; IsGroupPoint: Boolean) : string;
38 37 property ValueWithVariation : integer read GetValue write FValue;
39 38 property Variation : integer read FVariation write FVariation;
40   -
41 39 property AsString : string read GetResultAsString;
42 40 property ResultAsInteger : integer read GetResult;
43 41 end;
44 42  
45 43 //operator :=(I :integer) : TGamePoint;
46 44 //operator :=(A : array of integer):TGamePoint;
47   -//
  45 +
48 46 implementation
49 47  
50 48 uses strutils;
  49 +
51 50 //operator:=(I: integer):TGamePoint;
52 51 //begin
53 52 // Result := ;
... ... @@ -106,6 +105,7 @@ function TGamePoint.PointMessage(APrepend,
106 105  
107 106 procedure ReadCustomMessage;
108 107 begin
  108 + Result := APrepend;
109 109 case FResult of
110 110 -MaxInt..-2: Result += #32+APrependLoss+#32+Self.AsString+#32+AAppendiceLossPlural;
111 111 -1 : Result += #32+APrependLoss+#32+Self.AsString+#32+AAppendiceLossSingular;
... ... @@ -115,52 +115,58 @@ function TGamePoint.PointMessage(APrepend,
115 115 end;
116 116 end;
117 117  
  118 + procedure ReadBuiltInGroupMessage;
  119 + begin
  120 + Result := 'Vocês';
  121 + case FResult of
  122 + -MaxInt..-2: Result += #32+'retiraram'+#32+Self.AsString+#32+'itens escolares de uma escola pública';
  123 + -1 : Result += #32+'retiraram'+#32+Self.AsString+#32+'item escolar de uma escola pública';
  124 + 0 : Result += #32+'não doaram e nem retiraram itens escolares';
  125 + 1 : Result += #32+'doaram'+#32+Self.AsString+#32+'item escolar a uma escola pública';
  126 + 2..MaxInt: Result += #32+'doaram'+#32+Self.AsString+#32+'itens escolares a uma escola pública';
  127 + end;
  128 + Result += '.';
  129 + end;
  130 +
  131 + procedure ReadBuiltInIndividualMessage;
  132 + begin
  133 + Result := '$NICNAME';
  134 + case FResult of
  135 + -MaxInt..-2: Result += #32+'perdeu'+#32+Self.AsString+#32+'pontos';
  136 + -1 : Result += #32+'perdeu'+#32+Self.AsString+#32+'ponto';
  137 + 0 : Result += #32+'não perdeu nem ganhou pontos';
  138 + 1 : Result += #32+'ganhou'+#32+Self.AsString+#32+'ponto';
  139 + 2..MaxInt: Result += #32+'ganhou'+#32+Self.AsString+#32+'pontos';
  140 + end;
  141 + Result += '.';
  142 + end;
  143 +
118 144 begin
119   - if IsGroupPoint then
  145 + if (APrependLoss = '') and (AAppendiceLossSingular = '') and (AAppendiceLossPlural = '') and
  146 + (APrependEarn = '') and (AAppendiceEarnSingular = '') and (AAppendiceEarnPlural = '') and
  147 + (AAppendiceZero = '') and (APrepend <> '') then
120 148 begin
121   - if APrepend = '' then
122   - Result := 'Vocês'
123   - else
124   - Result := APrepend;
125   -
126   - if (APrependLoss = '') or (AAppendiceLossSingular = '') or (AAppendiceLossPlural = '') or
127   - (APrependEarn = '') or (AAppendiceEarnSingular = '') or (AAppendiceEarnPlural = '') or
128   - (AAppendiceZero = '') then
129   - begin
130   - case FResult of
131   - -MaxInt..-2: Result += #32+'retiraram'+#32+Self.AsString+#32+'itens escolares de uma escola pública';
132   - -1 : Result += #32+'retiraram'+#32+Self.AsString+#32+'item escolar de uma escola pública';
133   - 0 : Result += #32+'não doaram e nem retiraram itens escolares';
134   - 1 : Result += #32+'doaram'+#32+Self.AsString+#32+'item escolar a uma escola pública';
135   - 2..MaxInt: Result += #32+'doaram'+#32+Self.AsString+#32+'itens escolares a uma escola pública';
136   - end;
137   - end
138   - else
139   - ReadCustomMessage;
140   - end
141   - else
  149 + Result := APrepend;
  150 + Exit;
  151 + end;
  152 +
  153 + if (APrependLoss <> '') and (AAppendiceLossSingular <> '') and (AAppendiceLossPlural <> '') and
  154 + (APrependEarn <> '') and (AAppendiceEarnSingular <> '') and (AAppendiceEarnPlural <> '') and
  155 + (AAppendiceZero <> '') and (APrepend <> '') then
142 156 begin
143   - if APrepend = '' then
144   - Result := 'Alguém'
145   - else
146   - Result := APrepend;
147   -
148   - if (APrependLoss = '') or (AAppendiceLossSingular = '') or (AAppendiceLossPlural = '') or
149   - (APrependEarn = '') or (AAppendiceEarnSingular = '') or (AAppendiceEarnPlural = '') or
150   - (AAppendiceZero = '') then
151   - begin
152   - case FResult of
153   - -MaxInt..-2: Result += #32+'perdeu'+#32+Self.AsString+#32+'pontos';
154   - -1 : Result += #32+'perdeu'+#32+Self.AsString+#32+'ponto';
155   - 0 : Result += #32+'não perdeu nem ganhou pontos';
156   - 1 : Result += #32+'ganhou'+#32+Self.AsString+#32+'ponto';
157   - 2..MaxInt: Result += #32+'ganhou'+#32+Self.AsString+#32+'pontos';
158   - end;
159   - end
160   - else
161   - ReadCustomMessage;
  157 + ReadCustomMessage;
  158 + Exit;
162 159 end;
163   - Result += '.';
  160 +
  161 + if (APrependLoss = '') and (AAppendiceLossSingular = '') and (AAppendiceLossPlural = '') and
  162 + (APrependEarn = '') and (AAppendiceEarnSingular = '') and (AAppendiceEarnPlural = '') and
  163 + (AAppendiceZero = '') and (APrepend = '') then
  164 + begin
  165 + if IsGroupPoint then
  166 + ReadBuiltInGroupMessage
  167 + else
  168 + ReadBuiltInIndividualMessage;
  169 + end;
164 170 end;
165 171  
166 172  
... ...
units/game_resources.pas
... ... @@ -74,8 +74,13 @@ resourcestring
74 74 KEY_CRITERIA = '.Resposta';
75 75 KEY_CONSEQUE = '.Consequência'; // A,B,G,CSQCODE
76 76 KEY_CONSEQUE_MESSAGE_PREPEND = '.Consequência.Mensagem.Prefixo';
77   - KEY_CONSEQUE_MESSAGE_APPENDS = '.Consequência.Mensagem.Sufixo.Singular';
78   - KEY_CONSEQUE_MESSAGE_APPENDP = '.Consequência.Mensagem.Sufixo.Plural';
  77 + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS = '.Consequência.Mensagem.Prefixo_ao_perder';
  78 + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S = '.Consequência.Mensagem.Sufixo_ao_perder.Singular';
  79 + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P = '.Consequência.Mensagem.Sufixo_ao_perder.Plural';
  80 + KEY_CONSEQUE_MESSAGE_PREPEND_EARN = '.Consequência.Mensagem.Prefixo_ao_ganhar';
  81 + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S = '.Consequência.Mensagem.Sufixo_ao_ganhar.Singular';
  82 + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P = '.Consequência.Mensagem.Sufixo_ao_ganhar.Plural';
  83 + KEY_CONSEQUE_MESSAGE_APPEND_ZERO = '.Consequência.Mensagem.Sufixo_zero';
79 84  
80 85 VAL_CONSEQUENCE = 'Cosequência';
81 86 VAL_RESEARCHER = 'Pesquisador';
... ...