From 84ecb7380151c05922da910fdd6146e4199b41ee Mon Sep 17 00:00:00 2001 From: cpicanco Date: Thu, 22 Dec 2016 20:38:48 -0300 Subject: [PATCH] improve popup customization --- experiment_designer/form_main.lfm | 454 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------ experiment_designer/form_main.pas | 241 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------- units/game_actors_point.pas | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------- units/game_resources.pas | 9 +++++++-- 4 files changed, 538 insertions(+), 262 deletions(-) diff --git a/experiment_designer/form_main.lfm b/experiment_designer/form_main.lfm index 9c092c9..310c633 100644 --- a/experiment_designer/form_main.lfm +++ b/experiment_designer/form_main.lfm @@ -1,27 +1,27 @@ object FormDesigner: TFormDesigner - Left = 291 - Height = 635 - Top = 44 - Width = 656 - HorzScrollBar.Page = 315 - VertScrollBar.Page = 615 + Left = 127 + Height = 712 + Top = 29 + Width = 674 + HorzScrollBar.Page = 387 + VertScrollBar.Page = 693 AutoScroll = True Caption = 'Planejar Experimento' - ClientHeight = 615 - ClientWidth = 639 + ClientHeight = 693 + ClientWidth = 664 Menu = MainMenu1 OnActivate = FormActivate OnCreate = FormCreate OnDestroy = FormDestroy - 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' + 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' ShowHint = True LCLVersion = '1.6.2.0' object PageControl: TPageControl Left = 0 - Height = 726 + Height = 825 Top = 0 - Width = 639 - ActivePage = TabSheetExperiment + Width = 664 + ActivePage = TabSheetContingencies Align = alClient TabIndex = 2 TabOrder = 0 @@ -32,54 +32,54 @@ object FormDesigner: TFormDesigner ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 698 - ClientWidth = 631 + ClientHeight = 792 + ClientWidth = 658 object LabelResearcherName: TLabel Left = 0 Height = 15 Top = 10 - Width = 631 + Width = 640 Caption = 'Nome do Pesquisador' ParentColor = False end object EditResearcherName: TEdit Left = 0 - Height = 23 + Height = 25 Hint = 'Uma pasta será criada com o seu nome. Os seus experimentos serão salvos dentro dela.' Top = 30 - Width = 631 + Width = 640 TabOrder = 0 end object LabelExperimentName: TLabel Left = 0 Height = 15 - Top = 58 - Width = 631 + Top = 60 + Width = 640 Caption = 'Nome do Experimento' ParentColor = False end object EditExperimentName: TEdit Left = 0 - Height = 23 + Height = 25 Hint = 'Uma pasta será criada com o nome do experimento. Os dados desse experimento serão salvos dentro dela.' - Top = 78 - Width = 631 + Top = 80 + Width = 640 TabOrder = 1 end object GBExperimentAim: TGroupBox Left = 0 - Height = 162 - Top = 106 - Width = 631 + Height = 159 + Top = 110 + Width = 640 Caption = 'Objetivo do Experimento' ClientHeight = 142 - ClientWidth = 627 + ClientWidth = 636 TabOrder = 2 object MemoExperimentAim: TMemo Left = 0 Height = 142 Top = 0 - Width = 627 + Width = 636 Align = alCustom Anchors = [akTop, akLeft, akRight] TabOrder = 0 @@ -87,10 +87,10 @@ object FormDesigner: TFormDesigner end object CGGlobal: TCheckGroup Left = 0 - Height = 108 + Height = 113 Hint = 'Aplicáveis ao longo de todo o experimento' - Top = 273 - Width = 631 + Top = 274 + Width = 640 AutoFill = True Caption = 'Configurações globais' ChildSizing.LeftRightSpacing = 6 @@ -101,8 +101,8 @@ object FormDesigner: TFormDesigner ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 88 - ClientWidth = 627 + ClientHeight = 96 + ClientWidth = 636 Items.Strings = ( 'Enviar histórico do bate-papo a novos participantes' 'Gerar participantes automaticamente' @@ -116,9 +116,9 @@ object FormDesigner: TFormDesigner end object RGPoints: TRadioGroup Left = 0 - Height = 58 - Top = 386 - Width = 631 + Height = 59 + Top = 392 + Width = 640 AutoFill = True Caption = 'Tipo de pontuação' ChildSizing.LeftRightSpacing = 6 @@ -128,8 +128,8 @@ object FormDesigner: TFormDesigner ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 38 - ClientWidth = 627 + ClientHeight = 42 + ClientWidth = 636 ItemIndex = 0 Items.Strings = ( 'A e B' @@ -140,21 +140,21 @@ object FormDesigner: TFormDesigner end object GBMatrix: TGroupBox Left = 0 - Height = 134 - Top = 449 - Width = 631 + Height = 143 + Top = 456 + Width = 640 Caption = 'Tipo da Matrix' ChildSizing.LeftRightSpacing = 5 ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 114 - ClientWidth = 627 + ClientHeight = 126 + ClientWidth = 636 TabOrder = 6 object ChkColors: TCheckBox Left = 5 - Height = 19 + Height = 21 Top = 0 - Width = 215 + Width = 239 Caption = '5 cores' Checked = True Enabled = False @@ -163,9 +163,9 @@ object FormDesigner: TFormDesigner end object ChkRows: TCheckBox Left = 5 - Height = 19 - Top = 19 - Width = 215 + Height = 21 + Top = 21 + Width = 239 Caption = '10 linhas' Checked = True Enabled = False @@ -174,35 +174,35 @@ object FormDesigner: TFormDesigner end object ChkCols: TCheckBox Left = 5 - Height = 19 - Top = 38 - Width = 215 + Height = 21 + Top = 42 + Width = 239 Caption = '10 colunas' TabOrder = 2 end object ChkDots: TCheckBox Left = 5 - Height = 19 - Top = 57 - Width = 215 + Height = 21 + Top = 63 + Width = 239 Caption = 'Com Círculos Preechidos' OnChange = ChkDotsChange TabOrder = 3 end object ChkCleanDots: TCheckBox Left = 5 - Height = 19 - Top = 76 - Width = 215 + Height = 21 + Top = 84 + Width = 239 Caption = 'Com Círculos Vazados' OnChange = ChkCleanDotsChange TabOrder = 4 end object ChkDotsCleanDots: TCheckBox Left = 5 - Height = 19 - Top = 95 - Width = 215 + Height = 21 + Top = 105 + Width = 239 Caption = 'Com Círculos Vazados e Preenchidos' OnChange = ChkDotsCleanDotsChange TabOrder = 5 @@ -210,22 +210,23 @@ object FormDesigner: TFormDesigner end object GBConditions: TGroupBox Left = 0 - Height = 100 - Top = 588 - Width = 631 + Height = 97 + Top = 604 + Width = 640 Caption = 'Condições' ClientHeight = 80 - ClientWidth = 627 + ClientWidth = 636 TabOrder = 5 object ListBoxConditions: TListBox Left = 0 Height = 80 Top = 0 - Width = 627 + Width = 636 Anchors = [akTop, akLeft, akRight] ItemHeight = 0 ScrollWidth = 634 TabOrder = 0 + TopIndex = -1 end end end @@ -236,14 +237,14 @@ object FormDesigner: TFormDesigner ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 583 - ClientWidth = 650 + ClientHeight = 792 + ClientWidth = 658 object ComboCurrentCondition: TComboBox Left = 0 Height = 23 Top = 10 Width = 640 - ItemHeight = 15 + ItemHeight = 0 OnChange = ComboCurrentConditionChange Style = csDropDownList TabOrder = 0 @@ -371,7 +372,7 @@ object FormDesigner: TFormDesigner ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 144 + ClientHeight = 147 ClientWidth = 636 TabOrder = 5 object CheckBoxShouldAskQuestion: TCheckBox @@ -416,7 +417,7 @@ object FormDesigner: TFormDesigner ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 51 + ClientHeight = 54 ClientWidth = 532 Items.Strings = ( 'Reverter consequências das metacontingências e contingências' @@ -444,7 +445,7 @@ object FormDesigner: TFormDesigner ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 60 + ClientHeight = 63 ClientWidth = 636 ItemIndex = 2 Items.Strings = ( @@ -466,7 +467,7 @@ object FormDesigner: TFormDesigner ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 89 + ClientHeight = 92 ClientWidth = 636 TabOrder = 7 object LabelEndCriteriaAbsCycles: TLabel @@ -496,7 +497,7 @@ object FormDesigner: TFormDesigner ChildSizing.HorizontalSpacing = 5 ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 4 - ClientHeight = 22 + ClientHeight = 25 ClientWidth = 532 TabOrder = 1 object SpinEditEndCriteriaInterlockingPorcentage: TSpinEdit @@ -547,7 +548,7 @@ object FormDesigner: TFormDesigner Top = 641 Width = 640 Caption = 'Contingências e Metacontingências' - ClientHeight = 77 + ClientHeight = 80 ClientWidth = 636 TabOrder = 8 object ListBoxContingencies: TListBox @@ -559,6 +560,7 @@ object FormDesigner: TFormDesigner ItemHeight = 0 ScrollWidth = 634 TabOrder = 0 + TopIndex = -1 end end end @@ -569,14 +571,14 @@ object FormDesigner: TFormDesigner ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 583 - ClientWidth = 650 + ClientHeight = 792 + ClientWidth = 658 Enabled = False object RGContingencyType: TRadioGroup Left = 0 Height = 59 Top = 10 - Width = 650 + Width = 658 AutoFill = True Caption = 'Mostrar' ChildSizing.LeftRightSpacing = 6 @@ -586,8 +588,8 @@ object FormDesigner: TFormDesigner ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 39 - ClientWidth = 646 + ClientHeight = 42 + ClientWidth = 654 Items.Strings = ( 'Contingências Operantes' 'Metacontingências' @@ -597,10 +599,10 @@ object FormDesigner: TFormDesigner end object ComboCurrentContingency: TComboBox Left = 0 - Height = 23 + Height = 27 Top = 74 - Width = 650 - ItemHeight = 15 + Width = 658 + ItemHeight = 0 OnChange = ComboCurrentContingencyChange Style = csDropDownList TabOrder = 0 @@ -609,38 +611,38 @@ object FormDesigner: TFormDesigner Left = 0 Height = 26 Top = 106 - Width = 650 + Width = 658 ChildSizing.LeftRightSpacing = 25 ChildSizing.HorizontalSpacing = 50 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 3 ClientHeight = 26 - ClientWidth = 650 + ClientWidth = 658 TabOrder = 1 object BtnAppendContingency: TButton Left = 25 Height = 25 Top = 0 - Width = 166 + Width = 168 Caption = 'Adicionar' OnClick = BtnAppendContingencyClick TabOrder = 0 end object BtnRemoveContingency: TButton - Left = 241 + Left = 243 Height = 25 Top = 0 - Width = 163 + Width = 165 Caption = 'Remover' OnClick = BtnRemoveContingencyClick TabOrder = 1 end object BtnReorderContingency: TButton - Left = 454 + Left = 458 Height = 25 Top = 0 - Width = 171 + Width = 175 Caption = 'Reordenar' OnClick = BtnReorderContingencyClick TabOrder = 2 @@ -650,7 +652,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 15 Top = 137 - Width = 650 + Width = 658 Caption = 'Nome da contingência' ParentColor = False end @@ -658,7 +660,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 25 Top = 157 - Width = 650 + Width = 658 OnEditingDone = EditContingencyNameEditingDone TabOrder = 2 end @@ -666,7 +668,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 122 Top = 187 - Width = 650 + Width = 658 AutoFill = True Caption = 'Estilo da Resposta' ChildSizing.LeftRightSpacing = 6 @@ -676,8 +678,8 @@ object FormDesigner: TFormDesigner ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 1 - ClientHeight = 102 - ClientWidth = 646 + ClientHeight = 105 + ClientWidth = 654 ItemIndex = 0 Items.Strings = ( 'Extinção' @@ -694,7 +696,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 15 Top = 314 - Width = 650 + Width = 658 Alignment = taCenter Caption = 'SE O PARTICIPANTE ESCOLHER' ParentColor = False @@ -704,7 +706,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 17 Top = 334 - Width = 650 + Width = 658 Caption = 'Linhas' ChildSizing.LeftRightSpacing = 5 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize @@ -717,7 +719,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 15 Top = 356 - Width = 650 + Width = 658 Alignment = taCenter Caption = 'E' ParentColor = False @@ -727,7 +729,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 17 Top = 376 - Width = 650 + Width = 658 Caption = 'Cores' ChildSizing.HorizontalSpacing = 5 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize @@ -740,7 +742,7 @@ object FormDesigner: TFormDesigner Left = 0 Height = 15 Top = 398 - Width = 650 + Width = 658 Alignment = taCenter Caption = 'ENTÃO' ParentColor = False @@ -748,105 +750,221 @@ object FormDesigner: TFormDesigner end object GBContingencyConsequence: TGroupBox Left = 0 - Height = 59 + Height = 364 Top = 418 - Width = 650 + Width = 658 Caption = 'Consequência' ChildSizing.EnlargeHorizontal = crsHomogenousChildResize - ChildSizing.Layout = cclTopToBottomThenLeftToRight + ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 2 - ClientHeight = 39 - ClientWidth = 646 + ClientHeight = 347 + ClientWidth = 654 TabOrder = 6 Visible = False - object LabelC6: TLabel + object LabelCsq1: TLabel Left = 0 Height = 15 Top = 0 - Width = 154 - Caption = 'do Tipo' + Width = 416 + Caption = 'Pontos' ParentColor = False end - object CBPointsType: TComboBox - Left = 0 - Height = 23 - Top = 15 - Width = 154 - ItemHeight = 15 - OnChange = ConsequenceStyleChange - Style = csDropDownList - TabOrder = 4 - end - object LabelC1: TLabel - Left = 154 + object LabelCsq2: TLabel + Left = 416 Height = 15 Top = 0 - Width = 134 - Caption = 'Prefixo' - ParentColor = False - end - object EditMessPrefix: TEdit - Left = 154 - Height = 27 - Top = 15 - Width = 134 - TabOrder = 0 - Text = '$NICNAME produziu' - end - object LabelC4: TLabel - Left = 288 - Height = 15 - Top = 0 - Width = 104 - Caption = 'Pontos' + Width = 238 + Caption = 'do Tipo' ParentColor = False end object SpinEditContingencyPoints: TSpinEdit - Left = 288 + Left = 0 Height = 27 Top = 15 - Width = 104 + Width = 416 MaxValue = 0 OnEditingDone = ConsequenceStyleChange - TabOrder = 2 + TabOrder = 0 Value = 1 end - object LabelC2: TLabel - Left = 392 - Height = 15 - Top = 0 - Width = 134 - Caption = 'Sufixo' - ParentColor = False - end - object EditMessSufix: TEdit - Left = 392 + object CBPointsType: TComboBox + Left = 416 Height = 27 - Hint = 'singular|plural' Top = 15 - Width = 134 + Width = 238 + ItemHeight = 0 + OnChange = ConsequenceStyleChange + Style = csDropDownList TabOrder = 1 - Text = 'ponto.|pontos.' end - object LabelC5: TLabel - Left = 526 - Height = 15 - Top = 0 - Width = 120 - Caption = 'Apresentar' + object RGBroadcastMessage: TRadioGroup + Left = 0 + Height = 80 + Top = 42 + Width = 416 + AutoFill = True + Caption = 'Apresentar mensagem de notificação' + ChildSizing.Layout = cclLeftToRightThenTopToBottom + ChildSizing.ControlsPerLine = 1 + ClientHeight = 63 + ClientWidth = 412 + ItemIndex = 0 + Items.Strings = ( + 'a todos os participantes' + 'apenas ao participante alvo da pontuação' + 'Não apresentar mensagem de notificação' + ) + OnClick = RGBroadcastMessageClick + TabOrder = 9 + end + object CheckBoxImutableMessage: TCheckBox + Left = 416 + Height = 80 + 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.' + Top = 42 + Width = 238 + AutoSize = False + Caption = 'imutável' + OnChange = CheckBoxImutableMessageChange + TabOrder = 10 + end + object LabelCsq3: TLabel + Left = 0 + Height = 25 + Top = 122 + Width = 416 + Caption = 'Texto no início da mensagem' ParentColor = False end - object CheckBoxBroadcast: TCheckBox - Left = 526 - Height = 27 - Top = 15 - Width = 120 - AllowGrayed = True - Caption = 'a todos' - Checked = True - OnChange = CheckBoxBroadcastChange - State = cbChecked + object EditMessPrefix: TEdit + Left = 416 + Height = 25 + Top = 122 + Width = 238 + TabOrder = 2 + Text = '$NICNAME' + end + object LabelCsq4: TLabel + Left = 0 + Height = 25 + Top = 147 + Width = 416 + Caption = 'Prefixo ao perder pontos' + ParentColor = False + end + object EditMessPrefixLoss: TEdit + Left = 416 + Height = 25 + Top = 147 + Width = 238 TabOrder = 3 + Text = 'perdeu' + end + object LabelCsq5: TLabel + Left = 0 + Height = 25 + Top = 172 + Width = 416 + Caption = 'Sufixo ao perder pontos (Singular)' + ParentColor = False + end + object EditMessSufixLossSingular: TEdit + Left = 416 + Height = 25 + Top = 172 + Width = 238 + TabOrder = 4 + Text = 'ponto.' + end + object LabelCsq6: TLabel + Left = 0 + Height = 25 + Top = 197 + Width = 416 + Caption = 'Sufixo ao perder pontos (Plural)' + ParentColor = False + end + object EditMessSufixLossPlural: TEdit + Left = 416 + Height = 25 + Top = 197 + Width = 238 + TabOrder = 5 + Text = 'pontos.' + end + object LabelCsq7: TLabel + Left = 0 + Height = 25 + Top = 222 + Width = 416 + Caption = 'Prefixo ao ganhar pontos' + ParentColor = False + end + object EditMessPrefixEarn: TEdit + Left = 416 + Height = 25 + Top = 222 + Width = 238 + TabOrder = 6 + Text = 'ganhou' + end + object LabelCsq8: TLabel + Left = 0 + Height = 25 + Top = 247 + Width = 416 + Caption = 'Sufixo ao ganhar pontos (Singular)' + ParentColor = False + end + object EditMessSufixEarnSingular: TEdit + Left = 416 + Height = 25 + Top = 247 + Width = 238 + TabOrder = 7 + Text = 'ponto.' + end + object LabelCsq9: TLabel + Left = 0 + Height = 25 + Top = 272 + Width = 416 + Caption = 'Sufixo ao ganhar pontos (Plural)' + ParentColor = False + end + object EditMessSufixEarnPlural: TEdit + Left = 416 + Height = 25 + Top = 272 + Width = 238 + TabOrder = 8 + Text = 'pontos.' + end + object LabelCsq10: TLabel + Left = 0 + Height = 25 + Top = 297 + Width = 416 + Caption = 'Sufixo ao ganhar pontos (Plural)' + ParentColor = False + end + object EditMessSufixZero: TEdit + Left = 416 + Height = 25 + Top = 297 + Width = 238 + OnChange = EditMessSufixZeroChange + TabOrder = 11 + Text = 'não ganhou nem perdeu pontos.' + end + object ButtonPreviewMessage: TButton + Left = 0 + Height = 25 + Top = 322 + Width = 416 + Caption = 'Ver como a mensagem pode ser apresentada' + OnClick = ButtonPreviewMessageClick + TabOrder = 12 end end end diff --git a/experiment_designer/form_main.pas b/experiment_designer/form_main.pas index c206e50..e873a01 100644 --- a/experiment_designer/form_main.pas +++ b/experiment_designer/form_main.pas @@ -15,7 +15,8 @@ interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, - Menus, ExtCtrls, StdCtrls, XMLPropStorage, IniFiles, Spin, PropertyStorage; + Menus, ExtCtrls, StdCtrls, XMLPropStorage, IniFiles, Spin, PropertyStorage, + PopupNotifier; type @@ -28,22 +29,29 @@ type BtnRemoveContingency: TButton; BtnReorderCond: TButton; BtnReorderContingency: TButton; + ButtonPreviewMessage: TButton; CGGlobal: TCheckGroup; + CheckBoxImutableMessage: TCheckBox; ChkDotsCleanDots: TCheckBox; ChkColors: TCheckBox; ChkRows: TCheckBox; ChkCols: TCheckBox; ChkDots: TCheckBox; ChkCleanDots: TCheckBox; - CheckBoxBroadcast: TCheckBox; CheckBoxShouldAskQuestion: TCheckBox; CGQuestion: TCheckGroup; CBPointsType: TComboBox; ComboCurrentCondition: TComboBox; ComboCurrentContingency: TComboBox; - EditMessPrefix: TEdit; - EditMessSufix: TEdit; EditContingencyName: TEdit; + EditMessPrefix: TEdit; + EditMessSufixEarnPlural: TEdit; + EditMessPrefixEarn: TEdit; + EditMessSufixZero: TEdit; + EditMessPrefixLoss: TEdit; + EditMessSufixLossSingular: TEdit; + EditMessSufixLossPlural: TEdit; + EditMessSufixEarnSingular: TEdit; EditQuestion: TEdit; EditConditionName: TEdit; EditExperimentName: TEdit; @@ -58,13 +66,18 @@ type GBContingencyRows: TGroupBox; GBContingencyConsequence: TGroupBox; GBMatrix: TGroupBox; + LabelCsq10: TLabel; + LabelCsq3: TLabel; + LabelCsq5: TLabel; + LabelCsq8: TLabel; + LabelCsq6: TLabel; + LabelCsq9: TLabel; + LabelCsq4: TLabel; + LabelCsq7: TLabel; LabelQuestion: TLabel; LabelPointsOnConditionBegin: TLabel; - LabelC1: TLabel; - LabelC2: TLabel; - LabelC4: TLabel; - LabelC5: TLabel; - LabelC6: TLabel; + LabelCsq1: TLabel; + LabelCsq2: TLabel; LabelThen: TLabel; LabelOperator: TLabel; LabelContingencyName: TLabel; @@ -89,6 +102,7 @@ type PageControl: TPageControl; PanelConditionButtons: TPanel; PanelContingenciesButtons: TPanel; + RGBroadcastMessage: TRadioGroup; RGContingencyType: TRadioGroup; RGContingencyStyle: TRadioGroup; RGEndCriteriaStyle: TRadioGroup; @@ -110,13 +124,14 @@ type procedure BtnRemoveContingencyClick(Sender: TObject); procedure BtnReorderCondClick(Sender: TObject); procedure BtnReorderContingencyClick(Sender: TObject); + procedure ButtonPreviewMessageClick(Sender: TObject); + procedure CheckBoxImutableMessageChange(Sender: TObject); procedure ChkDotsCleanDotsChange(Sender: TObject); // procedure ConsequenceMessageEditingDone(Sender: TObject); procedure ConsequenceStyleChange(Sender: TObject); procedure CGQuestionItemClick(Sender: TObject; Index: integer); - procedure CheckBoxBroadcastChange(Sender: TObject); procedure CheckBoxColorsRowsChange(Sender: TObject); procedure CheckBoxShouldAskQuestionChange(Sender: TObject); procedure ChkCleanDotsChange(Sender: TObject); @@ -125,12 +140,14 @@ type procedure ComboCurrentContingencyChange(Sender: TObject); procedure EditConditionNameEditingDone(Sender: TObject); procedure EditContingencyNameEditingDone(Sender: TObject); + procedure EditMessSufixZeroChange(Sender: TObject); procedure EditQuestionEditingDone(Sender: TObject); procedure FormActivate(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure MenuItemExitClick(Sender: TObject); procedure MenuItemOpenClick(Sender: TObject); + procedure RGBroadcastMessageClick(Sender: TObject); procedure RGContingencyStyleClick(Sender: TObject); procedure RGContingencyStyleExit(Sender: TObject); @@ -187,7 +204,7 @@ var implementation -uses game_resources, game_actors, string_methods, strutils; +uses game_resources, game_actors, game_actors_point, string_methods, strutils; {$R *.lfm} @@ -205,6 +222,35 @@ begin end; end; +procedure TFormDesigner.RGBroadcastMessageClick(Sender: TObject); +var + LVisible : Boolean; +begin + case RGBroadcastMessage.ItemIndex of + 0,1: LVisible := True; + 2 : LVisible := False; + end; + CheckBoxImutableMessage.Visible := LVisible; + LabelCsq3.Visible := LVisible; + LabelCsq4.Visible := LVisible; + LabelCsq5.Visible := LVisible; + LabelCsq6.Visible := LVisible; + LabelCsq7.Visible := LVisible; + LabelCsq8.Visible := LVisible; + LabelCsq9.Visible := LVisible; + LabelCsq10.Visible := LVisible; + EditMessPrefix.Visible := LVisible; + EditMessPrefixLoss.Visible:= LVisible; + EditMessSufixLossPlural.Visible:= LVisible; + EditMessSufixLossSingular.Visible:= LVisible; + EditMessPrefixEarn.Visible:= LVisible; + EditMessSufixEarnPlural.Visible:= LVisible; + EditMessSufixEarnSingular.Visible:= LVisible; + EditMessSufixZero.Visible:= LVisible; + ButtonPreviewMessage.Visible:=LVisible; + ConsequenceStyleChange(RGBroadcastMessage); +end; + procedure TFormDesigner.RGContingencyStyleClick(Sender: TObject); var LVisible: boolean; @@ -716,19 +762,14 @@ begin // end; if gscBroadcastMessage in CS then - CheckBoxBroadcast.State := cbChecked + RGBroadcastMessage.ItemIndex := 0 else if gscMessage in CS then - CheckBoxBroadcast.State := cbGrayed + RGBroadcastMessage.ItemIndex := 1 else - CheckBoxBroadcast.State := cbUnchecked; + RGBroadcastMessage.ItemIndex := 2; - case CheckBoxBroadcast.State of - cbChecked: CheckBoxBroadcast.Caption := 'a todos'; - cbUnchecked: CheckBoxBroadcast.Caption := 'ao participante'; - cbGrayed: CheckBoxBroadcast.Caption := 'a ninguém'; - end; end; procedure TFormDesigner.UpdateContingencyList(ASection: String); @@ -854,15 +895,21 @@ begin WriteString(ASection, AContingency + KEY_CRITERIA, GetContingencyCriteria); WriteString(ASection, AContingency + KEY_CONSEQUE, GetConsequenceStyle); WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND, EditMessPrefix.Text); - try - WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDS, ExtractDelimited(1,EditMessSufix.Text,['|'])); - WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDP, ExtractDelimited(2,EditMessSufix.Text,['|'])); - except - on E: Exception do - Exit; - //if E.Message = 'E'; - end; + if EditMessPrefixLoss.Text <> '' then + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS,EditMessPrefixLoss.Text); + if EditMessSufixLossSingular.Text <> '' then + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S,EditMessSufixLossSingular.Text); + if EditMessSufixLossPlural.Text <> '' then + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P,EditMessSufixLossPlural.Text); + if EditMessPrefixEarn.Text <> '' then + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_EARN,EditMessPrefixEarn.Text); + if EditMessSufixEarnSingular.Text <> '' then + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S,EditMessSufixEarnSingular.Text); + if EditMessSufixEarnPlural.Text <> '' then + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P,EditMessSufixEarnPlural.Text); + if EditMessSufixZero.Text <> '' then + WriteString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_ZERO, EditMessSufixZero.Text); end; end; @@ -874,8 +921,13 @@ begin DeleteKey(ASection, AContingency + KEY_CRITERIA); DeleteKey(ASection, AContingency + KEY_CONSEQUE); DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND); - DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDS); - DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDP); + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS); + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S); + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P); + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_EARN); + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S); + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P); + DeleteKey(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_ZERO); end; end; @@ -968,10 +1020,10 @@ begin end; end; - case CheckBoxBroadcast.State of - cbChecked : CS += [gscBroadcastMessage]; - cbUnchecked: { do nothing }; - cbGrayed: CS -= [gscMessage]; + case RGBroadcastMessage.ItemIndex of + 0 : CS += [gscBroadcastMessage]; + 1: { do nothing }; + 2: CS -= [gscMessage]; end; Result := IntToStr(SpinEditContingencyPoints.Value)+',0|'; @@ -1090,8 +1142,20 @@ begin SetContingencyCriteria(ReadString(ASection, AContingency + KEY_CRITERIA, '')); SetConsequenceStyle(ReadString(ASection, AContingency + KEY_CONSEQUE, '')); EditMessPrefix.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND,''); - EditMessSufix.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDS,'')+'|'+ - ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPENDP,''); + EditMessPrefixLoss.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS,''); + EditMessSufixLossSingular.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S,''); + EditMessSufixLossPlural.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P,''); + EditMessPrefixEarn.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_PREPEND_EARN,''); + EditMessSufixEarnSingular.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S,''); + EditMessSufixEarnPlural.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P,''); + EditMessSufixZero.Text := ReadString(ASection, AContingency + KEY_CONSEQUE_MESSAGE_APPEND_ZERO, ''); + + if (EditMessPrefixLoss.Text = '') and (EditMessSufixLossSingular.Text = '') and (EditMessSufixLossPlural.Text = '') and + (EditMessPrefixEarn.Text = '') and (EditMessSufixEarnSingular.Text = '') and (EditMessSufixEarnPlural.Text = '') and + (EditMessSufixZero.Text = '') then + CheckBoxImutableMessage.Checked := True + else + CheckBoxImutableMessage.Checked := False; end; end; @@ -1215,6 +1279,11 @@ begin end; end; +procedure TFormDesigner.EditMessSufixZeroChange(Sender: TObject); +begin + +end; + procedure TFormDesigner.ConsequenceMessageEditingDone(Sender: TObject); var LS, LC: String; @@ -1241,16 +1310,6 @@ begin FLoading := False; end; -procedure TFormDesigner.CheckBoxBroadcastChange(Sender: TObject); -begin - case TCheckBox(Sender).State of - cbChecked: TCheckBox(Sender).Caption := 'a todos'; - cbUnchecked: TCheckBox(Sender).Caption := 'ao participante'; - cbGrayed: TCheckBox(Sender).Caption := 'a ninguém'; - end; - ConsequenceStyleChange(CheckBoxBroadcast); -end; - procedure TFormDesigner.BtnAppendCondClick(Sender: TObject); var @@ -1355,8 +1414,13 @@ var Keys.Values[LC + KEY_CRITERIA] := ReadString(LS, LC + KEY_CRITERIA,''); Keys.Values[LC + KEY_CONSEQUE] := ReadString(LS, LC + KEY_CONSEQUE,''); Keys.Values[LC + KEY_CONSEQUE_MESSAGE_PREPEND] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_PREPEND,''); - Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPENDS] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPENDS,''); - Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPENDP] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPENDP,''); + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS,''); + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S,''); + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P,''); + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_PREPEND_EARN] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_PREPEND_EARN,''); + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S,''); + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P,''); + Keys.Values[LC + KEY_CONSEQUE_MESSAGE_APPEND_ZERO] := ReadString(LS, LC + KEY_CONSEQUE_MESSAGE_APPEND_ZERO,''); end; Keys.EndUpdate; end; @@ -1427,6 +1491,89 @@ begin ShowMessage('Não implementado.'); end; +procedure TFormDesigner.ButtonPreviewMessageClick(Sender: TObject); +var + LGamePoint : TGamePoint; + LMessage : TPopupNotifier; + i: Integer; + procedure CreateMessage(AValue : integer = 0); + begin + if CheckBoxImutableMessage.Checked then + LGamePoint := TGamePoint.Create(Nil,IntToStr(SpinEditContingencyPoints.Value)) + else + LGamePoint := TGamePoint.Create(Nil,IntToStr(AValue)); + LMessage := TPopupNotifier.Create(nil); + LMessage.Title := ''; + LMessage.Color := clTeal; + LMessage.Text := LGamePoint.PointMessage(EditMessPrefix.Text, + EditMessPrefixLoss.Text,EditMessSufixLossSingular.Text,EditMessSufixLossPlural.Text, + EditMessPrefixEarn.Text,EditMessSufixEarnSingular.Text,EditMessSufixEarnPlural.Text, + EditMessSufixZero.Text, + RGContingencyType.ItemIndex = 1); + LMessage.ShowAtPos( + (Screen.Width div 2)-150,(Screen.Height div 2)-50); + end; + +begin + if CheckBoxImutableMessage.Checked then + CreateMessage + else + for i := -2 to 2 do + CreateMessage(i); +end; + +procedure TFormDesigner.CheckBoxImutableMessageChange(Sender: TObject); +var + LVisible : Boolean; + LGamePoint : TGamePoint; +begin + LVisible := TCheckBox(Sender).Checked; + if LVisible then + begin + LabelCsq3.Caption := 'Texto da mensagem de notificação'; + LGamePoint := TGamePoint.Create(Self,IntToStr(SpinEditContingencyPoints.Value)); + if not FLoading then + case RGContingencyType.ItemIndex of + 0:EditMessPrefix.Text := LGamePoint.PointMessage('','','','','','','','',False); + 1:EditMessPrefix.Text := LGamePoint.PointMessage('','','','','','','','',True); + end; + LGamePoint.Free; + ButtonPreviewMessage.Caption:= 'Ver como a mensagem será apresentada'; + end + else + begin + LabelCsq3.Caption := 'Texto no início da mensagem'; + if not FLoading then + case RGContingencyType.ItemIndex of + 0:EditMessPrefix.Text := '$NICNAME'; + 1:EditMessPrefix.Text := 'Vocês'; + end; + ButtonPreviewMessage.Caption:= 'Ver como a mensagem pode ser apresentada'; + end; + + LabelCsq4.Visible := not LVisible; + LabelCsq5.Visible := not LVisible; + LabelCsq6.Visible := not LVisible; + LabelCsq7.Visible := not LVisible; + LabelCsq8.Visible := not LVisible; + LabelCsq9.Visible := not LVisible; + LabelCsq10.Visible := not LVisible; + EditMessPrefixLoss.Visible:= not LVisible; + EditMessPrefixLoss.Text := ''; + EditMessSufixLossPlural.Visible:= not LVisible; + EditMessSufixLossPlural.Text := ''; + EditMessSufixLossSingular.Visible:= not LVisible; + EditMessSufixLossSingular.Text := ''; + EditMessPrefixEarn.Visible:= not LVisible; + EditMessPrefixEarn.Text := ''; + EditMessSufixEarnPlural.Visible:= not LVisible; + EditMessSufixEarnPlural.Text := ''; + EditMessSufixEarnSingular.Visible:= not LVisible; + EditMessSufixEarnSingular.Text := ''; + EditMessSufixZero.Visible:= not LVisible; + EditMessSufixZero.Text := ''; +end; + procedure TFormDesigner.ConsequenceStyleChange(Sender: TObject); var diff --git a/units/game_actors_point.pas b/units/game_actors_point.pas index bf2a551..239555a 100644 --- a/units/game_actors_point.pas +++ b/units/game_actors_point.pas @@ -29,7 +29,6 @@ type function GetResultAsString: string; function GetValue: integer; public - //Cycles : integer; // specify when present points regarding condition cycles constructor Create(AOwner:TComponent;AValue : integer);overload; constructor Create(AOwner:TComponent;AValue : array of integer); overload; constructor Create(AOwner:TComponent;AResult : string); overload; @@ -37,17 +36,17 @@ type APrependEarn,AAppendiceEarnSingular,AAppendiceEarnPlural,AAppendiceZero: string; IsGroupPoint: Boolean) : string; property ValueWithVariation : integer read GetValue write FValue; property Variation : integer read FVariation write FVariation; - property AsString : string read GetResultAsString; property ResultAsInteger : integer read GetResult; end; //operator :=(I :integer) : TGamePoint; //operator :=(A : array of integer):TGamePoint; -// + implementation uses strutils; + //operator:=(I: integer):TGamePoint; //begin // Result := ; @@ -106,6 +105,7 @@ function TGamePoint.PointMessage(APrepend, procedure ReadCustomMessage; begin + Result := APrepend; case FResult of -MaxInt..-2: Result += #32+APrependLoss+#32+Self.AsString+#32+AAppendiceLossPlural; -1 : Result += #32+APrependLoss+#32+Self.AsString+#32+AAppendiceLossSingular; @@ -115,52 +115,58 @@ function TGamePoint.PointMessage(APrepend, end; end; + procedure ReadBuiltInGroupMessage; + begin + Result := 'Vocês'; + case FResult of + -MaxInt..-2: Result += #32+'retiraram'+#32+Self.AsString+#32+'itens escolares de uma escola pública'; + -1 : Result += #32+'retiraram'+#32+Self.AsString+#32+'item escolar de uma escola pública'; + 0 : Result += #32+'não doaram e nem retiraram itens escolares'; + 1 : Result += #32+'doaram'+#32+Self.AsString+#32+'item escolar a uma escola pública'; + 2..MaxInt: Result += #32+'doaram'+#32+Self.AsString+#32+'itens escolares a uma escola pública'; + end; + Result += '.'; + end; + + procedure ReadBuiltInIndividualMessage; + begin + Result := '$NICNAME'; + case FResult of + -MaxInt..-2: Result += #32+'perdeu'+#32+Self.AsString+#32+'pontos'; + -1 : Result += #32+'perdeu'+#32+Self.AsString+#32+'ponto'; + 0 : Result += #32+'não perdeu nem ganhou pontos'; + 1 : Result += #32+'ganhou'+#32+Self.AsString+#32+'ponto'; + 2..MaxInt: Result += #32+'ganhou'+#32+Self.AsString+#32+'pontos'; + end; + Result += '.'; + end; + begin - if IsGroupPoint then + if (APrependLoss = '') and (AAppendiceLossSingular = '') and (AAppendiceLossPlural = '') and + (APrependEarn = '') and (AAppendiceEarnSingular = '') and (AAppendiceEarnPlural = '') and + (AAppendiceZero = '') and (APrepend <> '') then begin - if APrepend = '' then - Result := 'Vocês' - else - Result := APrepend; - - if (APrependLoss = '') or (AAppendiceLossSingular = '') or (AAppendiceLossPlural = '') or - (APrependEarn = '') or (AAppendiceEarnSingular = '') or (AAppendiceEarnPlural = '') or - (AAppendiceZero = '') then - begin - case FResult of - -MaxInt..-2: Result += #32+'retiraram'+#32+Self.AsString+#32+'itens escolares de uma escola pública'; - -1 : Result += #32+'retiraram'+#32+Self.AsString+#32+'item escolar de uma escola pública'; - 0 : Result += #32+'não doaram e nem retiraram itens escolares'; - 1 : Result += #32+'doaram'+#32+Self.AsString+#32+'item escolar a uma escola pública'; - 2..MaxInt: Result += #32+'doaram'+#32+Self.AsString+#32+'itens escolares a uma escola pública'; - end; - end - else - ReadCustomMessage; - end - else + Result := APrepend; + Exit; + end; + + if (APrependLoss <> '') and (AAppendiceLossSingular <> '') and (AAppendiceLossPlural <> '') and + (APrependEarn <> '') and (AAppendiceEarnSingular <> '') and (AAppendiceEarnPlural <> '') and + (AAppendiceZero <> '') and (APrepend <> '') then begin - if APrepend = '' then - Result := 'Alguém' - else - Result := APrepend; - - if (APrependLoss = '') or (AAppendiceLossSingular = '') or (AAppendiceLossPlural = '') or - (APrependEarn = '') or (AAppendiceEarnSingular = '') or (AAppendiceEarnPlural = '') or - (AAppendiceZero = '') then - begin - case FResult of - -MaxInt..-2: Result += #32+'perdeu'+#32+Self.AsString+#32+'pontos'; - -1 : Result += #32+'perdeu'+#32+Self.AsString+#32+'ponto'; - 0 : Result += #32+'não perdeu nem ganhou pontos'; - 1 : Result += #32+'ganhou'+#32+Self.AsString+#32+'ponto'; - 2..MaxInt: Result += #32+'ganhou'+#32+Self.AsString+#32+'pontos'; - end; - end - else - ReadCustomMessage; + ReadCustomMessage; + Exit; end; - Result += '.'; + + if (APrependLoss = '') and (AAppendiceLossSingular = '') and (AAppendiceLossPlural = '') and + (APrependEarn = '') and (AAppendiceEarnSingular = '') and (AAppendiceEarnPlural = '') and + (AAppendiceZero = '') and (APrepend = '') then + begin + if IsGroupPoint then + ReadBuiltInGroupMessage + else + ReadBuiltInIndividualMessage; + end; end; diff --git a/units/game_resources.pas b/units/game_resources.pas index bc3c16a..e7835cc 100644 --- a/units/game_resources.pas +++ b/units/game_resources.pas @@ -74,8 +74,13 @@ resourcestring KEY_CRITERIA = '.Resposta'; KEY_CONSEQUE = '.Consequência'; // A,B,G,CSQCODE KEY_CONSEQUE_MESSAGE_PREPEND = '.Consequência.Mensagem.Prefixo'; - KEY_CONSEQUE_MESSAGE_APPENDS = '.Consequência.Mensagem.Sufixo.Singular'; - KEY_CONSEQUE_MESSAGE_APPENDP = '.Consequência.Mensagem.Sufixo.Plural'; + KEY_CONSEQUE_MESSAGE_PREPEND_LOSS = '.Consequência.Mensagem.Prefixo_ao_perder'; + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_S = '.Consequência.Mensagem.Sufixo_ao_perder.Singular'; + KEY_CONSEQUE_MESSAGE_APPEND_LOSS_P = '.Consequência.Mensagem.Sufixo_ao_perder.Plural'; + KEY_CONSEQUE_MESSAGE_PREPEND_EARN = '.Consequência.Mensagem.Prefixo_ao_ganhar'; + KEY_CONSEQUE_MESSAGE_APPEND_EARN_S = '.Consequência.Mensagem.Sufixo_ao_ganhar.Singular'; + KEY_CONSEQUE_MESSAGE_APPEND_EARN_P = '.Consequência.Mensagem.Sufixo_ao_ganhar.Plural'; + KEY_CONSEQUE_MESSAGE_APPEND_ZERO = '.Consequência.Mensagem.Sufixo_zero'; VAL_CONSEQUENCE = 'Cosequência'; VAL_RESEARCHER = 'Pesquisador'; -- libgit2 0.21.2