Ejemplo n.º 1
0
void        TechInfo_Init (void)
{
    int    i;
    t_frame frame;

    frame.pos.x = 150;
    frame.pos.y = 382;
    frame.size.x = TECHINFO_COLUMNS * Font_TextLength(F_MIDDLE, " ");
    frame.size.y = TECHINFO_LINES * Font_Height(F_MIDDLE);
    
    TechInfo.active = FALSE;

    TechInfo.box = gui_box_new(&frame, Msg_Get(MSG_TechInfo_BoxTitle));
    Desktop_Register_Box("TECHINFO", TechInfo.box, 0, &TechInfo.active);
    TechInfo.box->update = TechInfo_Update;

    // Layout
    TechInfo_Layout(&TechInfo, TRUE);

    // Clear lines
    for (i = 0; i != TECHINFO_LINES; i++)
    {
        strcpy(TechInfo.lines[i], "");
        TechInfo.lines_dirty[i] = TRUE;
    }
}
Ejemplo n.º 2
0
// CREATE AND INITIALIZE TILE VIEWER APPLET ----------------------------------
void    TileViewer_Init (void)
{
    t_app_tile_viewer *app = &TileViewer; // Global instance

    // Setup members
    app->tiles_width  = 16;
    app->tiles_height = app->tiles_per_page / app->tiles_width;
    app->tiles_display_frame.SetPos(0, 13);
    app->tiles_display_frame.SetSize(app->tiles_width * 8, app->tiles_height * 8);

	app->tile_selected_frame.SetPos(2, app->tiles_display_frame.GetMax().y+1);
	app->tile_selected_frame.SetSize(8,8);

	app->vram_addr_tms9918_current = 0;

    // Create box
    t_frame frame;
    frame.pos.x     = 16;
    frame.pos.y     = 65;
    frame.size.x    = app->tiles_display_frame.size.x - 1;
    frame.size.y    = app->tiles_display_frame.size.y + 13 + 13 - 1;
    app->box = gui_box_new(&frame, Msg_Get(MSG_TilesViewer_BoxTitle));
    Desktop_Register_Box ("TILES", app->box, true, &app->active);

    // Layout
    TileViewer_Layout(&TileViewer, TRUE);
}
Ejemplo n.º 3
0
void        TB_Message_Init()
{
    t_app_messages *app = &TB_Message;  // Global instance
	t_font_id font_id = (t_font_id)g_configuration.font_messages;

    app->active = true;

    // Create box
	t_frame frame;
    frame.pos.x  = 16;
    frame.pos.y  = 626;
    frame.size.x = (48 * Font_Height(font_id)) + (4*2); // 4*2=padding
    frame.size.y = (8 * Font_Height(font_id)) + (2*2); // 2*2=padding
    app->box = gui_box_new(&frame, Msg_Get(MSG_Message_BoxTitle));
	app->box->flags |= GUI_BOX_FLAGS_ALLOW_RESIZE;

    // Register to desktop
    Desktop_Register_Box("MESSAGES", app->box, true, &app->active);

    // Layout
    TB_Message_Layout(app, true);

    // Open log file
    if (app->log_filename != NULL)
    {
        app->log_file = fopen(app->log_filename, "a+t");
        if (app->log_file)
            fprintf(app->log_file, Msg_Get(MSG_Log_Session_Start), meka_date_getf());
    }
}
Ejemplo n.º 4
0
void            AboutBox_Init()
{
    t_app_about_box *app = &AboutBox;   // Global instance

    t_frame frame;
    frame.pos.x = 440;
    frame.pos.y = 62;
    frame.size.x = 346;
    frame.size.y = 85;
    app->box = gui_box_new(&frame, Msg_Get(MSG_About_BoxTitle));
    Desktop_Register_Box("ABOUT", app->box, 0, &AboutBox.active);

    // Layout
    AboutBox_Layout(TRUE);
}
Ejemplo n.º 5
0
void    Options_Init_Applet()
{
    // Create box
	t_frame frame;
    frame.pos.x     = 437;
    frame.pos.y     = 102;
    frame.size.x    = 400;
    frame.size.y    = 220;
    Options.box = gui_box_new(&frame, Msg_Get(MSG_Options_BoxTitle));
    Desktop_Register_Box("OPTIONS", Options.box, 0, &Options.active);

    // Layout
    Options_Layout(&Options, TRUE);

    // Setup other members
    Options.active = FALSE;
}
Ejemplo n.º 6
0
void    Inputs_CFG_Init_Applet (void)
{
    t_app_inputs_config *app = &Inputs_CFG; // Global instance
    t_frame frame;

    // Setup members
    app->active = FALSE;
    app->Current_Map = -1;
    app->Current_Source = 0;

    frame.pos.x     = 307;
    frame.pos.y     = 282;
    frame.size.x    = 165 + (INPUTS_CFG_FRAME_X + GUI_LOOK_FRAME_SPACING_X);
    frame.size.y    = 150;
    app->box = gui_box_new(&frame, Msg_Get(MSG_Inputs_Config_BoxTitle));
    Desktop_Register_Box ("INPUTS", app->box, 1, &app->active);

    // Layout
    Inputs_CFG_Layout(app, TRUE);
}