TH3-Color themes » History » Version 1
Wil van Antwerpen, 06/03/2019 01:48 PM
1 | 1 | Wil van Antwerpen | # Color themes |
---|---|---|---|
2 | 1 | Wil van Antwerpen | |
3 | 1 | Wil van Antwerpen | The Hammer comes with the following default color themes: |
4 | 1 | Wil van Antwerpen | |
5 | 1 | Wil van Antwerpen | * White |
6 | 1 | Wil van Antwerpen | * Black |
7 | 1 | Wil van Antwerpen | * Blue |
8 | 1 | Wil van Antwerpen | * Lime |
9 | 1 | Wil van Antwerpen | * Sahara |
10 | 1 | Wil van Antwerpen | * Serene |
11 | 1 | Wil van Antwerpen | |
12 | 1 | Wil van Antwerpen | In order to select a different theme you go in the menu to: File -> Hammer Options -> Editor tab page -> Colorer |
13 | 1 | Wil van Antwerpen | You can select from the predefined color schemes via the Color Scheme name comboform |
14 | 1 | Wil van Antwerpen | |
15 | 1 | Wil van Antwerpen | It is also possible to create your own theme and save it under your own name. For this use the "New" button. |
16 | 1 | Wil van Antwerpen | |
17 | 1 | Wil van Antwerpen | ## Adding a custom theme as a new default |
18 | 1 | Wil van Antwerpen | |
19 | 1 | Wil van Antwerpen | If you created your own theme and you like it a lot then we would love to add it as another default theme to the list. |
20 | 1 | Wil van Antwerpen | |
21 | 1 | Wil van Antwerpen | Below are the steps needed to do so yourself. |
22 | 1 | Wil van Antwerpen | When you create a theme or customize it, the details for that theme are saved in the Hammer configuration file which can be found under the Hammer\Data folder. |
23 | 1 | Wil van Antwerpen | The filename is CODEMAXEDIT<username>.ini where username is your windows login name. |
24 | 1 | Wil van Antwerpen | If your windows login is "John" then the filename will be CODEMAXEDITJohn.ini |
25 | 1 | Wil van Antwerpen | |
26 | 1 | Wil van Antwerpen | Open that file and search for a line that starts with "PSCOLOR," |
27 | 1 | Wil van Antwerpen | |
28 | 1 | Wil van Antwerpen | Copy that line. |
29 | 1 | Wil van Antwerpen | |
30 | 1 | Wil van Antwerpen | Now in the Hammer source files look for a file Hammer\Pkg\THColorer.h and search for the following line: |
31 | 1 | Wil van Antwerpen | |
32 | 1 | Wil van Antwerpen | ~~~ |
33 | 1 | Wil van Antwerpen | Define TH_DEFSCHEMA_SAHARA_STR for "Default (Sahara)" |
34 | 1 | Wil van Antwerpen | ~~~ |
35 | 1 | Wil van Antwerpen | |
36 | 1 | Wil van Antwerpen | You can add your own code name for the new theme there, in a new line underneath, let's call our new theme "DEMO", so that it looks like this: |
37 | 1 | Wil van Antwerpen | |
38 | 1 | Wil van Antwerpen | ~~~ |
39 | 1 | Wil van Antwerpen | Define TH_DEFSCHEMA_SAHARA_STR for "Default (Sahara)" |
40 | 1 | Wil van Antwerpen | Define TH_DEFSCHEMA_DEMO_STR for "Default (Demo)" |
41 | 1 | Wil van Antwerpen | ~~~ |
42 | 1 | Wil van Antwerpen | |
43 | 1 | Wil van Antwerpen | Then look for the actual theme data a few lines down: |
44 | 1 | Wil van Antwerpen | |
45 | 1 | Wil van Antwerpen | ~~~ |
46 | 1 | Wil van Antwerpen | Define TH_COLORSCHEMA_SAHARA for "255255187000220225240000255255255255255255187000000000000000255255187000255000255000255255187000000000255000255255187000255000000000255255187000000000255000255255187000000128000000255255187000255000128000255255187000000128128000255255187000255000000000255255187000000000255000255255187000128000000000255255187000105105105000190200225000255255255255192192192000220225240000128128128000255215215000000000000000200225255000255255000000255035035000000128128000255255187000170195240000215107000000255255187000000,000000000000000000000000000000000000000000000001000000" |
47 | 1 | Wil van Antwerpen | ~~~ |
48 | 1 | Wil van Antwerpen | |
49 | 1 | Wil van Antwerpen | and copy the line of data from your config file in there like so: |
50 | 1 | Wil van Antwerpen | |
51 | 1 | Wil van Antwerpen | ~~~ |
52 | 1 | Wil van Antwerpen | Define TH_COLORSCHEMA_SAHARA for "255255187000220225240000255255255255255255187000000000000000255255187000255000255000255255187000000000255000255255187000255000000000255255187000000000255000255255187000000128000000255255187000255000128000255255187000000128128000255255187000255000000000255255187000000000255000255255187000128000000000255255187000105105105000190200225000255255255255192192192000220225240000128128128000255215215000000000000000200225255000255255000000255035035000000128128000255255187000170195240000215107000000255255187000000,000000000000000000000000000000000000000000000001000000" |
53 | 1 | Wil van Antwerpen | Define TH_COLORSCHEMA_DEMO for "025025025000120120120000255255255255255255255255255255255000025025025000255185255000025025025000140215240000025025025000255108108000025025025000140215240000025025025000187255187000025025025000192192192000025025025000000128128000255255255255255000000000255255255255000000255000255255255255128000000000255255255255192192192000080080080000255255255255192192192000105105105000090090090000255215215000000000000000200225255000255255000000255000000000202255255000025025025000000000170000255190120000025025025000000" |
54 | 1 | Wil van Antwerpen | ~~~ |
55 | 1 | Wil van Antwerpen | |
56 | 1 | Wil van Antwerpen | That's the first step, next is adding this new theme to the UI. |
57 | 1 | Wil van Antwerpen | |
58 | 1 | Wil van Antwerpen | For that go to file Hammer\AppSrc\Tools\THParameters.dg |
59 | 1 | Wil van Antwerpen | |
60 | 1 | Wil van Antwerpen | In Object oSchemaSelect, procedure Combo_Fill_List |
61 | 1 | Wil van Antwerpen | |
62 | 1 | Wil van Antwerpen | Under line: |
63 | 1 | Wil van Antwerpen | |
64 | 1 | Wil van Antwerpen | ~~~ |
65 | 1 | Wil van Antwerpen | Send Combo_Add_Item TH_DEFSCHEMA_SAHARA_STR |
66 | 1 | Wil van Antwerpen | ~~~ |
67 | 1 | Wil van Antwerpen | |
68 | 1 | Wil van Antwerpen | add the new theme: |
69 | 1 | Wil van Antwerpen | |
70 | 1 | Wil van Antwerpen | ~~~ |
71 | 1 | Wil van Antwerpen | Send Combo_Add_Item TH_DEFSCHEMA_SAHARA_STR |
72 | 1 | Wil van Antwerpen | Send Combo_Add_Item TH_DEFSCHEMA_DEMO_STR |
73 | 1 | Wil van Antwerpen | ~~~ |
74 | 1 | Wil van Antwerpen | |
75 | 1 | Wil van Antwerpen | also Object oSchemaSelect, procedure OnChange |
76 | 1 | Wil van Antwerpen | |
77 | 1 | Wil van Antwerpen | Under line: |
78 | 1 | Wil van Antwerpen | |
79 | 1 | Wil van Antwerpen | ~~~ |
80 | 1 | Wil van Antwerpen | Else If (sName=TH_DEFSCHEMA_SAHARA_STR) Move TH_COLORSCHEMA_SAHARA To sSchema |
81 | 1 | Wil van Antwerpen | ~~~ |
82 | 1 | Wil van Antwerpen | |
83 | 1 | Wil van Antwerpen | add your new theme |
84 | 1 | Wil van Antwerpen | |
85 | 1 | Wil van Antwerpen | ~~~ |
86 | 1 | Wil van Antwerpen | Else If (sName=TH_DEFSCHEMA_SAHARA_STR) Move TH_COLORSCHEMA_SAHARA To sSchema |
87 | 1 | Wil van Antwerpen | Else If (sName=TH_DEFSCHEMA_DEMO_STR) Move TH_COLORSCHEMA_DEMO To sSchema |
88 | 1 | Wil van Antwerpen | ~~~ |
89 | 1 | Wil van Antwerpen | |
90 | 1 | Wil van Antwerpen | same method, but a few lines down: |
91 | 1 | Wil van Antwerpen | |
92 | 1 | Wil van Antwerpen | ~~~ |
93 | 1 | Wil van Antwerpen | Move (not((sName=TH_DEFSCHEMA_BLACK_STR) or ; |
94 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_WHITE_STR) or ; |
95 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_BLUE_STR) or ; |
96 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_SERENE_STR) or ; |
97 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_SAHARA_STR) or ; |
98 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_LIME_STR))) ; |
99 | 1 | Wil van Antwerpen | to iDisableManageButtons |
100 | 1 | Wil van Antwerpen | ~~~ |
101 | 1 | Wil van Antwerpen | |
102 | 1 | Wil van Antwerpen | change into: |
103 | 1 | Wil van Antwerpen | |
104 | 1 | Wil van Antwerpen | ~~~ |
105 | 1 | Wil van Antwerpen | Move (not((sName=TH_DEFSCHEMA_BLACK_STR) or ; |
106 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_WHITE_STR) or ; |
107 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_BLUE_STR) or ; |
108 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_SERENE_STR) or ; |
109 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_SAHARA_STR) or ; |
110 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_DEMO_STR) or ; |
111 | 1 | Wil van Antwerpen | (sName=TH_DEFSCHEMA_LIME_STR))) ; |
112 | 1 | Wil van Antwerpen | to iDisableManageButtons |
113 | 1 | Wil van Antwerpen | ~~~ |
114 | 1 | Wil van Antwerpen | |
115 | 1 | Wil van Antwerpen | Then in oSchemaDelete, procedure onClick |
116 | 1 | Wil van Antwerpen | |
117 | 1 | Wil van Antwerpen | ~~~ |
118 | 1 | Wil van Antwerpen | If (sName=TH_DEFSCHEMA_BLACK_STR or sName=TH_DEFSCHEMA_WHITE_STR or sName=TH_DEFSCHEMA_BLUE_STR or sName=TH_DEFSCHEMA_LIME_STR or sName=TH_DEFSCHEMA_SERENE_STR or sName=TH_DEFSCHEMA_SAHARA_STR) Begin |
119 | 1 | Wil van Antwerpen | ~~~ |
120 | 1 | Wil van Antwerpen | |
121 | 1 | Wil van Antwerpen | add your theme: |
122 | 1 | Wil van Antwerpen | |
123 | 1 | Wil van Antwerpen | ~~~ |
124 | 1 | Wil van Antwerpen | If (sName=TH_DEFSCHEMA_BLACK_STR or sName=TH_DEFSCHEMA_WHITE_STR or sName=TH_DEFSCHEMA_BLUE_STR or sName=TH_DEFSCHEMA_LIME_STR or sName=TH_DEFSCHEMA_SERENE_STR or sName=TH_DEFSCHEMA_SAHARA_STR or sName=TH_DEFSCHEMA_DEMO_STR) Begin |
125 | 1 | Wil van Antwerpen | ~~~ |
126 | 1 | Wil van Antwerpen | |
127 | 1 | Wil van Antwerpen | Next in oSchemaDefault button, procedure onClick |
128 | 1 | Wil van Antwerpen | |
129 | 1 | Wil van Antwerpen | add under line: |
130 | 1 | Wil van Antwerpen | |
131 | 1 | Wil van Antwerpen | ~~~ |
132 | 1 | Wil van Antwerpen | Else If (sName=TH_DEFSCHEMA_SAHARA_STR) Move TH_COLORSCHEMA_SAHARA To sColors |
133 | 1 | Wil van Antwerpen | ~~~ |
134 | 1 | Wil van Antwerpen | |
135 | 1 | Wil van Antwerpen | your own colors: |
136 | 1 | Wil van Antwerpen | |
137 | 1 | Wil van Antwerpen | ~~~ |
138 | 1 | Wil van Antwerpen | Else If (sName=TH_DEFSCHEMA_SAHARA_STR) Move TH_COLORSCHEMA_SAHARA To sColors |
139 | 1 | Wil van Antwerpen | Else If (sName=TH_DEFSCHEMA_DEMO_STR) Move TH_COLORSCHEMA_DEMO To sColors |
140 | 1 | Wil van Antwerpen | ~~~ |
141 | 1 | Wil van Antwerpen | |
142 | 1 | Wil van Antwerpen | And finally in Procedure SaveEntries: |
143 | 1 | Wil van Antwerpen | |
144 | 1 | Wil van Antwerpen | locate this part: |
145 | 1 | Wil van Antwerpen | |
146 | 1 | Wil van Antwerpen | ~~~ |
147 | 1 | Wil van Antwerpen | If ((sSchemaName<>TH_DEFSCHEMA_BLACK_STR) and ; |
148 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_WHITE_STR) and ; |
149 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_BLUE_STR) and ; |
150 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_SERENE_STR) and ; |
151 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_SAHARA_STR) and ; |
152 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_LIME_STR)) Begin |
153 | 1 | Wil van Antwerpen | ~~~ |
154 | 1 | Wil van Antwerpen | |
155 | 1 | Wil van Antwerpen | and add your own: |
156 | 1 | Wil van Antwerpen | |
157 | 1 | Wil van Antwerpen | ~~~ |
158 | 1 | Wil van Antwerpen | If ((sSchemaName<>TH_DEFSCHEMA_BLACK_STR) and ; |
159 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_WHITE_STR) and ; |
160 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_BLUE_STR) and ; |
161 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_SERENE_STR) and ; |
162 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_SAHARA_STR) and ; |
163 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_DEMO_STR) and ; |
164 | 1 | Wil van Antwerpen | (sSchemaName<>TH_DEFSCHEMA_LIME_STR)) Begin |
165 | 1 | Wil van Antwerpen | ~~~ |
166 | 1 | Wil van Antwerpen | |
167 | 1 | Wil van Antwerpen | Congratulations! |
168 | 1 | Wil van Antwerpen | If you now close the Hammer and recompile your new color theme should show up and you can select it as a default theme. |