Skip to content

Commit 8677dfe

Browse files
1. Added multilingual support - if the table has columns for cards in several languages.
2. Word hypenation align="hyphen" (default en-ru, additional [es],[pt],[ua]). 3. For the scale attribute scale="fixed" (instead of the coefficient), which prohibits automatic scaling for this item. Full size separator betweeen scaled text . 4. Update rendering library (new release).
1 parent eedd1e9 commit 8677dfe

13 files changed

+17977
-99
lines changed

Decard64/BIN/resvg.dll

16 KB
Binary file not shown.

Decard64/BIN/svg-help.xml

+17,333
Large diffs are not rendered by default.

Decard64/Decard64.dproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@
139139
<DCC_Namespace>VCL;System;$(DCC_Namespace)</DCC_Namespace>
140140
<VerInfo_MinorVer>1</VerInfo_MinorVer>
141141
<VerInfo_Release>2</VerInfo_Release>
142-
<VerInfo_Build>8</VerInfo_Build>
143-
<VerInfo_Keys>CompanyName=Dmitry Yatsenko;FileDescription=Card game design/translate tool;FileVersion=1.1.2.8;InternalName=Decard;LegalCopyright=feeware opensource;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.1.2.0;Comments=</VerInfo_Keys>
142+
<VerInfo_Build>9</VerInfo_Build>
143+
<VerInfo_Keys>CompanyName=Dmitry Yatsenko;FileDescription=Card game design/translate tool;FileVersion=1.1.2.9;InternalName=Decard;LegalCopyright=feeware opensource;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.1.2.0;Comments=</VerInfo_Keys>
144144
</PropertyGroup>
145145
<ItemGroup>
146146
<DelphiCompile Include="$(MainSource)">

Decard64/Decard64.res

232 Bytes
Binary file not shown.

Decard64/Frames/u_SvgInspectorFrame.dfm

+148-20
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ object SvgInspectorFrame: TSvgInspectorFrame
99
Top = 0
1010
Width = 618
1111
Height = 561
12-
ActivePage = tsAtr
12+
ActivePage = tsLangPack
1313
Align = alClient
1414
TabOrder = 0
1515
OnChange = pcAtrInspectorChange
@@ -18,7 +18,7 @@ object SvgInspectorFrame: TSvgInspectorFrame
1818
OnResize = tsAtrResize
1919
object splInspector: TSplitter
2020
Left = 0
21-
Top = 429
21+
Top = 427
2222
Width = 610
2323
Height = 6
2424
Cursor = crVSplit
@@ -30,7 +30,7 @@ object SvgInspectorFrame: TSvgInspectorFrame
3030
Left = 0
3131
Top = 36
3232
Width = 610
33-
Height = 393
33+
Height = 391
3434
Align = alClient
3535
BevelInner = bvNone
3636
ColCount = 4
@@ -51,15 +51,15 @@ object SvgInspectorFrame: TSvgInspectorFrame
5151
end
5252
object meHint: TMemo
5353
Left = 0
54-
Top = 435
54+
Top = 433
5555
Width = 610
5656
Height = 98
5757
Align = alBottom
5858
BevelInner = bvNone
5959
BevelOuter = bvNone
6060
BorderStyle = bsNone
61-
Color = clBtnFace
62-
Ctl3D = True
61+
Color = clInfoBk
62+
Ctl3D = False
6363
Font.Charset = DEFAULT_CHARSET
6464
Font.Color = clWindowText
6565
Font.Height = -13
@@ -91,7 +91,7 @@ object SvgInspectorFrame: TSvgInspectorFrame
9191
Left = 3
9292
Top = 6
9393
Width = 80
94-
Height = 21
94+
Height = 23
9595
Style = csDropDownList
9696
ItemIndex = 0
9797
TabOrder = 0
@@ -109,8 +109,8 @@ object SvgInspectorFrame: TSvgInspectorFrame
109109
Height = 36
110110
Align = alClient
111111
AutoSize = True
112-
ButtonHeight = 36
113-
ButtonWidth = 32
112+
ButtonHeight = 38
113+
ButtonWidth = 36
114114
Caption = 'tbrInspector'
115115
Images = MainData.ilHelper
116116
ShowCaptions = True
@@ -123,27 +123,27 @@ object SvgInspectorFrame: TSvgInspectorFrame
123123
ImageIndex = 22
124124
end
125125
object tbEdit: TToolButton
126-
Left = 32
126+
Left = 36
127127
Top = 0
128128
Action = aEdit
129129
end
130130
object ToolButton16: TToolButton
131-
Left = 64
131+
Left = 72
132132
Top = 0
133133
Width = 8
134134
Caption = 'ToolButton16'
135135
ImageIndex = 11
136136
Style = tbsSeparator
137137
end
138138
object tbSetColor: TToolButton
139-
Left = 72
139+
Left = 80
140140
Top = 0
141141
Caption = 'Color'
142142
ImageIndex = 12
143143
OnClick = tbSetColorClick
144144
end
145145
object tbPipe: TToolButton
146-
Left = 104
146+
Left = 116
147147
Top = 0
148148
Hint = 'Color picker'
149149
Caption = 'Pike'
@@ -152,21 +152,21 @@ object SvgInspectorFrame: TSvgInspectorFrame
152152
OnClick = tbPipeClick
153153
end
154154
object tbFont: TToolButton
155-
Left = 136
155+
Left = 152
156156
Top = 0
157157
Caption = 'Font'
158158
ImageIndex = 19
159159
OnClick = tbFontClick
160160
end
161161
object tbFileXlink: TToolButton
162-
Left = 168
162+
Left = 188
163163
Top = 0
164164
Caption = 'File'
165165
ImageIndex = 18
166166
OnClick = tbFileXlinkClick
167167
end
168168
object ToolButton28: TToolButton
169-
Left = 200
169+
Left = 224
170170
Top = 0
171171
Caption = 'Defs'
172172
ImageIndex = 21
@@ -182,24 +182,148 @@ object SvgInspectorFrame: TSvgInspectorFrame
182182
Left = 0
183183
Top = 0
184184
Width = 610
185-
Height = 533
185+
Height = 456
186186
Align = alClient
187187
TabOrder = 0
188188
ExplicitWidth = 610
189-
ExplicitHeight = 533
189+
ExplicitHeight = 531
190190
inherited SynEditor: TSynEdit
191191
Width = 610
192-
Height = 505
192+
Height = 428
193193
ReadOnly = True
194194
WordWrap = False
195195
ExplicitWidth = 610
196-
ExplicitHeight = 505
196+
ExplicitHeight = 503
197197
end
198198
inherited pscrSysEdit: TPageScroller
199199
Width = 610
200200
ExplicitWidth = 610
201201
end
202202
end
203+
object meReplaceHint: TMemo
204+
Left = 0
205+
Top = 456
206+
Width = 610
207+
Height = 75
208+
Align = alBottom
209+
BorderStyle = bsNone
210+
Color = clInfoBk
211+
Ctl3D = False
212+
Lines.Strings = (
213+
'REPLACEMENT SYNTAX:'
214+
'[Caption] Beginning of named block'
215+
'macro=value (case insensitive)'
216+
'Macros==value (case sensitive)'
217+
'macro=$regexp')
218+
ParentCtl3D = False
219+
ReadOnly = True
220+
TabOrder = 1
221+
ExplicitTop = 455
222+
end
223+
end
224+
object tsLangPack: TTabSheet
225+
Caption = 'LangPack'
226+
ImageIndex = 2
227+
object SynEditor: TSynEdit
228+
Left = 0
229+
Top = 0
230+
Width = 610
231+
Height = 320
232+
Align = alClient
233+
Font.Charset = DEFAULT_CHARSET
234+
Font.Color = clWindowText
235+
Font.Height = -13
236+
Font.Name = 'Courier New'
237+
Font.Style = []
238+
Font.Quality = fqClearTypeNatural
239+
TabOrder = 0
240+
CodeFolding.ShowCollapsedLine = True
241+
UseCodeFolding = False
242+
Gutter.Font.Charset = DEFAULT_CHARSET
243+
Gutter.Font.Color = clWindowText
244+
Gutter.Font.Height = -11
245+
Gutter.Font.Name = 'Courier New'
246+
Gutter.Font.Style = []
247+
Gutter.Font.Quality = fqClearTypeNatural
248+
Gutter.ShowLineNumbers = True
249+
Gutter.Bands = <
250+
item
251+
Kind = gbkMarks
252+
Width = 13
253+
end
254+
item
255+
Kind = gbkLineNumbers
256+
end
257+
item
258+
Kind = gbkFold
259+
end
260+
item
261+
Kind = gbkTrackChanges
262+
end
263+
item
264+
Kind = gbkMargin
265+
Width = 3
266+
end>
267+
Highlighter = SynIniSyn1
268+
Options = [eoAutoIndent, eoDragDropEditing, eoGroupUndo, eoShowScrollHint, eoSmartTabDelete, eoSmartTabs, eoTabsToSpaces]
269+
SearchEngine = ReplaceFrame.SynEditSearch1
270+
SelectedColor.Alpha = 0.400000005960464500
271+
OnChange = SynEditorChange
272+
ExplicitLeft = 3
273+
ExplicitTop = -96
274+
ExplicitHeight = 354
275+
RemovedKeystrokes = <
276+
item
277+
Command = ecLineBreak
278+
ShortCut = 8205
279+
end
280+
item
281+
Command = ecContextHelp
282+
ShortCut = 112
283+
end>
284+
AddedKeystrokes = <>
285+
end
286+
object meLangHint: TMemo
287+
Left = 0
288+
Top = 320
289+
Width = 610
290+
Height = 211
291+
Align = alBottom
292+
BorderStyle = bsNone
293+
Color = clInfoBk
294+
Ctl3D = False
295+
Lines.Strings = (
296+
'SUPPORT FOR MULTIPLE LANGUAGES IN ONE TEMPLATE:'
297+
298+
'On the first line, enter the identifier of the base language tha' +
299+
't is used in the template and list the numbers of '
300+
301+
'the columns containing text data, which are used in the template' +
302+
'.'
303+
304+
'If you have text in 2 or more languages, add lines here with the' +
305+
' language identifier and column numbers in that '
306+
'language that correspond to the columns in the first line.'
307+
'The choice of language is made on the top right corner.'
308+
''
309+
'Example:'
310+
'[en]=15,16,17,18'
311+
'[ru]=22,23,24,25'
312+
'[es]=26,27,28,29'
313+
''
314+
315+
'In this example, there are 3 languages (English used in the temp' +
316+
'late and additional Russian and Spanish), 4 '
317+
318+
'columns each. That is, when choosing the Russian language, colum' +
319+
'ns [15],[16],[17],[18] are not used, and data '
320+
'from [22],[23],'
321+
'[24],[25] are substituted instead.')
322+
ParentCtl3D = False
323+
ReadOnly = True
324+
ScrollBars = ssVertical
325+
TabOrder = 1
326+
end
203327
end
204328
end
205329
object alInspector: TActionList
@@ -212,4 +336,8 @@ object SvgInspectorFrame: TSvgInspectorFrame
212336
OnExecute = aEditExecute
213337
end
214338
end
339+
object SynIniSyn1: TSynIniSyn
340+
Left = 204
341+
Top = 306
342+
end
215343
end

Decard64/Frames/u_SvgInspectorFrame.pas

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ interface
66
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
77
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,
88
Vcl.ExtCtrls, Vcl.Grids, Vcl.ComCtrls, Profixxml, u_SynEditFrame, Vcl.ToolWin,
9-
system.UITYpes, System.Actions, Vcl.ActnList;
9+
system.UITYpes, System.Actions, Vcl.ActnList, SynEditHighlighter,
10+
SynHighlighterIni, SynEdit;
1011

1112
type
1213
TStringGrid=class(Vcl.Grids.TStringGrid)
@@ -37,6 +38,11 @@ TSvgInspectorFrame = class(TFrame)
3738
tbFont: TToolButton;
3839
tbFileXlink: TToolButton;
3940
ToolButton28: TToolButton;
41+
tsLangPack: TTabSheet;
42+
SynEditor: TSynEdit;
43+
SynIniSyn1: TSynIniSyn;
44+
meLangHint: TMemo;
45+
meReplaceHint: TMemo;
4046
procedure sgAttrSelectCell(Sender: TObject; ACol, ARow: Integer;
4147
var CanSelect: Boolean);
4248
procedure cbAtrShowClick(Sender: TObject);
@@ -53,6 +59,7 @@ TSvgInspectorFrame = class(TFrame)
5359
procedure sgAttrTopLeftChanged(Sender: TObject);
5460
procedure sgAttrKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
5561
procedure tbPipeClick(Sender: TObject);
62+
procedure SynEditorChange(Sender: TObject);
5663
private
5764
FSVGNode: TXML_Nod;
5865
FEditNode: TXML_Nod;
@@ -664,6 +671,11 @@ procedure TSvgInspectorFrame.sgAttrTopLeftChanged(Sender: TObject);
664671
sgAttr.Invalidate;
665672
end;
666673

674+
procedure TSvgInspectorFrame.SynEditorChange(Sender: TObject);
675+
begin
676+
MainForm.PrepareLangpack;
677+
end;
678+
667679
procedure TSvgInspectorFrame.tbSetColorClick(Sender: TObject);
668680
var dkr:string;
669681
begin

0 commit comments

Comments
 (0)