mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 21:47:10 +00:00
Add <colorpicker> element for XML widgets.
This commit is contained in:
parent
654d14eede
commit
d20bd1a31b
@ -24,10 +24,12 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "app.h"
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/memory.h"
|
#include "base/memory.h"
|
||||||
#include "gui/gui.h"
|
#include "gui/gui.h"
|
||||||
#include "modules/gui.h"
|
#include "modules/gui.h"
|
||||||
|
#include "widgets/color_button.h"
|
||||||
#include "xml_exception.h"
|
#include "xml_exception.h"
|
||||||
|
|
||||||
#include "tinyxml.h"
|
#include "tinyxml.h"
|
||||||
@ -311,6 +313,10 @@ static Widget* convert_xmlelement_to_widget(TiXmlElement* elem, Widget* root)
|
|||||||
widget = new Frame(false, TRANSLATE_ATTR(text));
|
widget = new Frame(false, TRANSLATE_ATTR(text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* colorpicker */
|
||||||
|
else if (ustrcmp(elem_name, "colorpicker") == 0) {
|
||||||
|
widget = new ColorButton(Color::fromMask(), app_get_current_image_type());
|
||||||
|
}
|
||||||
|
|
||||||
// Was the widget created?
|
// Was the widget created?
|
||||||
if (widget) {
|
if (widget) {
|
||||||
|
Loading…
Reference in New Issue
Block a user