JudoTimer Display Layout Customization

You can use text file to customize the JudoTimer display layout. Two example files are provided in JudoShiai/etc directory: timer-custom.txt and timer-tv-logo.txt. Note! The files will be overwritten when you install a new JudoShiai version. Take copies and edit those.

The file consists of text lines. Each line describes one label (letter, text, number) or special data. Label lines have 14 values (columns) separated by spaces. Lines beginning with a hash mark (#) are comments. Number of special data line values depend on the data.

X and Y coordinates can have values 0.0 – 1.0. Upper left corner has coordinates 0.0, 0.0, upper right is 1.0, 0.0, lower right is 1.0, 1.0.

Width and height can have values 0.0 – 1.0. 1.0 means the full width or height of the window.

Colors can have values 0.0 – 1.0 (black to full intensity). Many times negative red color means transparency. Note! Transparency is fully supported in Linux only. Also transparency depends on the display adapter.

Meanings of the label line columns are described in the following table:

Column

Description

1

Number of the label. Do not change.

2

X coordinate of the label's upper left corner 0.0 - 1.0 (left to right).

3

Y coordinate 0.0 - 1.0 (top to bottom).

4

Width of the label 0.0 - 1.0. Width = 0 means label is not displayed.

5

Height of the label 0.0 - 1.0.

6

Size of the text. 0 means automatic adjustment, otherwise text size is this value multiplied by height of the label. For example size = 0.6 means text height is 60% of the label height.

7

Horizontal alignment of the text: -1 = align left, 0 = center, 1 = align right.

8

Foreground color, red component (0.0 - 1.0).

9

Foreground color, green component (0.0 - 1.0).

10

Foreground color, blue component (0.0 - 1.0).

11

Background color, red component (0.0 - 1.0). Negative value means transparent background.

12

Background color, green component (0.0 - 1.0).

13

Background color, blue component (0.0 - 1.0).

14

Wrap too long text: 0 = no wrap. 1 = wrap.

 

Label numbers define the following 37 items:

Number

Label description

0

Name of the first player

1

Name of the second player

2

Name of the preparing first player

3

Name of the preparing second player

4

Club name of the first player

5

Club name of the second player

6

Text "Match:"

7

Text "Next:"

8

Letter "I"

9

Letter "W"

10

Letter "Y"

11

Letter "S"

12

Padding for any use

13

Text "Sonomama"

14

Ippon score for the first player

15

Waza-ari score for the first player

16

Yuko scores for the first player

17

Shidos for the first player

18

Ippon score for the second player

19

Waza-ari score for the second player

20

Yuko scores for the second player

21

Shidos for the second player

22

Contest clock minutes

23

Contest clock colon

24

Contest clock tens of seconds

25

Contest clock seconds

26

Osaekomi clock tens of seconds

27

Osaekomi clock seconds

28

Osaekomi score, a letter

29

White area to click during osaekomi

30

Blue area to click during osaekomi

31

Comment text (e.g. "Points going to blue")

32

Category name for the ongoing fight

33

Category name for the following fight

34

Golden score text

35

Flag of the first competitor's country

36

Flag of the second competitor's country

 

Special data lines are described in the following table column by column:

 

Number

Col 2 →

Data description

100

 

Screen background color. This is useful if texts do not cover all the areas.

 

2

Red component (0.0 – 1.0, -1.0 means transparent)

 

3

Green component (0.0 – 1.0)

 

4

Blue component (0.0 – 1.0)

101

 

Clock foreground run and stop colors, and background color.

 

2, 3, 4

Run color (red, green, blue).

 

5, 6, 7

Stop color.

 

8, 9, 10

Background color  (negative red = transparent).

102

 

Clock foreground run and stop colors, and background color.

 

2, 3, 4

Run color (red, green, blue).

 

5, 6, 7

Stop color.

 

8, 9, 10

Background color (negative red = transparent).

103

 

Miscellaneous settings.

 

2

Hide clock if osakomi clock runs. This makes possible to use the same space for both clocks (0 = no hide, 1 = hide).

 

3

Hide frames and menu (1 = hide). Press ctl-M to show frames and menu.

 

4

Do not show shidos if there aren't any (0 = show, 1 = don't show number, 2 = don't show background, 3 = show nothing).

 

5

Put timer to slave mode (0 = normal, 1 = slave mode). Handy if you want a TV logo.

104

 

Window layout. This useful for TV logos. Some window managers ignore requests for initial window positions so x and y values may have no impact.

 

2

X position in pixels (0 – screen width).

 

3

Y position (0 – screen height).

 

4

JudoTimer window width in pixels.

 

5

JudoTimer window height.

105

 

Background picture. Picture will fill transparent areas.

 

2

Path to a PNG picture, for example C:\Pictures\logo.png. If picture is relative to the JudoShiai installation directory you can use two dots for the JudoShiai directory. For example timer-tv-logo.txt is here:

../etc/timer-tv-logo.png

 

JudoShiai includes example files with comments. For example line

4  0.0  0.3  0.721  0.1  0  -1  0.0  0.0  0.0  0.0  0.0  1.0  0

tells that

Customized mode is activated from the JudoTimer menu Preferences → Display Layout → Display Customized Layout. Custom file is selected from Preferences → Display Layout → Custom layout file.

Example

We want to make a layout for video streamer (see Appendix Video Stream Setup). JudoTimer will run in slave mode, but it should look different than the master clock. We need only competitors' names, scores and clocks. It would be nice to have a fancy looking background. It is not necessary to show both clocks if there is no osaekomi. To save space the clocks should be overlapping. Also shidos should be hidden if there is none.

There is a ready made example in JudoShiai/etc directory:

Our PNG picture looks like this:

Image3

There are some text, but it could be for example a logo. There are white and blue backgrounds for names and scores. Dark gray background is for osaekomi clock. Note that white areas are actually transparent.

Next we edit the timer-tv-logo.txt file so that the names, scores, and clocks are positioned and sized properly. All the label backgrounds except the shiai clock are transparent to show the nice background picture. Shiai clock background must be opaque to cover the osaekomi clock totally. When osaekomi starts shiai clock is not drawn any more and the grey background appears.

Result will look like this when there are no shidos:

Image4

With one shido and osaekomi the logo changes:

Image5

This is achieved with the following layout file special data lines:

Shiai clock run color = black, stop = gray, and background = white:

101  0.0 0.0 0.0  0.3 0.3 0.3  1.0 1.0 1.0

Osaekomi clock run color = green, stop = black, and background = transparent:

102  0.0 1.0 0.0  0.0 0.0 0.0  -1.0 0.0 0.0

Hide shiai clock if osakomi clock runs. Hide frames and menu. Do not show shidos if zero. Put JudoTimer automatically to slave mode:

103  1 1 3 1

 

Start window in top left corner and set the size:

104 10 10 500 120

Background picture:

105 ../etc/timer-tv-logo.png

 

APPENDIX 3