diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 4c671ebe9..62500bbb4 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -100,15 +100,12 @@ https://tuxpaint.org/ (Based on http://www.codersnotes.com/notes/signed-distance-fields/ by Richard Mitton) - * Improvements to Color selectors: + * Improvements to Color selection: -------------------------------- - * Rainbow palette color picker allows you to switch to the chosen - built-in color, the pipette (color selector) color, or the - color mixer's color. - - * [WIP] The color mixer allows you to switch to the chosen built-in - color, the pipette (color selector) color, or the the rainbow palette - (color picker) color. + * The rainbow palette color picker allows you to switch to the + chosen built-in color, the pipette (color selector) color, or the + color mixer's color, and make adjustments using its hue, saturation, + and value controls. * New Starter ----------- diff --git a/docs/en/README.txt b/docs/en/README.txt index fd6e47a8c..3b1ede107 100644 --- a/docs/en/README.txt +++ b/docs/en/README.txt @@ -211,6 +211,11 @@ Main Screen Click the green checkbox button to select the color, or the "Back" button to dismiss the pop-up without picking a new color. + You may also set this tool's color to that of other color + choices: + * Whichever built-in color is selected, if any + * The Color Picker's current color + * The Color Mixer's current color * Color Mixer The "color mixer" (which has silhouette of a paint palette) allows you to create colors by blending primary additive diff --git a/docs/en/html/README.html b/docs/en/html/README.html index e02028f36..390ffa363 100644 --- a/docs/en/html/README.html +++ b/docs/en/html/README.html @@ -434,6 +434,11 @@ height="291" alt="" /> + You may also set this tool's color to that of other color choices:
  • Color Mixer
    diff --git a/docs/es_ES.UTF-8/README.txt b/docs/es_ES.UTF-8/README.txt index 0a2aed085..46d4d2ef3 100644 --- a/docs/es_ES.UTF-8/README.txt +++ b/docs/es_ES.UTF-8/README.txt @@ -211,6 +211,11 @@ Main Screen Click the green checkbox button to select the color, or the "Back" button to dismiss the pop-up without picking a new color. + You may also set this tool's color to that of other color + choices: + * Whichever built-in color is selected, if any + * The Color Picker's current color + * The Color Mixer's current color * Color Mixer The "color mixer" (which has silhouette of a paint palette) allows you to create colors by blending primary additive diff --git a/docs/es_ES.UTF-8/html/README.html b/docs/es_ES.UTF-8/html/README.html index b694bd912..2edbc0d92 100644 --- a/docs/es_ES.UTF-8/html/README.html +++ b/docs/es_ES.UTF-8/html/README.html @@ -434,6 +434,11 @@ height="291" alt="" /> + You may also set this tool's color to that of other color choices:
  • Color Mixer
    diff --git a/docs/fr_FR.UTF-8/README.txt b/docs/fr_FR.UTF-8/README.txt index fdea1d358..7e477d325 100644 --- a/docs/fr_FR.UTF-8/README.txt +++ b/docs/fr_FR.UTF-8/README.txt @@ -220,6 +220,11 @@ Lancement de Tux Paint Click the green checkbox button to select the color, or the "Back" button to dismiss the pop-up without picking a new color. + You may also set this tool's color to that of other color + choices: + * Whichever built-in color is selected, if any + * The Color Picker's current color + * The Color Mixer's current color * Color Mixer The "color mixer" (which has silhouette of a paint palette) allows you to create colors by blending primary additive diff --git a/docs/fr_FR.UTF-8/html/README.html b/docs/fr_FR.UTF-8/html/README.html index 825ae9689..954459109 100644 --- a/docs/fr_FR.UTF-8/html/README.html +++ b/docs/fr_FR.UTF-8/html/README.html @@ -434,6 +434,11 @@ height="291" alt="" /> + You may also set this tool's color to that of other color choices:
  • Color Mixer
    diff --git a/docs/gl_ES.UTF-8/README.txt b/docs/gl_ES.UTF-8/README.txt index c1a4be8c7..bfc705993 100644 --- a/docs/gl_ES.UTF-8/README.txt +++ b/docs/gl_ES.UTF-8/README.txt @@ -213,6 +213,11 @@ Pantalla principal Click the green checkbox button to select the color, or the "Back" button to dismiss the pop-up without picking a new color. + You may also set this tool's color to that of other color + choices: + * Whichever built-in color is selected, if any + * The Color Picker's current color + * The Color Mixer's current color * Color Mixer The "color mixer" (which has silhouette of a paint palette) allows you to create colors by blending primary additive diff --git a/docs/gl_ES.UTF-8/html/README.html b/docs/gl_ES.UTF-8/html/README.html index cf732b486..21d7e512c 100644 --- a/docs/gl_ES.UTF-8/html/README.html +++ b/docs/gl_ES.UTF-8/html/README.html @@ -434,6 +434,11 @@ height="291" alt="" /> + You may also set this tool's color to that of other color choices:
  • Color Mixer
    diff --git a/docs/ja_JP.UTF-8/README.txt b/docs/ja_JP.UTF-8/README.txt index 0681f62c3..a8aedcce7 100644 --- a/docs/ja_JP.UTF-8/README.txt +++ b/docs/ja_JP.UTF-8/README.txt @@ -161,6 +161,11 @@ Tux Paint の起動 数百段階の色相 — 上部の赤から下部の紫まで — が、数百段階の彩度 — 左側の淡い色から右側の純色まで — で表示されます。縦のグレーの領域では、数百段階で、明度 — 上部が最も明るく、下部が最も暗い — を選ぶことができます。 緑色のチェックボタンをクリックして色を確定します。「もどる」ボタンをクリックすると、色を選択せずにポップアップを終了します。 + You may also set this tool's color to that of other color + choices: + * Whichever built-in color is selected, if any + * The Color Picker's current color + * The Color Mixer's current color * カラーミキサー 絵の具のパレットのようなアイコンの「カラーミキサー」では、加法混色の三原色 — 赤、青、黄と、白(色合い)、グレー(色調)、黒(濃淡)を混ぜて色を作成することができます。 diff --git a/docs/ja_JP.UTF-8/html/README.html b/docs/ja_JP.UTF-8/html/README.html index 238fd042e..54e6874a1 100644 --- a/docs/ja_JP.UTF-8/html/README.html +++ b/docs/ja_JP.UTF-8/html/README.html @@ -434,6 +434,11 @@ height="291" alt="" /> + You may also set this tool's color to that of other color choices:
  • カラーミキサー
    diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 7a1c7af19..05b0f2090 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -25293,6 +25293,8 @@ static int do_color_picker(int prev_color) color_picker_top, color_picker_val_left, color_picker_val_top); + + playsound(screen, 1, SND_BUBBLE, 1, SNDPOS_CENTER, SNDDIST_NEAR); } } else if (event.type == SDL_MOUSEMOTION) @@ -25404,6 +25406,20 @@ static int do_color_picker(int prev_color) event.button.y >= back_top && event.button.y < back_top + img_back->h) do_setcursor(cursor_hand); + else if ((event.button.x >= prev_color_left && + event.button.x < prev_color_left + img_back->w && + event.button.y >= prev_color_top && + event.button.y < prev_color_top + img_back->h && + prev_color != -1 && prev_color < NUM_DEFAULT_COLORS) || + (event.button.x >= pipette_left && + event.button.x < pipette_left + img_back->w && + event.button.y >= pipette_top && + event.button.y < pipette_top + img_back->h) || + (event.button.x >= mixer_left && + event.button.x < mixer_left + img_back->w && + event.button.y >= mixer_top && + event.button.y < mixer_top + img_back->h)) + do_setcursor(cursor_hand); else if (event.button.x >= done_left && event.button.x < done_left + img_yes->w && event.button.y >= done_top @@ -25731,9 +25747,11 @@ enum COLOR_MIXER_BTN_CLEAR, COLOR_MIXER_BTN_USE, COLOR_MIXER_BTN_BACK, +#if 0 COLOR_MIXER_BTN_PREV_COLOR, COLOR_MIXER_BTN_PIPETTE, COLOR_MIXER_BTN_RAINBOW, +#endif NUM_COLOR_MIXER_BTNS }; @@ -26001,6 +26019,7 @@ static int do_color_mix(int prev_color) SDL_BlitSurface(img_mixerlabel_clear, NULL, screen, &dest); +#if 0 /* Draw buttons to pull colors from other sources: */ /* (Color buckets) */ @@ -26036,15 +26055,15 @@ static int do_color_mix(int prev_color) /* (Rainbow) */ - img_color_picker_btn = thumbnail(img_color_picker, cell_w - 2, cell_h - 2, 0); - color_mix_btn_lefts[COLOR_MIXER_BTN_RAINBOW] = r_final.x + (cell_w * 2) + 2; color_mix_btn_tops[COLOR_MIXER_BTN_RAINBOW] = r_final.y + (cell_h * 2) + 2; + img_color_picker_btn = thumbnail(img_color_picker, cell_w - 2, cell_h - 2, 0); if (img_color_picker_btn != NULL) { dest.x = color_mix_btn_lefts[COLOR_MIXER_BTN_RAINBOW]; dest.y = color_mix_btn_tops[COLOR_MIXER_BTN_RAINBOW]; SDL_BlitSurface(img_color_picker_btn, NULL, screen, &dest); + SDL_FreeSurface(img_color_picker_btn); } dest.x = color_mix_btn_lefts[COLOR_MIXER_BTN_RAINBOW] + 4; @@ -26057,6 +26076,7 @@ static int do_color_mix(int prev_color) color_hexes[NUM_DEFAULT_COLORS + 2][0], color_hexes[NUM_DEFAULT_COLORS + 2][1], color_hexes[NUM_DEFAULT_COLORS + 2][2])); +#endif /* Show "Back" button */ @@ -26166,7 +26186,13 @@ static int do_color_mix(int prev_color) (btn_clicked == COLOR_MIXER_BTN_UNDO && color_mix_cur_undo != color_mix_oldest_undo) || (btn_clicked == COLOR_MIXER_BTN_REDO - && color_mix_cur_undo != color_mix_newest_undo)) + && color_mix_cur_undo != color_mix_newest_undo) +#if 0 + || (btn_clicked == COLOR_MIXER_BTN_PREV_COLOR && prev_color != -1 && prev_color < NUM_DEFAULT_COLORS) + || btn_clicked == COLOR_MIXER_BTN_PIPETTE + || btn_clicked == COLOR_MIXER_BTN_RAINBOW +#endif + ) { do_setcursor(cursor_hand); } @@ -26252,6 +26278,14 @@ static int do_color_mix(int prev_color) playsound(screen, 1, SND_BUBBLE, 1, SNDPOS_CENTER, SNDDIST_NEAR); } +#if 0 + else if ((btn_clicked == COLOR_MIXER_BTN_PREV_COLOR && prev_color != -1 && prev_color < NUM_DEFAULT_COLORS) + || btn_clicked == COLOR_MIXER_BTN_PIPETTE + || btn_clicked == COLOR_MIXER_BTN_RAINBOW) + { + printf("clicked %d\n", btn_clicked); + } +#endif else if (btn_clicked == COLOR_MIXER_BTN_BACK) { /* Decided to go Back */ @@ -26443,10 +26477,6 @@ static int do_color_mix(int prev_color) update_canvas(0, 0, canvas->w, canvas->h); - if (img_color_picker_btn != NULL) { - SDL_FreeSurface(img_color_picker_btn); - } - return (chose); }