Skip to content
Browse files

Centralize color information and file format

This touches a lot of code so some things might be broken, possibly in a
subtle way. It was a great idea for me to do this right before a planned

- Merges modColors into clsColor.
- SSC.Color now returns global g_Color.
- Default colors are loaded initially, saved colors are loaded after
- Color settings storage format changed from SCLF file to INI.
Conversion happens automatically. Config overrides are also updated.
- Color.Hex() function has been moved to Color.ToHex(). This might
affect some scripts. Sorry but the function was very poorly named.
- All use of RTBColors in AddChat statements changed to g_Color.
- Added SetFormColors() to frmChat. It takes a clsColor instance and
applies it to the form.
- Changes to the Color class are updated in real-time for AddChat's but
not for forms.
- Import and Set Defaults options on the frmSettings color page only
affects the settings form until changes are applied.
- Import dialog accepts SCLF and INI files. Export only accepts INI.
- To add a new color you have to add a private member and public
property to the clsConfig class, as well as set a default in the
LoadDefaults() function. For colors loaded from the configuration, it
should be added to one of the LoadINI sub-functions and the Save()
function. To make it configurable in the settings UI it must be added to
the frmSettings.LoadColors() and frmSettings.SaveColors() functions. If
it affects the main form it needs to be added to
  • Loading branch information...
Davnit committed Dec 2, 2017
1 parent e4f17e2 commit 7c2266f785072cca9382f867cabc5fd5f06a0973
@@ -43,7 +43,6 @@ Module=modWindow; modWindow.bas
Module=modMail; modMail.bas
Module=modBNCSutil; modBNCSutil.bas
Module=modEvents; modEvents.bas
Module=modColors; modColors.bas
Module=modCommandCode; modCommands.bas
Module=modOtherCode; modOtherCode.bas
Module=modParsing; modParsing.bas
@@ -244,7 +244,7 @@ Public Sub ParseClanPacket(ByVal PacketID As Byte, ByVal inBuf As clsDataBuffer)
Exit Sub

frmChat.AddChat RTBColors.ErrorMessageText, "Error: " & Err.Description & " in ParseClanPacket()."
frmChat.AddChat g_Color.ErrorMessageText, "Error: " & Err.Description & " in ParseClanPacket()."

Exit Sub
End Sub

0 comments on commit 7c2266f

Please sign in to comment.
You can’t perform that action at this time.