SSMODULEDECLSPEC int SSMODULECALL SSModule_GetModuleDesc(SSModuleDesc_p pModuleDesc, char *pchHomeDirectory)
{
  FILE *hfNLSFile;

  if (!pModuleDesc)
    return SSMODULE_ERROR_INVALIDPARAMETER;

  // Return info about module!
  pModuleDesc->iVersionMajor = 1;
  pModuleDesc->iVersionMinor = 70;
  strcpy(pModuleDesc->achModuleName, "Moving Text");
  strcpy(pModuleDesc->achModuleDesc,
         "This modules moves text on the screen!\n"
         "Written by Warp5"
        );

  // If we have NLS support, then show the module description in
  // the chosen language!
  hfNLSFile = internal_OpenNLSFile(pchHomeDirectory);
  if (hfNLSFile)
  {
    sprintmsg(pModuleDesc->achModuleName, hfNLSFile, "MOD_NAME");
    sprintmsg(pModuleDesc->achModuleDesc, hfNLSFile, "MOD_DESC");
    internal_CloseNLSFile(hfNLSFile);
  }

  pModuleDesc->bConfigurable = TRUE;
  pModuleDesc->bSupportsPasswordProtection = TRUE;

  return SSMODULE_NOERROR;
}
Beispiel #2
0
SSMODULEDECLSPEC int SSMODULECALL SSModule_GetModuleDesc(SSModuleDesc_p pModuleDesc, char *pchHomeDirectory)
{
  FILE *hfNLSFile;

  if (!pModuleDesc)
    return SSMODULE_ERROR_INVALIDPARAMETER;

  // Return info about module!
  pModuleDesc->iVersionMajor = 1;
  pModuleDesc->iVersionMinor = 60;
  strcpy(pModuleDesc->achModuleName, "Blank screen");
  strcpy(pModuleDesc->achModuleDesc,
         "Simple blank screen, using the power of Black! :)\n"
         "Written by Doodle"
        );

  // If we have NLS support, then show the module description in
  // the chosen language!
  hfNLSFile = internal_OpenNLSFile(pchHomeDirectory);
  if (hfNLSFile)
  {
    sprintmsg(pModuleDesc->achModuleName, hfNLSFile, "MOD_NAME");
    sprintmsg(pModuleDesc->achModuleDesc, hfNLSFile, "MOD_DESC");
    internal_CloseNLSFile(hfNLSFile);
  }

  pModuleDesc->bConfigurable = FALSE;
  pModuleDesc->bSupportsPasswordProtection = TRUE;

  return SSMODULE_NOERROR;
}
static void internal_SetConfigDialogText(HWND hwnd, char *pchHomeDirectory) {
	FILE *hfNLSFile;
	char achTemp[128];

	if (!pchHomeDirectory) return;
	hfNLSFile = internal_OpenNLSFile(pchHomeDirectory);
	if (hfNLSFile) {
		// Window title
		if (sprintmsg(achTemp, hfNLSFile, "CFG_0001")) WinSetWindowText(hwnd, achTemp);

		// Label for the moving text label
		if (sprintmsg(achTemp, hfNLSFile, "CFG_0002")) WinSetDlgItemText(hwnd, ST_TEXT, achTemp);

		// OK button
		if (sprintmsg(achTemp, hfNLSFile, "CFG_0003")) WinSetDlgItemText(hwnd, PB_CONFOK, achTemp);
		// Cancel button
		if (sprintmsg(achTemp, hfNLSFile, "CFG_0004")) WinSetDlgItemText(hwnd, PB_CONFCANCEL, achTemp);

		internal_CloseNLSFile(hfNLSFile);
	}
}