* Changed file loading to fix issue #73
* Moved few functions from misc.cpp to profile.cpp (used to set/get user dir) * Removed some warnings * More work to change const char* to std::string * Some work on file path to fix issue #60 with bad slashes on POSIX platformdev-ui
parent
9f5bef030d
commit
d6bbc99c90
|
@ -25,10 +25,6 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
||||||
static bool g_bUserDir = false;
|
|
||||||
static char g_userDir[100] = "";
|
|
||||||
|
|
||||||
|
|
||||||
// Returns a non-accented letter.
|
// Returns a non-accented letter.
|
||||||
|
|
||||||
char GetNoAccent(char letter)
|
char GetNoAccent(char letter)
|
||||||
|
@ -234,72 +230,11 @@ void TimeToAscii(time_t time, char *buffer)
|
||||||
#endif*/
|
#endif*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Makes a copy of a file.
|
|
||||||
|
|
||||||
bool Xfer(char* src, char* dst)
|
|
||||||
{
|
|
||||||
FILE *fs, *fd;
|
|
||||||
char *buffer;
|
|
||||||
int len;
|
|
||||||
|
|
||||||
fs = fopen(src, "rb");
|
|
||||||
if ( fs == 0 )
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
fd = fopen(dst, "wb");
|
|
||||||
if ( fd == 0 )
|
|
||||||
{
|
|
||||||
fclose(fs);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
buffer = static_cast<char*>(malloc(10000));
|
|
||||||
|
|
||||||
while ( true )
|
|
||||||
{
|
|
||||||
len = fread(buffer, 1, 10000, fs);
|
|
||||||
if ( len == 0 ) break;
|
|
||||||
fwrite(buffer, 1, len, fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(buffer);
|
|
||||||
fclose(fs);
|
|
||||||
fclose(fd);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy a file into the temporary folder.
|
|
||||||
|
|
||||||
bool CopyFileToTemp(char* filename)
|
|
||||||
{
|
|
||||||
char src[100];
|
|
||||||
char dst[100];
|
|
||||||
char save[100];
|
|
||||||
|
|
||||||
UserDir(src, filename, "textures");
|
|
||||||
|
|
||||||
strcpy(save, g_userDir);
|
|
||||||
strcpy(g_userDir, "temp");
|
|
||||||
UserDir(dst, filename, "textures");
|
|
||||||
strcpy(g_userDir, save);
|
|
||||||
|
|
||||||
//_mkdir("temp");
|
|
||||||
system("mkdir temp");
|
|
||||||
|
|
||||||
if ( !Xfer(src, dst) ) return false;
|
|
||||||
|
|
||||||
strcpy(filename, dst);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy a list of numbered files into the temporary folder.
|
// Copy a list of numbered files into the temporary folder.
|
||||||
|
|
||||||
bool CopyFileListToTemp(char* filename, int* list, int total)
|
bool CopyFileListToTemp(char* filename, int* list, int total)
|
||||||
{
|
{
|
||||||
char name[100];
|
/*char name[100];
|
||||||
char ext[10];
|
char ext[10];
|
||||||
char file[100];
|
char file[100];
|
||||||
char save[100];
|
char save[100];
|
||||||
|
@ -329,8 +264,8 @@ bool CopyFileListToTemp(char* filename, int* list, int total)
|
||||||
UserDir(file, filename, "textures");
|
UserDir(file, filename, "textures");
|
||||||
strcpy(filename, file);
|
strcpy(filename, file);
|
||||||
strcpy(g_userDir, save);
|
strcpy(g_userDir, save);
|
||||||
|
*/
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -342,56 +277,3 @@ void AddExt(char* filename, const char* ext)
|
||||||
strcat(filename, ext);
|
strcat(filename, ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Specifies the user folder.
|
|
||||||
|
|
||||||
void UserDir(bool bUser, const char* dir)
|
|
||||||
{
|
|
||||||
g_bUserDir = bUser;
|
|
||||||
strcpy(g_userDir, dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Replaces the string %user% by the user folder.
|
|
||||||
// in: dir = "%user%toto.txt"
|
|
||||||
// def = "abc\"
|
|
||||||
// out: buffer = "abc\toto.txt"
|
|
||||||
|
|
||||||
void UserDir(char* buffer, const char* dir, const char* def)
|
|
||||||
{
|
|
||||||
char ddir[100];
|
|
||||||
const char* add;
|
|
||||||
|
|
||||||
if ( strstr(dir, "\\") == 0 && def[0] != 0 )
|
|
||||||
{
|
|
||||||
sprintf(ddir, "%s\\%s", def, dir);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy(ddir, dir);
|
|
||||||
}
|
|
||||||
dir = ddir;
|
|
||||||
|
|
||||||
while ( *dir != 0 )
|
|
||||||
{
|
|
||||||
if ( dir[0] == '%' &&
|
|
||||||
dir[1] == 'u' &&
|
|
||||||
dir[2] == 's' &&
|
|
||||||
dir[3] == 'e' &&
|
|
||||||
dir[4] == 'r' &&
|
|
||||||
dir[5] == '%' ) // %user% ?
|
|
||||||
{
|
|
||||||
if ( g_bUserDir ) add = g_userDir;
|
|
||||||
else add = def;
|
|
||||||
|
|
||||||
while ( *add != 0 )
|
|
||||||
{
|
|
||||||
*buffer++ = *add++;
|
|
||||||
}
|
|
||||||
dir += 6; // jumps to %user%
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
*buffer++ = *dir++;
|
|
||||||
}
|
|
||||||
*buffer = 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -29,8 +29,5 @@ extern char GetToLower(char letter);
|
||||||
|
|
||||||
extern void TimeToAscii(time_t time, char *buffer);
|
extern void TimeToAscii(time_t time, char *buffer);
|
||||||
|
|
||||||
extern bool CopyFileToTemp(char* filename);
|
|
||||||
extern bool CopyFileListToTemp(char* filename, int* list, int total);
|
extern bool CopyFileListToTemp(char* filename, int* list, int total);
|
||||||
extern void AddExt(char* filename, const char* ext);
|
extern void AddExt(char* filename, const char* ext);
|
||||||
extern void UserDir(bool bUser, const char* dir);
|
|
||||||
extern void UserDir(char* buffer, const char* dir, const char* def);
|
|
||||||
|
|
|
@ -182,3 +182,48 @@ std::vector< std::string > CProfile::GetLocalProfileSection(std::string section,
|
||||||
|
|
||||||
return ret_list;
|
return ret_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CProfile::SetUserDir(std::string dir)
|
||||||
|
{
|
||||||
|
m_userDirectory = dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string CProfile::GetUserBasedPath(std::string dir, std::string default_dir)
|
||||||
|
{
|
||||||
|
std::string path = dir;
|
||||||
|
boost::replace_all(path, "\\", "/");
|
||||||
|
if (dir.find("/") == std::string::npos) {
|
||||||
|
path = default_dir + "/" + dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_userDirectory.length() > 0) {
|
||||||
|
boost::replace_all(path, "%user%", m_userDirectory);
|
||||||
|
} else {
|
||||||
|
boost::replace_all(path, "%user%", default_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
return fs::path(path).make_preferred().string();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool CProfile::CopyFileToTemp(std::string filename)
|
||||||
|
{
|
||||||
|
std::string src, dst;
|
||||||
|
std::string tmp_user_dir = m_userDirectory;
|
||||||
|
|
||||||
|
src = GetUserBasedPath(filename, "textures");
|
||||||
|
SetUserDir("temp");
|
||||||
|
dst = GetUserBasedPath(filename, "textures");
|
||||||
|
SetUserDir(tmp_user_dir);
|
||||||
|
|
||||||
|
fs::create_directory(fs::path(dst).parent_path().make_preferred().string());
|
||||||
|
fs::copy_file(src, dst, fs::copy_option::overwrite_if_exists);
|
||||||
|
if (fs::exists(dst)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,20 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "common/singleton.h"
|
#include "common/singleton.h"
|
||||||
|
|
||||||
|
// this is just to fix problem with undefined reference when compiling with c++11 support
|
||||||
|
#define BOOST_NO_SCOPED_ENUMS
|
||||||
|
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CProfile
|
* \class CProfile
|
||||||
|
@ -101,10 +107,30 @@ class CProfile : public CSingleton<CProfile>
|
||||||
* \return vector of values
|
* \return vector of values
|
||||||
*/
|
*/
|
||||||
std::vector< std::string > GetLocalProfileSection(std::string section, std::string key);
|
std::vector< std::string > GetLocalProfileSection(std::string section, std::string key);
|
||||||
|
|
||||||
|
/** Sets current user directory
|
||||||
|
* \param dir
|
||||||
|
*/
|
||||||
|
void SetUserDir(std::string dir);
|
||||||
|
|
||||||
|
/** Returns path based on current user. Replaces %user% in path with current user dir or
|
||||||
|
* uses default_dir param if no user dir is specified
|
||||||
|
* \param dir
|
||||||
|
* \param default_dir
|
||||||
|
* \return path
|
||||||
|
*/
|
||||||
|
std::string GetUserBasedPath(std::string dir, std::string default_dir);
|
||||||
|
|
||||||
|
/** opy a file into the temporary folder.
|
||||||
|
* \param filename
|
||||||
|
* \return true on success
|
||||||
|
*/
|
||||||
|
bool CopyFileToTemp(std::string filename);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::property_tree::ptree m_propertyTree;
|
boost::property_tree::ptree m_propertyTree;
|
||||||
bool m_profileNeedSave;
|
bool m_profileNeedSave;
|
||||||
|
std::string m_userDirectory;
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Global function to get profile instance
|
//! Global function to get profile instance
|
||||||
|
|
|
@ -1187,7 +1187,7 @@ void CRobotMain::ChangePhase(Phase phase)
|
||||||
pe->SetFontType(Gfx::FONT_COLOBOT);
|
pe->SetFontType(Gfx::FONT_COLOBOT);
|
||||||
pe->SetEditCap(false);
|
pe->SetEditCap(false);
|
||||||
pe->SetHiliteCap(false);
|
pe->SetHiliteCap(false);
|
||||||
pe->ReadText("help/win.txt");
|
pe->ReadText(std::string("help/win.txt"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -4094,8 +4094,9 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
||||||
{
|
{
|
||||||
OpString(line, "image", name);
|
OpString(line, "image", name);
|
||||||
AddExt(name, ".png");
|
AddExt(name, ".png");
|
||||||
if (strstr(name, "%user%") != 0)
|
if (strstr(name, "%user%") != 0) {
|
||||||
CopyFileToTemp(name);
|
GetProfile().CopyFileToTemp(std::string(name));
|
||||||
|
}
|
||||||
|
|
||||||
m_terrain->AddMaterial(OpInt(line, "id", 0),
|
m_terrain->AddMaterial(OpInt(line, "id", 0),
|
||||||
name,
|
name,
|
||||||
|
|
|
@ -3900,7 +3900,7 @@ bool CScript::WriteScript(const char* filename)
|
||||||
edit->SetMaxChar(Ui::EDITSTUDIOMAX);
|
edit->SetMaxChar(Ui::EDITSTUDIOMAX);
|
||||||
edit->SetAutoIndent(m_engine->GetEditIndentMode());
|
edit->SetAutoIndent(m_engine->GetEditIndentMode());
|
||||||
edit->SetText(m_script);
|
edit->SetText(m_script);
|
||||||
edit->WriteText(name.c_str());
|
edit->WriteText(name);
|
||||||
m_interface->DeleteControl(EVENT_EDIT9);
|
m_interface->DeleteControl(EVENT_EDIT9);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -671,7 +671,7 @@ void CDisplayInfo::ChangeIndexButton(int index)
|
||||||
{
|
{
|
||||||
filename = m_main->GetDisplayInfoName(m_index);
|
filename = m_main->GetDisplayInfoName(m_index);
|
||||||
edit->ReadText(filename);
|
edit->ReadText(filename);
|
||||||
edit->HyperHome(filename);
|
edit->HyperHome(std::string(filename));
|
||||||
SetPosition(m_main->GetDisplayInfoPosition(m_index));
|
SetPosition(m_main->GetDisplayInfoPosition(m_index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
136
src/ui/edit.cpp
136
src/ui/edit.cpp
|
@ -560,7 +560,7 @@ bool CEdit::IsLinkPos(Math::Point pos)
|
||||||
if ( i == -1 ) return false;
|
if ( i == -1 ) return false;
|
||||||
if ( i >= m_len ) return false;
|
if ( i >= m_len ) return false;
|
||||||
|
|
||||||
if ( m_format.size() > i && ((m_format[i] & Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_LINK)) return true; // TODO
|
if ( m_format.size() > static_cast<unsigned int>(i) && ((m_format[i] & Gfx::FONT_MASK_HIGHLIGHT) == Gfx::FONT_HIGHLIGHT_LINK)) return true; // TODO
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ void CEdit::HyperFlush()
|
||||||
|
|
||||||
// Indicates which is the home page.
|
// Indicates which is the home page.
|
||||||
|
|
||||||
void CEdit::HyperHome(const char *filename)
|
void CEdit::HyperHome(std::string filename)
|
||||||
{
|
{
|
||||||
HyperFlush();
|
HyperFlush();
|
||||||
HyperAdd(filename, 0);
|
HyperAdd(filename, 0);
|
||||||
|
@ -768,10 +768,10 @@ void CEdit::HyperHome(const char *filename)
|
||||||
|
|
||||||
// Performs a hyper jump through a link.
|
// Performs a hyper jump through a link.
|
||||||
|
|
||||||
void CEdit::HyperJump(const char *name, const char *marker)
|
void CEdit::HyperJump(std::string name, std::string marker)
|
||||||
{
|
{
|
||||||
char filename[100];
|
std::string filename;
|
||||||
char sMarker[100];
|
std:: string sMarker;
|
||||||
int i, line, pos;
|
int i, line, pos;
|
||||||
|
|
||||||
if ( m_historyCurrent >= 0 )
|
if ( m_historyCurrent >= 0 )
|
||||||
|
@ -779,18 +779,17 @@ void CEdit::HyperJump(const char *name, const char *marker)
|
||||||
m_history[m_historyCurrent].firstLine = m_lineFirst;
|
m_history[m_historyCurrent].firstLine = m_lineFirst;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(sMarker, marker);
|
sMarker = marker;
|
||||||
|
|
||||||
//? sprintf(filename, "help\\%s.txt", name);
|
//? sprintf(filename, "help\\%s.txt", name);
|
||||||
if ( name[0] == '%' )
|
|
||||||
{
|
if ( name[0] == '%' ) {
|
||||||
UserDir(filename, name, "");
|
filename = GetProfile().GetUserBasedPath(name, "") + ".txt";
|
||||||
strcat(filename, ".txt");
|
} else {
|
||||||
}
|
std::string path = CApplication::GetInstancePointer()->GetDataDirPath() + "/help/" + name + ".txt";
|
||||||
else
|
filename = fs::path(path).generic_string();
|
||||||
{
|
|
||||||
sprintf(filename, "help\\%s.txt", name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ReadText(filename) )
|
if ( ReadText(filename) )
|
||||||
{
|
{
|
||||||
Justif();
|
Justif();
|
||||||
|
@ -798,7 +797,7 @@ void CEdit::HyperJump(const char *name, const char *marker)
|
||||||
line = 0;
|
line = 0;
|
||||||
for ( i=0 ; i<m_markerTotal ; i++ )
|
for ( i=0 ; i<m_markerTotal ; i++ )
|
||||||
{
|
{
|
||||||
if ( strcmp(sMarker, m_marker[i].name) == 0 )
|
if (sMarker == m_marker[i].name)
|
||||||
{
|
{
|
||||||
pos = m_marker[i].pos;
|
pos = m_marker[i].pos;
|
||||||
for ( i=0 ; i<m_lineTotal ; i++ )
|
for ( i=0 ; i<m_lineTotal ; i++ )
|
||||||
|
@ -819,12 +818,12 @@ void CEdit::HyperJump(const char *name, const char *marker)
|
||||||
|
|
||||||
// Adds text to the history of visited.
|
// Adds text to the history of visited.
|
||||||
|
|
||||||
bool CEdit::HyperAdd(const char *filename, int firstLine)
|
bool CEdit::HyperAdd(std::string filename, int firstLine)
|
||||||
{
|
{
|
||||||
if ( m_historyCurrent >= EDITHISTORYMAX-1 ) return false;
|
if ( m_historyCurrent >= EDITHISTORYMAX-1 ) return false;
|
||||||
|
|
||||||
m_historyCurrent ++;
|
m_historyCurrent ++;
|
||||||
strcpy(m_history[m_historyCurrent].filename, filename);
|
m_history[m_historyCurrent].filename = filename;
|
||||||
m_history[m_historyCurrent].firstLine = firstLine;
|
m_history[m_historyCurrent].firstLine = firstLine;
|
||||||
|
|
||||||
m_historyTotal = m_historyCurrent+1;
|
m_historyTotal = m_historyCurrent+1;
|
||||||
|
@ -1136,16 +1135,14 @@ void CEdit::Draw()
|
||||||
|
|
||||||
// Draw an image part.
|
// Draw an image part.
|
||||||
|
|
||||||
void CEdit::DrawImage(Math::Point pos, const char *name, float width,
|
void CEdit::DrawImage(Math::Point pos, std::string name, float width,
|
||||||
float offset, float height, int nbLine)
|
float offset, float height, int nbLine)
|
||||||
{
|
{
|
||||||
Math::Point uv1, uv2, dim;
|
Math::Point uv1, uv2, dim;
|
||||||
float dp;
|
float dp;
|
||||||
char filename[100];
|
std::string filename;
|
||||||
|
|
||||||
//? sprintf(filename, "diagram\\%s.png", name);
|
filename = GetProfile().GetUserBasedPath(name, "diagram") + ".png";
|
||||||
UserDir(filename, name, "diagram");
|
|
||||||
strcat(filename, ".png");
|
|
||||||
|
|
||||||
m_engine->SetTexture(filename);
|
m_engine->SetTexture(filename);
|
||||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||||
|
@ -1389,77 +1386,64 @@ int CEdit::GetTextLength()
|
||||||
// Returns a name in a command.
|
// Returns a name in a command.
|
||||||
// \x nom1 nom2 nom3;
|
// \x nom1 nom2 nom3;
|
||||||
|
|
||||||
void GetNameParam(const char *cmd, int rank, char *buffer)
|
std::string GetNameParam(std::string cmd, int rank)
|
||||||
{
|
{
|
||||||
int i;
|
std::vector<std::string> results;
|
||||||
|
boost::split(results, cmd, boost::is_any_of(" ;"));
|
||||||
for ( i=0 ; i<rank ; i++ )
|
|
||||||
{
|
if (results.size() > static_cast<unsigned int>(rank)) {
|
||||||
while ( *cmd != ' ' && *cmd != ';' )
|
return results.at(rank);
|
||||||
{
|
|
||||||
cmd ++;
|
|
||||||
}
|
|
||||||
if ( *cmd != ';' ) cmd ++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while ( *cmd != ' ' && *cmd != ';' )
|
return "";
|
||||||
{
|
|
||||||
*buffer++ = *cmd++;
|
|
||||||
}
|
|
||||||
*buffer = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a number of a command.
|
// Returns a number of a command.
|
||||||
// \x nom n1 n2;
|
// \x nom n1 n2;
|
||||||
|
|
||||||
int GetValueParam(const char *cmd, int rank)
|
int GetValueParam(std::string cmd, int rank)
|
||||||
{
|
{
|
||||||
int n, i;
|
std::vector<std::string> results;
|
||||||
|
boost::split(results, cmd, boost::is_any_of(" ;"));
|
||||||
for ( i=0 ; i<rank ; i++ )
|
int return_value = 0;
|
||||||
{
|
|
||||||
while ( *cmd != ' ' && *cmd != ';' )
|
if (results.size() > static_cast<unsigned int>(rank)) {
|
||||||
{
|
try {
|
||||||
cmd ++;
|
return_value = std::stoi(results.at(rank));
|
||||||
|
} catch (std::invalid_argument &e) {
|
||||||
|
GetLogger()->Error("Exception std::invalid_argument caught in GetValueParam function");
|
||||||
|
} catch (std::out_of_range &e) {
|
||||||
|
GetLogger()->Error("Exception std::out_of_range caught in GetValueParam function");
|
||||||
}
|
}
|
||||||
if ( *cmd != ';' ) cmd ++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sscanf(cmd, "%d", &n);
|
return return_value;
|
||||||
return n;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Frees all images.
|
// Frees all images.
|
||||||
|
|
||||||
void CEdit::FreeImage()
|
void CEdit::FreeImage()
|
||||||
{
|
{
|
||||||
char filename[100];
|
std::string filename;
|
||||||
int i;
|
|
||||||
|
|
||||||
for ( i=0 ; i<m_imageTotal ; i++ )
|
for (int i = 0 ; i < m_imageTotal; i++ ) {
|
||||||
{
|
filename = GetProfile().GetUserBasedPath(m_image[i].name, "diagram") + ".png";
|
||||||
//? sprintf(filename, "diagram\\%s.png", m_image[i].name);
|
|
||||||
UserDir(filename, m_image[i].name, "diagram");
|
|
||||||
strcat(filename, ".png");
|
|
||||||
m_engine->DeleteTexture(filename);
|
m_engine->DeleteTexture(filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads the texture of an image.
|
// Reads the texture of an image.
|
||||||
|
|
||||||
void CEdit::LoadImage(const char *name)
|
void CEdit::LoadImage(std::string name)
|
||||||
{
|
{
|
||||||
char filename[100];
|
std::string filename;
|
||||||
|
filename = GetProfile().GetUserBasedPath(name, "diagram") + ".png";
|
||||||
//? sprintf(filename, "diagram\\%s.png", name);
|
|
||||||
UserDir(filename, name, "diagram");
|
|
||||||
strcat(filename, ".png");
|
|
||||||
m_engine->LoadTexture(filename);
|
m_engine->LoadTexture(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read from a text file.
|
// Read from a text file.
|
||||||
|
|
||||||
bool CEdit::ReadText(const char *filename, int addSize)
|
bool CEdit::ReadText(std::string filename, int addSize)
|
||||||
{
|
{
|
||||||
FILE *file = NULL;
|
FILE *file = NULL;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
@ -1471,7 +1455,7 @@ bool CEdit::ReadText(const char *filename, int addSize)
|
||||||
bool bInSoluce, bBOL;
|
bool bInSoluce, bBOL;
|
||||||
|
|
||||||
if ( filename[0] == 0 ) return false;
|
if ( filename[0] == 0 ) return false;
|
||||||
file = fopen(filename, "rb");
|
file = fopen(filename.c_str(), "rb");
|
||||||
if ( file == NULL ) return false;
|
if ( file == NULL ) return false;
|
||||||
|
|
||||||
fseek(file, 0, SEEK_END);
|
fseek(file, 0, SEEK_END);
|
||||||
|
@ -1605,8 +1589,8 @@ bool CEdit::ReadText(const char *filename, int addSize)
|
||||||
{
|
{
|
||||||
if ( iLink < EDITLINKMAX )
|
if ( iLink < EDITLINKMAX )
|
||||||
{
|
{
|
||||||
GetNameParam(buffer+i+3, 0, m_link[iLink].name);
|
m_link[iLink].name = GetNameParam(buffer+i+3, 0);
|
||||||
GetNameParam(buffer+i+3, 1, m_link[iLink].marker);
|
m_link[iLink].marker = GetNameParam(buffer+i+3, 1);
|
||||||
iLink ++;
|
iLink ++;
|
||||||
}
|
}
|
||||||
font &= ~Gfx::FONT_MASK_HIGHLIGHT;
|
font &= ~Gfx::FONT_MASK_HIGHLIGHT;
|
||||||
|
@ -1622,7 +1606,7 @@ bool CEdit::ReadText(const char *filename, int addSize)
|
||||||
{
|
{
|
||||||
if ( m_markerTotal < EDITLINKMAX )
|
if ( m_markerTotal < EDITLINKMAX )
|
||||||
{
|
{
|
||||||
GetNameParam(buffer+i+3, 0, m_marker[m_markerTotal].name);
|
m_marker[m_markerTotal].name = GetNameParam(buffer+i+3, 0);
|
||||||
m_marker[m_markerTotal].pos = j;
|
m_marker[m_markerTotal].pos = j;
|
||||||
m_markerTotal ++;
|
m_markerTotal ++;
|
||||||
}
|
}
|
||||||
|
@ -1640,21 +1624,19 @@ bool CEdit::ReadText(const char *filename, int addSize)
|
||||||
{
|
{
|
||||||
if ( m_bSoluce || !bInSoluce )
|
if ( m_bSoluce || !bInSoluce )
|
||||||
{
|
{
|
||||||
#if _DEMO
|
|
||||||
strcpy(iName, "demo");
|
strcpy(iName, GetNameParam(buffer+i+7, 0).c_str());
|
||||||
#else
|
|
||||||
GetNameParam(buffer+i+7, 0, iName);
|
|
||||||
#endif
|
|
||||||
//? iWidth = m_lineHeight*RetValueParam(buffer+i+7, 1);
|
//? iWidth = m_lineHeight*RetValueParam(buffer+i+7, 1);
|
||||||
iWidth = static_cast<float>(GetValueParam(buffer+i+7, 1));
|
iWidth = static_cast<float>(GetValueParam(buffer+i+7, 1));
|
||||||
iWidth *= m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL);
|
iWidth *= m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL);
|
||||||
iLines = GetValueParam(buffer+i+7, 2);
|
iLines = GetValueParam(buffer+i+7, 2);
|
||||||
LoadImage(iName);
|
LoadImage(std::string(iName));
|
||||||
|
|
||||||
// A part of image per line of text.
|
// A part of image per line of text.
|
||||||
for ( iCount=0 ; iCount<iLines ; iCount++ )
|
for ( iCount=0 ; iCount<iLines ; iCount++ )
|
||||||
{
|
{
|
||||||
strcpy(m_image[iIndex].name, iName);
|
m_image[iIndex].name = iName;
|
||||||
m_image[iIndex].offset = static_cast<float>(iCount/iLines);
|
m_image[iIndex].offset = static_cast<float>(iCount/iLines);
|
||||||
m_image[iIndex].height = 1.0f/iLines;
|
m_image[iIndex].height = 1.0f/iLines;
|
||||||
m_image[iIndex].width = iWidth*0.75f;
|
m_image[iIndex].width = iWidth*0.75f;
|
||||||
|
@ -1888,7 +1870,7 @@ bool CEdit::ReadText(const char *filename, int addSize)
|
||||||
|
|
||||||
// Writes all the text in a file.
|
// Writes all the text in a file.
|
||||||
|
|
||||||
bool CEdit::WriteText(const char *filename)
|
bool CEdit::WriteText(std::string filename)
|
||||||
{
|
{
|
||||||
FILE* file;
|
FILE* file;
|
||||||
char buffer[1000+20];
|
char buffer[1000+20];
|
||||||
|
@ -1896,7 +1878,7 @@ bool CEdit::WriteText(const char *filename)
|
||||||
float iDim;
|
float iDim;
|
||||||
|
|
||||||
if ( filename[0] == 0 ) return false;
|
if ( filename[0] == 0 ) return false;
|
||||||
file = fopen(filename, "wb");
|
file = fopen(filename.c_str(), "wb");
|
||||||
if ( file == NULL ) return false;
|
if ( file == NULL ) return false;
|
||||||
|
|
||||||
if ( m_bAutoIndent )
|
if ( m_bAutoIndent )
|
||||||
|
|
|
@ -35,7 +35,12 @@
|
||||||
#include "common/restext.h"
|
#include "common/restext.h"
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
|
@ -84,7 +89,7 @@ enum OperUndo
|
||||||
struct ImageLine
|
struct ImageLine
|
||||||
{
|
{
|
||||||
//! name of the image (without diagram \)
|
//! name of the image (without diagram \)
|
||||||
char name[40];
|
std::string name;
|
||||||
//! vertical offset (v texture)
|
//! vertical offset (v texture)
|
||||||
float offset;
|
float offset;
|
||||||
//! height of the part (dv texture)
|
//! height of the part (dv texture)
|
||||||
|
@ -96,15 +101,15 @@ struct ImageLine
|
||||||
struct HyperLink
|
struct HyperLink
|
||||||
{
|
{
|
||||||
//! text file name (without help \)
|
//! text file name (without help \)
|
||||||
char name[40];
|
std::string name;
|
||||||
//! name of the marker
|
//! name of the marker
|
||||||
char marker[20];
|
std::string marker;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HyperMarker
|
struct HyperMarker
|
||||||
{
|
{
|
||||||
//! name of the marker
|
//! name of the marker
|
||||||
char name[20];
|
std::string name;
|
||||||
//! position in the text
|
//! position in the text
|
||||||
int pos;
|
int pos;
|
||||||
};
|
};
|
||||||
|
@ -112,7 +117,7 @@ struct HyperMarker
|
||||||
struct HyperHistory
|
struct HyperHistory
|
||||||
{
|
{
|
||||||
//! full file name text
|
//! full file name text
|
||||||
char filename[50];
|
std::string filename;
|
||||||
//! rank of the first displayed line
|
//! rank of the first displayed line
|
||||||
int firstLine;
|
int firstLine;
|
||||||
};
|
};
|
||||||
|
@ -140,8 +145,8 @@ public:
|
||||||
char* GetText();
|
char* GetText();
|
||||||
int GetTextLength();
|
int GetTextLength();
|
||||||
|
|
||||||
bool ReadText(const char *filename, int addSize=0);
|
bool ReadText(std::string filename, int addSize=0);
|
||||||
bool WriteText(const char *filename);
|
bool WriteText(std::string filename);
|
||||||
|
|
||||||
void SetMaxChar(int max);
|
void SetMaxChar(int max);
|
||||||
int GetMaxChar();
|
int GetMaxChar();
|
||||||
|
@ -183,7 +188,7 @@ public:
|
||||||
bool Undo();
|
bool Undo();
|
||||||
|
|
||||||
void HyperFlush();
|
void HyperFlush();
|
||||||
void HyperHome(const char *filename);
|
void HyperHome(std::string filename);
|
||||||
bool HyperTest(EventType event);
|
bool HyperTest(EventType event);
|
||||||
bool HyperGo(EventType event);
|
bool HyperGo(EventType event);
|
||||||
|
|
||||||
|
@ -202,15 +207,15 @@ protected:
|
||||||
int MouseDetect(Math::Point mouse);
|
int MouseDetect(Math::Point mouse);
|
||||||
void MoveAdjust();
|
void MoveAdjust();
|
||||||
|
|
||||||
void HyperJump(const char *name, const char *marker);
|
void HyperJump(std::string name, std::string marker);
|
||||||
bool HyperAdd(const char *filename, int firstLine);
|
bool HyperAdd(std::string filename, int firstLine);
|
||||||
|
|
||||||
void DrawImage(Math::Point pos, const char *name, float width, float offset, float height, int nbLine);
|
void DrawImage(Math::Point pos, std::string name, float width, float offset, float height, int nbLine);
|
||||||
void DrawBack(Math::Point pos, Math::Point dim);
|
void DrawBack(Math::Point pos, Math::Point dim);
|
||||||
void DrawPart(Math::Point pos, Math::Point dim, int icon);
|
void DrawPart(Math::Point pos, Math::Point dim, int icon);
|
||||||
|
|
||||||
void FreeImage();
|
void FreeImage();
|
||||||
void LoadImage(const char *name);
|
void LoadImage(std::string name);
|
||||||
void Scroll(int pos, bool bAdjustCursor);
|
void Scroll(int pos, bool bAdjustCursor);
|
||||||
void Scroll();
|
void Scroll();
|
||||||
void MoveChar(int move, bool bWord, bool bSelect);
|
void MoveChar(int move, bool bWord, bool bSelect);
|
||||||
|
|
|
@ -3559,11 +3559,11 @@ void CMainDialog::SetUserDir(char *base, int rank)
|
||||||
if ( strcmp(base, "user") == 0 && rank >= 100 )
|
if ( strcmp(base, "user") == 0 && rank >= 100 )
|
||||||
{
|
{
|
||||||
dir = m_userDir + "/" + m_userList.at(rank/100-1);
|
dir = m_userDir + "/" + m_userList.at(rank/100-1);
|
||||||
UserDir(true, dir.c_str());
|
GetProfile().SetUserDir(dir);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UserDir(false, "");
|
GetProfile().SetUserDir("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4258,7 +4258,6 @@ bool CMainDialog::IsIOReadScene()
|
||||||
FILE* file;
|
FILE* file;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
|
||||||
//TODO: Change this to point user dir acocrding to operating system
|
|
||||||
filename = m_savegameDir + "/" + m_main->GetGamerName() + "/" + "save" + m_sceneName[0] + "000/data.sav";
|
filename = m_savegameDir + "/" + m_main->GetGamerName() + "/" + "save" + m_sceneName[0] + "000/data.sav";
|
||||||
file = fopen(filename.c_str(), "r");
|
file = fopen(filename.c_str(), "r");
|
||||||
if ( file == NULL ) return false;
|
if ( file == NULL ) return false;
|
||||||
|
@ -4354,7 +4353,7 @@ void CMainDialog::IOReadList()
|
||||||
filename = m_savegameDir + "/" + m_main->GetGamerName() + "/save" + m_sceneName[0] + rankStream.str()+ "/data.sav";
|
filename = m_savegameDir + "/" + m_main->GetGamerName() + "/save" + m_sceneName[0] + rankStream.str()+ "/data.sav";
|
||||||
|
|
||||||
// sprintf(filename, "%s\\%s\\save%c%.3d\\data.sav", m_savegameDir, m_main->GetGamerName(), m_sceneName[0], j);
|
// sprintf(filename, "%s\\%s\\save%c%.3d\\data.sav", m_savegameDir, m_main->GetGamerName(), m_sceneName[0], j);
|
||||||
file = fopen(filename.c_str(), "r");
|
file = fopen(fs::path(filename).native().c_str(), "r");
|
||||||
if ( file == NULL ) break;
|
if ( file == NULL ) break;
|
||||||
|
|
||||||
while ( fgets(line, 500, file) != NULL )
|
while ( fgets(line, 500, file) != NULL )
|
||||||
|
@ -5046,8 +5045,8 @@ void CMainDialog::UpdateDisplayDevice()
|
||||||
CWindow* pw;
|
CWindow* pw;
|
||||||
CList* pl;
|
CList* pl;
|
||||||
char bufDevices[1000];
|
char bufDevices[1000];
|
||||||
char bufModes[5000];
|
//char bufModes[5000];
|
||||||
int i, j, totalDevices, selectDevices, totalModes, selectModes;
|
int i, j;
|
||||||
|
|
||||||
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW5));
|
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW5));
|
||||||
if ( pw == 0 ) return;
|
if ( pw == 0 ) return;
|
||||||
|
@ -5055,7 +5054,7 @@ void CMainDialog::UpdateDisplayDevice()
|
||||||
if ( pl == 0 ) return;
|
if ( pl == 0 ) return;
|
||||||
pl->Flush();
|
pl->Flush();
|
||||||
|
|
||||||
bufModes[0] = 0;
|
//bufModes[0] = 0;
|
||||||
/* TODO: remove device choice
|
/* TODO: remove device choice
|
||||||
m_engine->EnumDevices(bufDevices, 1000,
|
m_engine->EnumDevices(bufDevices, 1000,
|
||||||
bufModes, 5000,
|
bufModes, 5000,
|
||||||
|
@ -5070,10 +5069,10 @@ void CMainDialog::UpdateDisplayDevice()
|
||||||
while ( bufDevices[i++] != 0 );
|
while ( bufDevices[i++] != 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
pl->SetSelect(selectDevices);
|
pl->SetSelect(0);
|
||||||
pl->ShowSelect(false);
|
pl->ShowSelect(false);
|
||||||
|
|
||||||
m_setupSelDevice = selectDevices;
|
m_setupSelDevice = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates the list of modes.
|
// Updates the list of modes.
|
||||||
|
@ -5110,8 +5109,8 @@ void CMainDialog::ChangeDisplay()
|
||||||
CWindow* pw;
|
CWindow* pw;
|
||||||
CList* pl;
|
CList* pl;
|
||||||
CCheck* pc;
|
CCheck* pc;
|
||||||
char* device;
|
//char* device;
|
||||||
char* mode;
|
//char* mode;
|
||||||
bool bFull;
|
bool bFull;
|
||||||
|
|
||||||
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW5));
|
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW5));
|
||||||
|
@ -5120,12 +5119,12 @@ void CMainDialog::ChangeDisplay()
|
||||||
pl = static_cast<CList*>(pw->SearchControl(EVENT_LIST1));
|
pl = static_cast<CList*>(pw->SearchControl(EVENT_LIST1));
|
||||||
if ( pl == 0 ) return;
|
if ( pl == 0 ) return;
|
||||||
m_setupSelDevice = pl->GetSelect();
|
m_setupSelDevice = pl->GetSelect();
|
||||||
device = pl->GetName(m_setupSelDevice);
|
//device = pl->GetName(m_setupSelDevice);
|
||||||
|
|
||||||
pl = static_cast<CList*>(pw->SearchControl(EVENT_LIST2));
|
pl = static_cast<CList*>(pw->SearchControl(EVENT_LIST2));
|
||||||
if ( pl == 0 ) return;
|
if ( pl == 0 ) return;
|
||||||
m_setupSelMode = pl->GetSelect();
|
m_setupSelMode = pl->GetSelect();
|
||||||
mode = pl->GetName(m_setupSelMode);
|
//mode = pl->GetName(m_setupSelMode);
|
||||||
|
|
||||||
pc = static_cast<CCheck*>(pw->SearchControl(EVENT_INTERFACE_FULL));
|
pc = static_cast<CCheck*>(pw->SearchControl(EVENT_INTERFACE_FULL));
|
||||||
if ( pc == 0 ) return;
|
if ( pc == 0 ) return;
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
|
|
||||||
#include "object/robotmain.h"
|
#include "object/robotmain.h"
|
||||||
|
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
|
|
||||||
class CEventQueue;
|
class CEventQueue;
|
||||||
class CSoundInterface;
|
class CSoundInterface;
|
||||||
|
|
||||||
|
|
|
@ -1477,8 +1477,7 @@ void CStudio::UpdateDialogPublic()
|
||||||
CCheck* pc;
|
CCheck* pc;
|
||||||
CLabel* pl;
|
CLabel* pl;
|
||||||
char name[100];
|
char name[100];
|
||||||
char dir[MAX_FNAME];
|
//char text[MAX_FNAME+100];
|
||||||
char text[MAX_FNAME+100];
|
|
||||||
|
|
||||||
pw = static_cast< CWindow* >(m_interface->SearchControl(EVENT_WINDOW9));
|
pw = static_cast< CWindow* >(m_interface->SearchControl(EVENT_WINDOW9));
|
||||||
if ( pw == nullptr ) return;
|
if ( pw == nullptr ) return;
|
||||||
|
@ -1499,9 +1498,7 @@ void CStudio::UpdateDialogPublic()
|
||||||
if ( pl != 0 )
|
if ( pl != 0 )
|
||||||
{
|
{
|
||||||
GetResource(RES_TEXT, RT_IO_LIST, name);
|
GetResource(RES_TEXT, RT_IO_LIST, name);
|
||||||
SearchDirectory(dir, false);
|
pl->SetName(SearchDirectory(false).c_str(), false);
|
||||||
sprintf(text, name, dir);
|
|
||||||
pl->SetName(text, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1572,21 +1569,22 @@ void CStudio::UpdateDialogList()
|
||||||
// Constructs the name of the folder or open/save.
|
// Constructs the name of the folder or open/save.
|
||||||
// If the folder does not exist, it will be created.
|
// If the folder does not exist, it will be created.
|
||||||
|
|
||||||
void CStudio::SearchDirectory(char *dir, bool bCreate)
|
std::string CStudio::SearchDirectory(bool bCreate)
|
||||||
{
|
{
|
||||||
if ( m_main->GetIOPublic() )
|
char dir[MAX_FNAME];
|
||||||
{
|
if ( m_main->GetIOPublic() ) {
|
||||||
sprintf(dir, "%s\\", m_main->GetPublicDir());
|
sprintf(dir, "%s/", m_main->GetPublicDir());
|
||||||
|
} else {
|
||||||
|
sprintf(dir, "%s/%s/Program/", m_main->GetSavegameDir(), m_main->GetGamerName());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
fs::path path = fs::path(dir);
|
||||||
sprintf(dir, "%s\\%s\\Program\\", m_main->GetSavegameDir(), m_main->GetGamerName());
|
|
||||||
|
if ( bCreate ) {
|
||||||
|
fs::create_directory(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( bCreate )
|
return path.make_preferred().string();
|
||||||
{// TODO
|
|
||||||
// mkdir(dir,0777); // if does not exist yet!
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads a new program.
|
// Reads a new program.
|
||||||
|
@ -1612,7 +1610,7 @@ bool CStudio::ReadProgram()
|
||||||
{
|
{
|
||||||
strcat(filename, ".txt");
|
strcat(filename, ".txt");
|
||||||
}
|
}
|
||||||
SearchDirectory(dir, true);
|
strcpy(dir, SearchDirectory(true).c_str());
|
||||||
strcat(dir, filename);
|
strcat(dir, filename);
|
||||||
|
|
||||||
pw = static_cast< CWindow* >(m_interface->SearchControl(EVENT_WINDOW3));
|
pw = static_cast< CWindow* >(m_interface->SearchControl(EVENT_WINDOW3));
|
||||||
|
@ -1650,7 +1648,7 @@ bool CStudio::WriteProgram()
|
||||||
{
|
{
|
||||||
strcat(filename, ".txt");
|
strcat(filename, ".txt");
|
||||||
}
|
}
|
||||||
SearchDirectory(dir, true);
|
strcpy(dir, SearchDirectory(true).c_str());
|
||||||
strcat(dir, filename);
|
strcat(dir, filename);
|
||||||
|
|
||||||
pw = static_cast< CWindow* >(m_interface->SearchControl(EVENT_WINDOW3));
|
pw = static_cast< CWindow* >(m_interface->SearchControl(EVENT_WINDOW3));
|
||||||
|
@ -1658,7 +1656,7 @@ bool CStudio::WriteProgram()
|
||||||
pe = static_cast< CEdit* >(pw->SearchControl(EVENT_STUDIO_EDIT));
|
pe = static_cast< CEdit* >(pw->SearchControl(EVENT_STUDIO_EDIT));
|
||||||
if ( pe == nullptr ) return false;
|
if ( pe == nullptr ) return false;
|
||||||
|
|
||||||
if ( !pe->WriteText(dir) ) return false;
|
if ( !pe->WriteText(std::string(dir)) ) return false;
|
||||||
|
|
||||||
m_script->SetFilename(filename);
|
m_script->SetFilename(filename);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
|
|
||||||
#include "graphics/engine/camera.h"
|
#include "graphics/engine/camera.h"
|
||||||
|
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -81,7 +84,7 @@ protected:
|
||||||
void UpdateDialogAction();
|
void UpdateDialogAction();
|
||||||
void UpdateDialogPublic();
|
void UpdateDialogPublic();
|
||||||
void UpdateDialogList();
|
void UpdateDialogList();
|
||||||
void SearchDirectory(char* dir, bool bCreate);
|
std::string SearchDirectory(bool bCreate);
|
||||||
bool ReadProgram();
|
bool ReadProgram();
|
||||||
bool WriteProgram();
|
bool WriteProgram();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue