Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加动态淡入淡出切换主题配色功能 #65

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

cutekibry
Copy link
Collaborator

fa2bf22

新增:

- $/Main/ScreenShader/ShaderRect : ColorRect:实现整个屏幕换色的 shader。

    ShaderRect 会加载 res://shaders/main_shader.tres 和
    res://shaders/main_shader.gdshader,该 shader 会作用于整个屏幕,将
    对应 PALETTE 里的颜色进行替换。

    只需要将 res://shaders/main_shader.tres 中的颜色进行更改,配色就会
    更改。

- $/Main/ImageLib : Node:实现动态淡入淡出时,ImageLib 主题配色更新。

    具体地说,是维护计时器 ImageLib.timer 并进行配色更新。

使用 void ImageLib.change_theme(new_theme: String, duration: float) 即可
动态淡出配色到新主题 new_theme。

BREAKING CHANGE: 废除 ImageLib 的 replace_palette_colors_in_image 函数。

新增:

- $/Main/ScreenShader/ShaderRect : ColorRect:实现整个屏幕换色的 shader。

    ShaderRect 会加载 res://shaders/main_shader.tres 和
    res://shaders/main_shader.gdshader,该 shader 会作用于整个屏幕,将
    对应 PALETTE 里的颜色进行替换。

    只需要将 res://shaders/main_shader.tres 中的颜色进行更改,配色就会
    更改。

- $/Main/ImageLib : Node:实现动态淡入淡出时,ImageLib 主题配色更新。

    具体地说,是维护计时器 ImageLib.timer 并进行配色更新。

使用 void ImageLib.change_theme(new_theme: String, duration: float) 即可
动态淡出配色到新主题 new_theme。

BREAKING CHANGE: 废除 ImageLib 的 replace_palette_colors_in_image 函数。
现在只需要,而且只能将颜色改为 blue 主题下的对应颜色。
@cutekibry cutekibry merged commit 214f0c6 into main Feb 19, 2024
9 checks passed
@cutekibry cutekibry deleted the feat-20240219-color-fading branch February 19, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant