mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 09:04:02 +00:00
Add option to disable the alert about drawing with fg/bg index out of bounds
This commit is contained in:
parent
195c74ec11
commit
fe9f8bc468
@ -175,6 +175,7 @@
|
||||
<option id="discrete_wheel" type="bool" default="false" />
|
||||
<option id="wheel_model" type="int" default="0" />
|
||||
<option id="harmony" type="int" default="0" />
|
||||
<option id="show_invalid_fg_bg_color_alert" type="bool" default="true" />
|
||||
</section>
|
||||
<section id="updater">
|
||||
<option id="inits" type="int" default="0" migrate="Updater.Inits" />
|
||||
|
@ -1023,6 +1023,7 @@ overwrite_files_on_export_sprite_sheet_alert = Show warning when overwriting fil
|
||||
gif_options_alert = Show GIF options when saving .gif files
|
||||
jpeg_options_alert = Show JPEG options when saving .jpeg files
|
||||
advanced_mode_alert = Show alert when we enter to Advanced Mode
|
||||
invalid_fg_bg_color_alert = Show alert when drawing with index out of palette bounds
|
||||
reset_alerts = Reset all alert dialogs
|
||||
available_themes = Available Themes
|
||||
select_theme = &Select
|
||||
|
@ -327,6 +327,8 @@
|
||||
pref="jpeg.show_alert" />
|
||||
<check id="advanced_mode_alert" text="@.advanced_mode_alert"
|
||||
pref="advanced_mode.show_alert" />
|
||||
<check id="invalid_fg_bg_color_alert" text="@.invalid_fg_bg_color_alert"
|
||||
pref="color_bar.show_invalid_fg_bg_color_alert" />
|
||||
<separator horizontal="true" />
|
||||
<hbox>
|
||||
<hbox expansive="true" />
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "app/ui/context_bar.h"
|
||||
#include "app/ui/editor/editor.h"
|
||||
#include "app/ui/main_window.h"
|
||||
#include "app/ui/optional_alert.h"
|
||||
#include "app/ui/status_bar.h"
|
||||
#include "app/util/expand_cel_canvas.h"
|
||||
#include "doc/brush.h"
|
||||
@ -599,8 +600,12 @@ tools::ToolLoop* create_tool_loop(
|
||||
app::Color bg = colorbar->getBgColor();
|
||||
|
||||
if (!fg.isValid() || !bg.isValid()) {
|
||||
Alert::show(Strings::alerts_invalid_fg_or_bg_colors());
|
||||
return NULL;
|
||||
if (Preferences::instance().colorBar.showInvalidFgBgColorAlert()) {
|
||||
OptionalAlert::show(
|
||||
Preferences::instance().colorBar.showInvalidFgBgColorAlert,
|
||||
1, Strings::alerts_invalid_fg_or_bg_colors());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// Create the new tool loop
|
||||
|
Loading…
Reference in New Issue
Block a user