Set RGBA has the default color mode for new sprites

This commit is contained in:
David Capello 2015-08-11 13:38:51 -03:00
parent 9d4c5aaea3
commit 6d532e56c5
2 changed files with 6 additions and 6 deletions

View File

@ -13,11 +13,11 @@
</grid> </grid>
<separator text="Color Mode:" left="true" horizontal="true" /> <separator text="Color Mode:" left="true" horizontal="true" />
<box vertical="true" homogeneous="true" childspacing="0"> <hbox>
<radio id="indexed_mode" text="&amp;Indexed color" group="1" tooltip="Using a palette of 256 colors&#10;(8 bits per pixel)" /> <radio id="rgb_mode" text="&amp;RGBA" group="1" tooltip="Each pixel has Red, Green, Blue, and Alpha components&#10;(32 bits per pixel)" />
<radio id="rgb_mode" text="&amp;RGB color" group="1" tooltip="RGBA color mode&#10;(32 bits per pixel)" /> <radio id="grayscale_mode" text="&amp;Grayscale" group="1" tooltip="Each pixel has a Gray value and Alpha&#10;(16 bits per pixel)" />
<radio id="grayscale_mode" text="&amp;Grayscale" group="1" tooltip="Value and Alpha&#10;(16 bits per pixel)" /> <radio id="indexed_mode" text="&amp;Indexed" group="1" tooltip="Each pixel is a reference to the palette&#10;(8 bits per pixel)" />
</box> </hbox>
<separator text="Background:" left="true" horizontal="true" /> <separator text="Background:" left="true" horizontal="true" />
<view maxsize="true" expansive="true"> <view maxsize="true" expansive="true">

View File

@ -75,7 +75,7 @@ void NewFileCommand::onExecute(Context* context)
app::gen::NewSprite window; app::gen::NewSprite window;
// Default values: Indexed, 320x240, Background color // Default values: Indexed, 320x240, Background color
format = static_cast<PixelFormat>(get_config_int("NewSprite", "Type", IMAGE_INDEXED)); format = static_cast<PixelFormat>(get_config_int("NewSprite", "Type", IMAGE_RGB));
// Invalid format in config file. // Invalid format in config file.
if (format != IMAGE_RGB && format != IMAGE_INDEXED && format != IMAGE_GRAYSCALE) { if (format != IMAGE_RGB && format != IMAGE_INDEXED && format != IMAGE_GRAYSCALE) {
format = IMAGE_INDEXED; format = IMAGE_INDEXED;