
#include "includes.h"
#include "installergui_data.h"

/********************************************************************
 *
 *  DESCRIPTION
 *
 */

/********************************************************************
 *
 *  STATIC
 *
 */

/********************************************************************
 *
 *  EXTERN
 *
 */

/********************************************************************
 *
 *  PUBLIC
 *
 */

/********************************************************************
 *
 *  CODE
 *
 */

char * __asm igui_Message(register __a0 APTR application,
                          register __a1 struct FunctionEnvironment *localenv,
                          register __a2 char *text)
{
  #ifdef DEBUG
  DEBUG_MAKRO
  //KPrintF("%s\n", (long) text);
  #endif
 
  // create a simple text object an sho it
  if (guistuff_NewContent(application, guistuff_InitSimpleText(text)))
  {
    struct Application *app = (struct Application *) application;
    
    // maybee BACK (if specified) or respect the swing mode
    if (localenv->fe_Back.pa_Value) { guistuff_SetBackButton(app, TRUE); }
    else if (!app->app_SWING_Mode)  { igui_NameCancel(app, (char *) app->app_GlobalEnv[GENV_ABORT_BUTTON]); }

    // wait for the user
    igui_WaitApp(app);
    
    if (localenv->fe_Back.pa_Value) { guistuff_SetBackButton(app, FALSE); }
  }

  // the empty panel...
  igui_EmptyPanel(application);
  return (text);
}
