sai2S v4.2 - 2023/10/17

Developed by Primu
	- If you have any questions, comment on the dA project page or send me a message on ko-fi
		https://www.deviantart.com/primpri/art/sai2S-PaintTool-Sai2-Dark-Mode-and-Custom-Themes-942311093
	- I would also love to see custom themes that people create!
		You can distribute these themes by generating a theme file with the 'Share Theme' button in sai2SManager

- Tested on Windows 10 & Windows 11 (64bit)
- sai2S v4.2 supports the following sai2 versions:
	v2020.04.10
	v2022.12.01
	v2023.07.11
- Supports both English & Japanese versions.
	
Features
	- Customize sai2 UI colours & resources.
	- Customize sai2 icon.
	- Create & share themes.


=======================================================

	
Updating from older sai2S versions
	- Replace the old sai2SManager.exe with the new one & run it to perform the update process
	- Note: This version no longer uses 'sai2S.exe', this will be deleted on update, you can unpin it from taskbar & pin 'sai2.exe' as normal.

Installation
	- Install VS 2015-2022 C++ Redistributable (x64) from the below link:
		https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist
		Direct Download: https://aka.ms/vs/17/release/vc_redist.x64.exe
	- Extract the downloaded sai2S zip archive to your 'PaintTool SAI2' folder (where sai2.exe is located)
		Your directory structure should look something like this:
			..\PTSAI2\init\..
			..\PTSAI2\history.txt
			..\PTSAI2\sai2.exe
			..\PTSAI2\sai2.ini
			..\PTSAI2\sai2SManager.exe
			..\PTSAI2\sai2Sv4_ReadMe.txt
		The 'ColourWheel.zip' is optional for assisting with creating ColourWheel resource (more info below).
	- Launch 'sai2SManager.exe' to install sai2S
		This will extract 'sai2S.exe' along with some dependencies & a 'sai2S' resource directory

Uninstallation
	- Launch sai2SManager.exe and click the 'Uninstall sai2S' button.
	- This will revert sai2.exe back to its default state.
	- sai2SManager.exe & the sai2S resources folder can be deleted manually after.


=======================================================


Below are instructions for various features of sai2S.
Please view the Youtube guide linked on the dA page if you're more of a visual learner!


Customization
	sai2SManager.exe is used for customizing & installing themes.
		You can hover over most things to get a description of what it does.
		
	> Selecting a Theme
		1: Go to the 'Themes' tab
		2: If a theme is already selected, click the button that displays its name, eg. 'Primu_Dark Mode'
			- This will deselect the current theme & return to a list of themes you can select
		3: Click to select a theme from the list.
		
	> Customizing a Selected Theme
		1: When a theme is selected, the 'Themes' tab will display a list of theme colours.
		2: Click the 'ThemeRGB' property of the theme colour you want to customize to bring up the colour selection box.
			- Note: You can right-click the 'ThemeRGB' property to copy/paste values between theme colours.
			- Note: The default theme 'Primu_Dark Mode' cannot be modified, you must create your own theme (explained below).
			
	> Installing a Selected Theme
		1: Go to the 'sai2S' tab
		2: Click the 'Install Theme' button
	
	> Creating a Theme
		1: On the 'Themes' tab, deselect any currently selected theme.
		2: With the list of themes displayed, click the '+' button to the right of the selected theme button to create a new theme.
			- In the prompt, input an author name & theme name to associate with your theme and then click Confirm.
			- Note: You can also right-click existing themes to copy/edit/delete them.
				You may also notice there's an option to 'Open Resource Directory', resources are explained below.
		3: After your theme is created, you can then follow the above instructions for selecting, customizing & installing your theme.

	> Changing an Element's Associated Theme Colour
		1: On the 'Colours' tab, find an element within a group you would like to change.
		2: Double-click the ThemeID field for the element to activate input.
		3: Change the value to the ID of a desired theme colour for the element and press Enter.
			- Note: You can find the ID of specific theme colours on the Themes tab in the 'ID' column.
			- Assigning the value '0' will disable the use of theme colours for the specific element, 
				in which case the CustomRGB value will be used instead, which can be changed similar to ThemeRGB described above.


=======================================================


Resources
	After installation, you will find a 'sai2S' directory within your 'sai2' directory, this is where resources are stored.
		Resources are an alternative way of customizing your sai2S themes, 
		allowing you to change colours of a bitmap image instead of providing RGB values.
	
	> Customizing Icon
		- You can find 'sai2.ico' within the 'sai2S' directory, this is the icon that will be installed with a theme.
			- This icon will display in Explorer & also in the Taskbar & Titlebar when sai2 is launched.
		- You can replace this with any other .ico file, just ensure the name is the same.
			- The Explorer icon may not always update as Windows caches icons, so you may need to clear Windows icon cache.
	
	> Resource Directories
		- There are a number of resource directories created by default:
			'sai2_patches' - This is a special resource directory for patching default resources, you can ignore it.
			'sai2_default' - The default sai2 resources, you can copy these into your theme and make changes to them.
			'sai2_all' - Resources added here will affect all themes.
				- Note: If a theme includes a resource that is also included in sai2_all, the theme's resource will take priority.
		- Theme resource directories are named in format: 'AuthorName_ThemeName'
		- Within the main resource directories, resources are split into 2 more directories '24bit' and '32bit'
			- This is the bitdepth of the bitmap resource, it is important to keep the bitdepth the same as the original resource.
				You shouldn't need to worry about this if you're saving over resources, 
				it may only be an issue if you're overwriting with a different bitmap image.
	
	> Customizing Resources
		1: On the 'Themes' tab, select a theme you would like to add resources to.
		2: On the 'Colours' tab, find an element that you would like to use resources for.
			- Eg. If you would like to change the tool icons, select the 'Tools' group
				Right-click the tool you want the resource of and select 'Copy Resource to Theme'
				You will be prompted with the paths of the resources that have been copied.
			- Note: You can also just manually copy resources from the 'sai2_default' directory if preferred.
		3: An explorer window should popup at the root of your selected theme's resource directory.
			- You can also get to this directory with the 'Open Resource Directory' option mentioned earlier.
		4: Navigate to the copied resource, eg. '32bit\Tools_Icon_Move.bmp' & open it in a drawing application.
			- Note: Resource names may have a suffix like "_100-125" and "_150-200", this denotes which scale modes they affect.
				Eg. "_100-125" will affect 100% and 125% scale modes.
			- After making your desired changes to the bitmap, save over it.
				- Note: If you are using Photoshop to make changes, I would recommend the following steps:
					- Open the bitmap in sai2
					- Merge the layers in Photoshop & copy the resulting image to sai2
					- Save the bitmap in sai2
						This is because saving bitmaps in Photoshop may change the structure slightly which will break things.
		5: Click the 'Install Theme' button on the 'sai2' tab.
		
	> Customizing Colour Wheel	
		Within the default theme resource directory 'Primu_Dark Mode\24bit', you can find an example usage of resources with the Colour Wheel,
			this provides an anti-aliased appearance for the Colour Wheel, below are instructions for how to do this for your own themes.
			
		- Extract the included ColourWheel.zip
			This includes 4 images for each scale mode that have a gradient colour wheel with transparent background in png format.
			The 'ColourWheel_Gradient.png' is optional in case you want to design your own wheel.
		- Copy the 'ColourWheel_XXX.bmp' resources from 'sai2_default\24bit' to your own theme resource directory.
		- Open these resources in sai2, also open the png files.
		- Copy the wheel from the png file to its respective bmp file (ending with same scale mode, eg. '_100')
		- Create a new layer under the wheel layer and use the Bucket tool to fill the background with a desired colour.
			- Note: Recommended colour is the same colour you use for the 'Panel Background' element in the 'Panel' group.
				By default, the Panel Background uses Theme ID 31 'Background (Window)'
		- Press Ctrl+S to save, and then click the 'Install Theme' button & launch sai2 to preview the changes.


=======================================================


Download sai2: https://systemax.jp/en/sai/devdept.html
Download sai2S: https://deviantart.com/primpri


=======================================================

v4.2 Changes
	- Implemented option to toggle applying the font list fix.
	- Minor changes to the colour selection prompt.

v4.1 Changes
	- Fixed issue with file viewer caused by font list fix
	- Adjustments to versioning for file updates
	- Ensure message boxes appear correctly

v4.0 Changes
	- Removed need for "sai2S.exe"
	- Removed advanced options in order to simplify the sai2SManager UI
	- Added method for editing resources via bitmaps
	- Added method for customizing icon
	- Added resource patching functionality to address issues of conflicting matches
	- Changes to pattern matching
	- Changes to matching offsets for scaling modes
	- Changes to how offsets are found
	- Updated to sai2 v2023.07.11
	- Support for sai2 v2020.04.10
	- Adjustments & validation of theme naming
	- Adjustments to sai2STheme files
	- Adjustments to install/uninstall process
	- Fixed font list legibility