diff --git a/game/interface/wardrobe/icons/brush.webp b/game/interface/wardrobe/icons/brush.webp new file mode 100644 index 00000000..58acf82a --- /dev/null +++ b/game/interface/wardrobe/icons/brush.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43506648a539cbce9347455f07b8677ff95a6d5b8931b3d64e196641782570f6 +size 1046 diff --git a/game/scripts/wardrobe/color_picker.rpy b/game/scripts/wardrobe/color_picker.rpy index 5484c947..57d358aa 100644 --- a/game/scripts/wardrobe/color_picker.rpy +++ b/game/scripts/wardrobe/color_picker.rpy @@ -387,7 +387,7 @@ init python: def add_history(col): colorpicker.history.append(col) - if len(colorpicker.history) > 35: + if len(colorpicker.history) > 10: del colorpicker.history[0] @staticmethod @@ -397,7 +397,7 @@ init python: cp = ColorPicker() default colorpicker.history = [] -default colorpicker.favorites = [Color((167, 77, 42)), Color((237, 179, 14)), Color((89, 116, 194)), Color((216, 163, 10)), Color((58, 115, 75)), Color((205, 205, 206)), Color((251, 198, 10)), Color((51, 43, 54))] + ([Color((255, 255, 255))] * 27) +default colorpicker.favorites = [Color((167, 77, 42)), Color((237, 179, 14)), Color((89, 116, 194)), Color((216, 163, 10)), Color((58, 115, 75)), Color((205, 205, 206)), Color((251, 198, 10)), Color((51, 43, 54))] + ([Color((255, 255, 255))] * 22) screen colorpickerscreen(item=None): zorder 30 @@ -417,10 +417,6 @@ screen colorpickerscreen(item=None): has vbox - # hbox: - # for i in colorpicker.history: - # add i xysize (12, 12) - if item: $ layers = [Color(tuple(i)) for i in item.color] @@ -463,23 +459,23 @@ screen colorpickerscreen(item=None): hbox: spacing 4 frame: - add cp.cpp xysize (28, 64) + add cp.cpp xysize (32, 32) frame: button: - xysize (28, 64) + xysize (32, 32) background cp.start_color action Return(["replace", cp.start_color]) text "Old" style "colorpicker_innertext" size 8 frame: button: - xysize (28, 64) + xysize (32, 32) background cp.default_color action Return(["replace", cp.default_color]) text "Org" style "colorpicker_innertext" size 8 label "Swatches" - grid 5 7: + grid 5 6: xalign 0.5 spacing 4 @@ -491,10 +487,29 @@ screen colorpickerscreen(item=None): action Return(["replace", col]) alternate Function(cp.add_favorite, i, cp.live_color) - textbutton "Finish": + label "History" + + grid 5 2: + xalign 0.5 + spacing 4 + + for col in colorpicker.history: + frame: + button: + xysize (12, 12) + background col + action Return(["replace", col]) + + hbox: align (1.0, 1.0) - action Return(["finish", cp.live_color]) - keysym ["K_ESCAPE", "K_RETURN"] + + if item: + textbutton "Reset": + action [Function(item.reset_color), Function(cp.live_replace, cp.default_color)] + + textbutton "Finish": + action Return(["finish", cp.live_color]) + keysym ["K_ESCAPE", "K_RETURN"] if config.developer: vbox: @@ -507,11 +522,22 @@ screen colorpickerscreen(item=None): text "Val:[cp.value]" text "Alpha:[cp.alpha]" + if item: + textbutton "Colour code: [item.color]": + action Function(set_clipboard, str(item.color)) + #alternate [Function(item.set_color, evaluate(get_clipboard()))] + keysym ["ctrl_K_c"] + #alternate_keysym ["ctrl_K_v"] + style colorpickerdev_text: size 12 color "#fff" outlines [(1, "#00000080", 1, 0)] +style colorpickerdev_button_text is colorpickerdev_text: + color "#cccccc" + hover_color "#ffffff" + style colorpicker_innertext is colorpickerdev_text: color "#ffffff00" outlines [] @@ -529,6 +555,7 @@ style colorpicker_button_text: style colorpicker_frame: background "cp_borders" + hover_background image_hover("cp_borders") padding (3, 3) style colorpicker_vbox: diff --git a/game/scripts/wardrobe/wardrobe.rpy b/game/scripts/wardrobe/wardrobe.rpy index 3d0a65e4..1cb1bf8e 100644 --- a/game/scripts/wardrobe/wardrobe.rpy +++ b/game/scripts/wardrobe/wardrobe.rpy @@ -559,23 +559,13 @@ screen wardrobe_menuitem(xx, yy): xanchor 1.0 pos (552, 61) - for i in xrange(current_item.layers): - button: - focus_mask None - xysize (32, 32) - background Fixed(icon_transparent, Color(tuple(current_item.color[i]))) - tooltip "Change colour ("+str(i+1)+")" - action Return(["setcolor", i]) - add icon_frame - # Reset Button + # Colour picker button: - focus_mask None xysize (32, 32) - background "#d3d3d3" - tooltip "Reset all colours" - action Return(["resetcolor"]) - text "R" align (0.5, 0.5) - add icon_frame + tooltip "Dye clothing" + action Return(["setcolor", 0]) + add "interface/wardrobe/icons/brush.webp": + xysize (32, 32) # Subcategory icons hbox: