mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Moved data/jids/*.jid files to data/widgets/*.xml.
This commit is contained in:
parent
5ea607d801
commit
c5442abcba
@ -1,17 +0,0 @@
|
|||||||
<!-- ASE - Allegro Sprite Editor -->
|
|
||||||
<!-- Copyright (C) 2001-2009 by David Capello -->
|
|
||||||
<jinete>
|
|
||||||
<window text="Color Curve" name="color_curve">
|
|
||||||
<box vertical="true">
|
|
||||||
<box horizontal="true" expansive="true">
|
|
||||||
<view expansive="true" name="curve" /><!-- custom widget -->
|
|
||||||
<box vertical="true">
|
|
||||||
<button text="&OK" name="button_ok" magnetic="true" />
|
|
||||||
<button text="&Cancel" />
|
|
||||||
<box name="target" />
|
|
||||||
<check text="&Preview" name="preview" />
|
|
||||||
</box>
|
|
||||||
</box>
|
|
||||||
</box>
|
|
||||||
</window>
|
|
||||||
</jinete>
|
|
@ -1,6 +1,19 @@
|
|||||||
<!-- ASE - Allegro Sprite Editor -->
|
<!-- ASE - Allegro Sprite Editor -->
|
||||||
<!-- Copyright (C) 2001-2009 by David Capello -->
|
<!-- Copyright (C) 2001-2009 by David Capello -->
|
||||||
<jinete>
|
<jinete>
|
||||||
|
<window text="Color Curve" name="color_curve">
|
||||||
|
<box vertical="true">
|
||||||
|
<box horizontal="true" expansive="true">
|
||||||
|
<view expansive="true" name="curve" /><!-- custom widget -->
|
||||||
|
<box vertical="true">
|
||||||
|
<button text="&OK" name="button_ok" magnetic="true" />
|
||||||
|
<button text="&Cancel" />
|
||||||
|
<box name="target" />
|
||||||
|
<check text="&Preview" name="preview" />
|
||||||
|
</box>
|
||||||
|
</box>
|
||||||
|
</box>
|
||||||
|
</window>
|
||||||
<window text="Point Properties" name="point_properties">
|
<window text="Point Properties" name="point_properties">
|
||||||
<box vertical="true">
|
<box vertical="true">
|
||||||
<box horizontal="true" expansive="true">
|
<box horizontal="true" expansive="true">
|
@ -157,12 +157,7 @@ int App::run()
|
|||||||
jmanager_refresh_screen();
|
jmanager_refresh_screen();
|
||||||
|
|
||||||
// load main window
|
// load main window
|
||||||
top_window = static_cast<Frame*>(load_widget("main.jid", "main_window"));
|
top_window = static_cast<Frame*>(load_widget("main_window.xml", "main_window"));
|
||||||
if (!top_window) {
|
|
||||||
allegro_message("Error loading data data/jids/main.jid file.\n"
|
|
||||||
"You have to reinstall the program.\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
box_menubar = jwidget_find_name(top_window, "menubar");
|
box_menubar = jwidget_find_name(top_window, "menubar");
|
||||||
box_editors = jwidget_find_name(top_window, "editor");
|
box_editors = jwidget_find_name(top_window, "editor");
|
||||||
|
@ -78,7 +78,7 @@ void AdvancedModeCommand::execute(Context* context)
|
|||||||
char key[1024];
|
char key[1024];
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
FramePtr window(load_widget("advanced.jid", "advanced_mode_warning"));
|
FramePtr window(load_widget("advanced_mode.xml", "advanced_mode_warning"));
|
||||||
Widget* warning_label = find_widget(window, "warning_label");
|
Widget* warning_label = find_widget(window, "warning_label");
|
||||||
Widget* donot_show = find_widget(window, "donot_show");
|
Widget* donot_show = find_widget(window, "donot_show");
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ void CanvasSizeCommand::execute(Context* context)
|
|||||||
JWidget left, top, right, bottom, ok;
|
JWidget left, top, right, bottom, ok;
|
||||||
|
|
||||||
// load the window widget
|
// load the window widget
|
||||||
FramePtr window(load_widget("canvas.jid", "canvas_size"));
|
FramePtr window(load_widget("canvas_size.xml", "canvas_size"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"left", &left,
|
"left", &left,
|
||||||
"top", &top,
|
"top", &top,
|
||||||
|
@ -74,7 +74,7 @@ void CelPropertiesCommand::execute(Context* context)
|
|||||||
// Get current cel (can be NULL)
|
// Get current cel (can be NULL)
|
||||||
const Cel* cel = static_cast<const LayerImage*>(layer)->get_cel(sprite->getCurrentFrame());
|
const Cel* cel = static_cast<const LayerImage*>(layer)->get_cel(sprite->getCurrentFrame());
|
||||||
|
|
||||||
FramePtr window(load_widget("celprop.jid", "cel_properties"));
|
FramePtr window(load_widget("cel_properties.xml", "cel_properties"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"frame", &label_frame,
|
"frame", &label_frame,
|
||||||
"pos", &label_pos,
|
"pos", &label_pos,
|
||||||
|
@ -95,7 +95,7 @@ void ConfigureScreen::show_dialog(Context* context)
|
|||||||
{
|
{
|
||||||
JWidget resolution, color_depth, pixel_scale, fullscreen;
|
JWidget resolution, color_depth, pixel_scale, fullscreen;
|
||||||
|
|
||||||
FramePtr window(load_widget("confscr.jid", "configure_screen"));
|
FramePtr window(load_widget("configure_screen.xml", "configure_screen"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"resolution", &resolution,
|
"resolution", &resolution,
|
||||||
"color_depth", &color_depth,
|
"color_depth", &color_depth,
|
||||||
|
@ -148,7 +148,7 @@ void ConfigureTools::execute(Context* context)
|
|||||||
bool first_time = false;
|
bool first_time = false;
|
||||||
|
|
||||||
if (!window) {
|
if (!window) {
|
||||||
window = static_cast<Frame*>(load_widget("toolconf.jid", "configure_tool"));
|
window = static_cast<Frame*>(load_widget("tools_configuration.xml", "configure_tool"));
|
||||||
first_time = true;
|
first_time = true;
|
||||||
}
|
}
|
||||||
/* if the window is opened, close it */
|
/* if the window is opened, close it */
|
||||||
|
@ -65,7 +65,7 @@ void DuplicateSpriteCommand::execute(Context* context)
|
|||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
/* load the window widget */
|
/* load the window widget */
|
||||||
FramePtr window(load_widget("dupspr.jid", "duplicate_sprite"));
|
FramePtr window(load_widget("duplicate_sprite.xml", "duplicate_sprite"));
|
||||||
|
|
||||||
src_name = jwidget_find_name(window, "src_name");
|
src_name = jwidget_find_name(window, "src_name");
|
||||||
dst_name = jwidget_find_name(window, "dst_name");
|
dst_name = jwidget_find_name(window, "dst_name");
|
||||||
|
@ -69,7 +69,7 @@ void dialogs_frame_length(const SpriteReader& sprite, int sprite_frame)
|
|||||||
JWidget frame, frlen, ok;
|
JWidget frame, frlen, ok;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
|
||||||
FramePtr window(load_widget("frlen.jid", "frame_duration"));
|
FramePtr window(load_widget("frame_duration.xml", "frame_duration"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"frame", &frame,
|
"frame", &frame,
|
||||||
"frlen", &frlen,
|
"frlen", &frlen,
|
||||||
|
@ -83,7 +83,7 @@ void NewFileCommand::execute(Context* context)
|
|||||||
int ncolors = 256;
|
int ncolors = 256;
|
||||||
|
|
||||||
// Load the window widget
|
// Load the window widget
|
||||||
FramePtr window(load_widget("newspr.jid", "new_sprite"));
|
FramePtr window(load_widget("new_sprite.xml", "new_sprite"));
|
||||||
|
|
||||||
width = jwidget_find_name(window, "width");
|
width = jwidget_find_name(window, "width");
|
||||||
height = jwidget_find_name(window, "height");
|
height = jwidget_find_name(window, "height");
|
||||||
|
@ -90,7 +90,7 @@ void NewLayerCommand::execute(Context* context)
|
|||||||
// If params specify to ask the user about the name...
|
// If params specify to ask the user about the name...
|
||||||
if (m_ask) {
|
if (m_ask) {
|
||||||
// We open the window to ask the name
|
// We open the window to ask the name
|
||||||
FramePtr window(load_widget("newlay.jid", "new_layer"));
|
FramePtr window(load_widget("new_layer.xml", "new_layer"));
|
||||||
JWidget name_widget = find_widget(window, "name");
|
JWidget name_widget = find_widget(window, "name");
|
||||||
name_widget->setText(name.c_str());
|
name_widget->setText(name.c_str());
|
||||||
jwidget_set_min_size(name_widget, 128, 0);
|
jwidget_set_min_size(name_widget, 128, 0);
|
||||||
|
@ -60,7 +60,7 @@ void NewLayerSetCommand::execute(Context* context)
|
|||||||
CurrentSpriteWriter sprite(context);
|
CurrentSpriteWriter sprite(context);
|
||||||
|
|
||||||
// load the window widget
|
// load the window widget
|
||||||
FramePtr window(load_widget("newlay.jid", "new_layer_set"));
|
FramePtr window(load_widget("new_layer.xml", "new_layer_set"));
|
||||||
|
|
||||||
window->open_window_fg();
|
window->open_window_fg();
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ void PaletteEditorCommand::execute(Context* context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* load widgets */
|
/* load widgets */
|
||||||
FramePtr window(load_widget("paledit.jid", "palette_editor"));
|
FramePtr window(load_widget("palette_editor.xml", "palette_editor"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"red", &slider_R,
|
"red", &slider_R,
|
||||||
"green", &slider_G,
|
"green", &slider_G,
|
||||||
|
@ -70,7 +70,7 @@ void SpritePropertiesCommand::execute(Context* context)
|
|||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
/* load the window widget */
|
/* load the window widget */
|
||||||
FramePtr window(load_widget("sprprop.jid", "sprite_properties"));
|
FramePtr window(load_widget("sprite_properties.xml", "sprite_properties"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"name", &name,
|
"name", &name,
|
||||||
"type", &type,
|
"type", &type,
|
||||||
|
@ -187,7 +187,7 @@ void SpriteSizeCommand::execute(Context* context)
|
|||||||
const CurrentSpriteReader sprite(context);
|
const CurrentSpriteReader sprite(context);
|
||||||
|
|
||||||
// load the window widget
|
// load the window widget
|
||||||
FramePtr window(load_widget("sprsize.jid", "sprite_size"));
|
FramePtr window(load_widget("sprite_size.xml", "sprite_size"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"width_px", &width_px,
|
"width_px", &width_px,
|
||||||
"height_px", &height_px,
|
"height_px", &height_px,
|
||||||
|
@ -94,7 +94,7 @@ void ColorCurveCommand::execute(Context* context)
|
|||||||
App::instance()->Exit.connect(&on_exit_delete_curve);
|
App::instance()->Exit.connect(&on_exit_delete_curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
FramePtr window(load_widget("colcurv.jid", "color_curve"));
|
FramePtr window(load_widget("color_curve.xml", "color_curve"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"preview", &check_preview,
|
"preview", &check_preview,
|
||||||
"button_ok", &button_ok,
|
"button_ok", &button_ok,
|
||||||
|
@ -102,7 +102,7 @@ void ConvolutionMatrixCommand::execute(Context* context)
|
|||||||
JWidget box_target;
|
JWidget box_target;
|
||||||
JWidget reload, generate;
|
JWidget reload, generate;
|
||||||
|
|
||||||
FramePtr window(load_widget("convmatr.jid", "convolution_matrix"));
|
FramePtr window(load_widget("convolution_matrix.xml", "convolution_matrix"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"preview", &check_preview,
|
"preview", &check_preview,
|
||||||
"tiled", &check_tiled,
|
"tiled", &check_tiled,
|
||||||
@ -241,7 +241,7 @@ static bool generate_select_hook(JWidget widget, void *data)
|
|||||||
JWidget div, div_auto;
|
JWidget div, div_auto;
|
||||||
JWidget bias, bias_auto;
|
JWidget bias, bias_auto;
|
||||||
|
|
||||||
JWidgetPtr window(load_widget("convmatr.jid", "generate_convolution_matrix"));
|
JWidgetPtr window(load_widget("convolution_matrix.xml", "generate_convolution_matrix"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"view_x", &view_x,
|
"view_x", &view_x,
|
||||||
"view_y", &view_y,
|
"view_y", &view_y,
|
||||||
|
@ -87,7 +87,7 @@ void DespeckleCommand::execute(Context* context)
|
|||||||
const CurrentSpriteReader sprite(context);
|
const CurrentSpriteReader sprite(context);
|
||||||
JWidget box_target, target_button, button_ok;
|
JWidget box_target, target_button, button_ok;
|
||||||
|
|
||||||
FramePtr window(load_widget("median.jid", "median"));
|
FramePtr window(load_widget("median_blur.xml", "median"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"width", &entry_width,
|
"width", &entry_width,
|
||||||
"height", &entry_height,
|
"height", &entry_height,
|
||||||
|
@ -81,7 +81,7 @@ void InvertColorCommand::execute(Context* context)
|
|||||||
const CurrentSpriteReader sprite(context);
|
const CurrentSpriteReader sprite(context);
|
||||||
JWidget box_target, target_button, button_ok;
|
JWidget box_target, target_button, button_ok;
|
||||||
|
|
||||||
FramePtr window(load_widget("invrtcol.jid", "invert_color"));
|
FramePtr window(load_widget("invert_color.xml", "invert_color"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"target", &box_target,
|
"target", &box_target,
|
||||||
"preview", &check_preview,
|
"preview", &check_preview,
|
||||||
|
@ -86,7 +86,7 @@ void ReplaceColorCommand::execute(Context* context)
|
|||||||
JWidget box_target, target_button;
|
JWidget box_target, target_button;
|
||||||
JWidget button_ok;
|
JWidget button_ok;
|
||||||
|
|
||||||
FramePtr window(load_widget("replcol.jid", "replace_color"));
|
FramePtr window(load_widget("replace_color.xml", "replace_color"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"color_buttons_box", &color_buttons_box,
|
"color_buttons_box", &color_buttons_box,
|
||||||
"preview", &check_preview,
|
"preview", &check_preview,
|
||||||
|
@ -62,7 +62,7 @@ void dialogs_draw_text(Sprite* sprite)
|
|||||||
if (!dest_image)
|
if (!dest_image)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
JWidgetPtr window = load_widget("drawtext.jid", "drawtext_window");
|
JWidgetPtr window = load_widget("draw_text.xml", "drawtext_window");
|
||||||
|
|
||||||
if (!get_widgets(window,
|
if (!get_widgets(window,
|
||||||
"font", &font_button,
|
"font", &font_button,
|
||||||
|
@ -139,7 +139,7 @@ jstring ase_file_selector(const jstring& message,
|
|||||||
|
|
||||||
if (!window) {
|
if (!window) {
|
||||||
// load the window widget
|
// load the window widget
|
||||||
window = static_cast<Frame*>(load_widget("filesel.jid", "file_selector"));
|
window = static_cast<Frame*>(load_widget("file_selector.xml", "file_selector"));
|
||||||
|
|
||||||
JWidget box = jwidget_find_name(window, "box");
|
JWidget box = jwidget_find_name(window, "box");
|
||||||
JWidget goback = jwidget_find_name(window, "goback");
|
JWidget goback = jwidget_find_name(window, "goback");
|
||||||
|
@ -59,7 +59,7 @@ void dialogs_options()
|
|||||||
old_y = y;
|
old_y = y;
|
||||||
|
|
||||||
/* load the window widget */
|
/* load the window widget */
|
||||||
FramePtr window(load_widget("options.jid", "options"));
|
FramePtr window(load_widget("options.xml", "options"));
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"mouse_x", &slider_x,
|
"mouse_x", &slider_x,
|
||||||
"mouse_y", &slider_y,
|
"mouse_y", &slider_y,
|
||||||
|
@ -360,7 +360,7 @@ static FormatOptions *get_options_JPEG(FileOp *fop)
|
|||||||
return (FormatOptions*)jpeg_options;
|
return (FormatOptions*)jpeg_options;
|
||||||
|
|
||||||
/* widgets */
|
/* widgets */
|
||||||
FramePtr window(load_widget("jpeg_options.jid", "jpeg_options"));
|
FramePtr window(load_widget("jpeg_options.xml", "jpeg_options"));
|
||||||
JWidget slider_quality, ok;
|
JWidget slider_quality, ok;
|
||||||
get_widgets(window,
|
get_widgets(window,
|
||||||
"quality", &slider_quality,
|
"quality", &slider_quality,
|
||||||
|
@ -667,7 +667,7 @@ JWidget load_widget(const char *filename, const char *name)
|
|||||||
|
|
||||||
dirs = dirs_new();
|
dirs = dirs_new();
|
||||||
|
|
||||||
usprintf(buf, "jids/%s", filename);
|
usprintf(buf, "widgets/%s", filename);
|
||||||
|
|
||||||
dirs_add_path(dirs, filename);
|
dirs_add_path(dirs, filename);
|
||||||
dirs_cat_dirs(dirs, filename_in_datadir(buf));
|
dirs_cat_dirs(dirs, filename_in_datadir(buf));
|
||||||
|
@ -475,7 +475,7 @@ static int edit_node_manual(CurvePoint* point)
|
|||||||
CurvePoint point_copy = *point;
|
CurvePoint point_copy = *point;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
FramePtr window(load_widget("pntprop.jid", "point_properties"));
|
FramePtr window(load_widget("color_curve.xml", "point_properties"));
|
||||||
|
|
||||||
entry_x = jwidget_find_name(window, "x");
|
entry_x = jwidget_find_name(window, "x");
|
||||||
entry_y = jwidget_find_name(window, "y");
|
entry_y = jwidget_find_name(window, "y");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user