Warning, /games/klines/README.themes is written in an unsupported language. File is not indexed.
0001 This file describes how to create a new KLines theme. 0002 0003 (Last update: 29.05.2007 by dimsuz) 0004 0005 KLines theme consists of svgz file which contains game elements 0006 with predefined svg ID's and accompanying .desktop file which contains 0007 various information about theme and some important theme settings 0008 (like animation timing and number of frames) 0009 0010 -= SVG file =- 0011 0012 There are 7 types of different-colored balls in the game and each ball 0013 type has 3 animation sequences: 0014 - born (played when ball appears on the field) 0015 - select (played when ball is selected by player) 0016 - die (played when ball is destroyed) 0017 0018 7 colors are: 0019 Red, Blue, Green, Purple, Yellow, Earth (dark-brown), Cyan 0020 0021 So, as a theme creator you'll need to create these 3 animation sets 0022 for EACH ball color. Number of frames in each set is up to you, 0023 i.e. it's configurable (see below). 0024 0025 Next, you'll need to create svg elements for field-cell, preview area 0026 and background. 0027 Yeah, klines needs many elements :-). 0028 0029 So, let me sum this all up and provide you with predefined svg 0030 ID's that are needed for all the stuff: 0031 0032 1. Born animation set of each ball consists of NumBornFrames (see 0033 below). Each frame has ID "[C]_born_[N]", where [C] is first letter 0034 of ball's color (in lowercase) and [N] is a frame number 0035 0036 2. Select animation set of each ball consists of NumSelectedFrames 0037 (see below) and each frame has ID "[C]_select_[N]". 0038 0039 3. Die animation set of each ball consists of NumDieFrames 0040 (see below) and each frame has ID "[C]_die_[N]". 0041 0042 Example of IDs: e_born_1, e_born_2, ... e_born_N 0043 c_select_1, c_select_2, ..., c_select_N 0044 y_die_1, y_die_2, ..., y_die_N 0045 0046 4. Picture of the ball (in steady state) of each color with ID: [C]_rest 0047 (e.g. r_rest, b_rest, g_rest etc) 0048 0049 5. Field cell with ID: field_cell 0050 0051 6. Picture of preview-display with ID: preview 0052 0053 7. Background image with ID: background 0054 0055 8. Optional border with ID: border 0056 If theme author wishes, he can add a border element that will be painted 0057 around game field, i.e. all cells will be painted inside border element's area 0058 IMPORTANT NOTE: Game assumes that border visual side size will be half of field cell's size. 0059 And will render it based on this assumtion. I.e. if border element exists in theme, game 0060 will render cells slightly smaller, by decreasing their size on half of usual size. 0061 Oh, hope you'll understand this :) 0062 Better - just take a look at the current border rich themes as an example ;) 0063 It's simple 0064 0065 That's all for SVG part. Let's move to simpler one: .desktop file :) 0066 0067 -= .desktop file =- 0068 0069 As has been noted earlier, desktop file is part of each klines 0070 theme and contains various info about theme as well as settings which 0071 control animation. 0072 It has the Key=Value format and starts with the "[KGameTheme]" 0073 header. 0074 0075 here's how typical klines theme .desktop file should look like (let's name it mytheme.desktop): 0076 0077 -= example of mytheme.desktop =- 0078 0079 [KGameTheme] 0080 Name=ThemeName 0081 VersionFormat=1 0082 FileName=themefile.svgz 0083 Author=Theme Author Name 0084 AuthorEmail=author@email.dot 0085 0086 NumBornFrames=[Number of born anim frames in svg] 0087 NumSelectedFrames=[Number of selected anim frames in svg] 0088 NumDieFrames=[Number of die anim frames in svg] 0089 0090 BornAnimDuration=[Number of milliseconds to play born anim set] 0091 SelectedAnimDuration=[Number of milliseconds to play selected anim set] 0092 DieAnimDuration=[Number of milliseconds to play die anim set] 0093 0094 MoveAnimDuration=[Number of milliseconds to move the ball through one cell] 0095 0096 -= end of mytheme.desktop example =- 0097 0098 You may want to take a look at 0099 /path/to/kdedir/share/apps/klines/themes/klines.svgz 0100 and 0101 /path/to/kdedir/share/apps/klines/themes/default.desktop 0102 for reference 0103 0104 Good luck!