Π Π°ΡΡΠΌΠΎΡΡΠΈΠΌ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΠΏΡΠΎΡΡΡΡ
Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΡΡ
ΠΎΠΊΠΎΠ½, ΠΊΠΎΡΠΎΡΡΠ΅ ΡΡ ΠΌΠΎΠΆΠ΅ΡΡ ΡΠΎΠ·Π΄Π°ΡΡ ΠΈΠ· ΡΠ²ΠΎΠ΅Π³ΠΎ ΡΠΊΡΠΈΠΏΡΠ°. ΠΠΎΠ»Π΅Π΅ ΡΠ»ΠΎΠΆΠ½ΡΠ΅ ΠΏΡΠΈΠΌΠ΅ΡΡ ΠΎΠΊΠΎΠ½ Ρ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠ°ΠΌΠΈ ΡΠΌΠΎΡΡΠΈ Π·Π΄Π΅ΡΡ.
ΠΡΠΎΡΡΠΎΠΉ ΠΏΡΠΈΠΌΠ΅Ρ Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠ³ΠΎ ΠΎΠΊΠ½Π°:
int t;
void main() {
t = 0;
SculptRoom room;
room.clear().toSurface();
SetModalDialogCallback( "dialogCallback" );
ModalDialog( "Some message", "Title" );
}
void dialogCallback() {
if (t++ > 400) {
UI ui;
ui( "$DialogButton#1" );
}
}
ΠΠ΄Π΅ΡΡ ΠΏΠΎΡΠ²Π»ΡΠ΅ΡΡΡ ΡΠ΅ΠΊΡΡ Π² ΠΎΠΊΠ½Π΅, ΠΊΠΎΡΠΎΡΡΠΉ ΠΈΡΡΠ΅Π·Π½Π΅Ρ ΡΠ΅ΡΠ΅Π· Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ ΡΠ΅ΠΊΡΠ½Π΄.
ΠΡΠΈΠΌΠ΅Ρ ΠΏΠΎΡΠ»ΠΎΠΆΠ½Π΅Π΅. ΠΠ°ΠΏΠ΅ΡΠ°ΡΠ°Π΅ΠΌ ΡΠΏΠΈΡΠΎΠΊ Π²ΡΠ΅Ρ
ΡΠ°ΠΉΠ»ΠΎΠ² ΠΈΠ· ΠΏΠ°ΠΏΠΊΠΈ.
int n;
string files;
void main() {
n = 0;
files = "";
bool ok = ModalDialogOkCancel( "Start processing files?", "" );
if ( !ok ) {
return;
}
string mask = "*.png;*.jpg";
ForEachFileInFolder( "", mask, "fileProcessing" );
ModalDialog( "Files processed:\n" + files, "" );
}
void fileProcessing( string &in fileName ) {
++n;
files += n + ". " + fileName + "\n";
}
ΠΠΎΡ ΡΠΏΠΈΡΠΎΠΊ Π²ΡΠ΅Ρ
ΠΌΠ΅ΡΠΎΠ΄ΠΎΠ², ΠΊΠΎΡΠΎΡΡΠ΅ ΠΌΠΎΠΆΠ΅ΡΡ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ Π² ΡΠΊΡΠΈΠΏΡΠ°Ρ
Π΄Π»Ρ ΡΠ°Π±ΠΎΡΡ Ρ Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΡΠΌΠΈ ΠΎΠΊΠ½Π°ΠΌΠΈ:
void ModalDialog(string &in ID,string &in Caption);
bool ModalDialogOkCancel(string &in ID,string &in Caption);
bool ModalDialogYesNo(string &in ID,string &in Caption);
void AddTranslation(string& ID, string& Text);
void AddFloatSlider(string &in VariableName,float Min,float Max);
void AddIntSlider(string &in VariableName,int Min,int Max);
void AddFloatInput(string &in VariableName,bool EmptyName);
void AddIntInput(string &in VariableName,bool EmptyName);
void AddStringInput(string &in VariableName,bool EmptyName);
void AddTextField(string &in TextID,int Align);
void AddDelimiter();
void AddButton(string &in FuncName);
void Columns(int nc);
Columns(2);
AddButton("Function1");
AddButton("Function2");
void AddCheckBox(string &in BoolVarRef);
void AddDroplist(string &in IntVarRef,string &in CaseList);
Int Case=0;
...
AddDroplist("Case","Case1,Case2,Case3");
void UICondition(string& fn);
void StopUICondition();
bool ShowSlider1and2;
float Slider1;
float Slider2;
float Slider3;
bool CheckUI(){
return ShowSlider1and2;
}
void main(){
AddCheckBox("ShowSlider1and2");
UICondition("CheckUI");
AddFloatSlider("Slider1",0,123);
AddFloatSlider("Slider2",0,123);
StopUICondition();
AddFloatSlider("Slider3",0,123);
ModalDialogOkCancel("","");
}
void PressInNextModalDialogs(int ButtonIndex);
void SetModalDialogCallback(string &in name);
void RemoveModalDialogCallbacks();
void ShowFloatingMessage(string &in ID,float Time);
bool GetCurrentDialog(string &out ID,string &out Caption);
int GetLastButtonIndex();
Π§ΡΠΎΠ±Ρ ΠΎΡΠΊΡΡΠ²Π°ΡΡ ΠΎΠΊΠ½Π° Π΄Π»Ρ Π²ΡΠ±ΠΎΡΠ° ΡΠ°ΠΉΠ»ΠΎΠ², Π²ΠΎΡΠΏΠΎΠ»ΡΠ·ΡΠΉΡΡ ΡΡΠΈΠΌ ΡΡΠ½ΠΊΡΠΈΡΠΌΠΈ:
DEPRECATED bool OpenDialog(string &in extensions,string &out result);
DEPRECATED bool SaveDialog(string &in extensions,string &out result);
DEPRECATED bool FolderDialog(string &out result);
DEPRECATED void SetFileForFileDialogs(string &in name);
DEPRECATED bool FileDialogCancelPressed();
- Π‘ΠΌ. ΡΠ°ΠΊΠΆΠ΅
- π Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΡΠ²ΠΎΠΈΡ
Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²