(svn r26610) -Feature: Select an editable preset name for saving.
This commit is contained in:
@@ -137,6 +137,7 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NEWGRF_INSPECT, "WC_NEWGRF_INSPECT");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SPRITE_ALIGNER, "WC_SPRITE_ALIGNER");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_LINKGRAPH_LEGEND, "WC_LINKGRAPH_LEGEND");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SAVE_PRESET, "WC_SAVE_PRESET");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INVALID, "WC_INVALID");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLUE, "TC_BLUE");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::TC_SILVER, "TC_SILVER");
|
||||
@@ -806,6 +807,11 @@ void SQGSWindow_Register(Squirrel *engine)
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_CONTENT_DOWNLOAD2, "WID_NS_CONTENT_DOWNLOAD2");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SHOW_REMOVE, "WID_NS_SHOW_REMOVE");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SHOW_APPLY, "WID_NS_SHOW_APPLY");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_PRESET_LIST, "WID_SVP_PRESET_LIST");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_SCROLLBAR, "WID_SVP_SCROLLBAR");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_EDITBOX, "WID_SVP_EDITBOX");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_CANCEL, "WID_SVP_CANCEL");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SVP_SAVE, "WID_SVP_SAVE");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_BAR, "WID_SP_PROGRESS_BAR");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_TEXT, "WID_SP_PROGRESS_TEXT");
|
||||
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_PANEL, "WID_N_PANEL");
|
||||
|
@@ -753,11 +753,17 @@ public:
|
||||
WC_SPRITE_ALIGNER = ::WC_SPRITE_ALIGNER,
|
||||
|
||||
/**
|
||||
* Linkgraph legend; Window numbers:
|
||||
* Linkgraph legend; %Window numbers:
|
||||
* - 0 = #LinkGraphWidgets
|
||||
*/
|
||||
WC_LINKGRAPH_LEGEND = ::WC_LINKGRAPH_LEGEND,
|
||||
|
||||
/**
|
||||
* Save preset; %Window numbers:
|
||||
* - 0 = #SavePresetWidgets
|
||||
*/
|
||||
WC_SAVE_PRESET = ::WC_SAVE_PRESET,
|
||||
|
||||
WC_INVALID = ::WC_INVALID, ///< Invalid window.
|
||||
};
|
||||
|
||||
@@ -1835,6 +1841,15 @@ public:
|
||||
WID_NS_SHOW_APPLY = ::WID_NS_SHOW_APPLY, ///< Select display of the buttons below the 'details'.
|
||||
};
|
||||
|
||||
/** Widgets of the #SavePresetWindow class. */
|
||||
enum SavePresetWidgets {
|
||||
WID_SVP_PRESET_LIST = ::WID_SVP_PRESET_LIST, ///< List with available preset names.
|
||||
WID_SVP_SCROLLBAR = ::WID_SVP_SCROLLBAR, ///< Scrollbar for the list available preset names.
|
||||
WID_SVP_EDITBOX = ::WID_SVP_EDITBOX, ///< Edit box for changing the preset name.
|
||||
WID_SVP_CANCEL = ::WID_SVP_CANCEL, ///< Button to cancel saving the preset.
|
||||
WID_SVP_SAVE = ::WID_SVP_SAVE, ///< Button to save the preset.
|
||||
};
|
||||
|
||||
/** Widgets of the #ScanProgressWindow class. */
|
||||
enum ScanProgressWidgets {
|
||||
WID_SP_PROGRESS_BAR = ::WID_SP_PROGRESS_BAR, ///< Simple progress bar.
|
||||
|
@@ -161,6 +161,8 @@ namespace SQConvert {
|
||||
template <> inline int Return<ScriptWindow::NewGRFParametersWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFParametersWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::NewGRFStateWidgets GetParam(ForceType<ScriptWindow::NewGRFStateWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewGRFStateWidgets)tmp; }
|
||||
template <> inline int Return<ScriptWindow::NewGRFStateWidgets>(HSQUIRRELVM vm, ScriptWindow::NewGRFStateWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::SavePresetWidgets GetParam(ForceType<ScriptWindow::SavePresetWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SavePresetWidgets)tmp; }
|
||||
template <> inline int Return<ScriptWindow::SavePresetWidgets>(HSQUIRRELVM vm, ScriptWindow::SavePresetWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::ScanProgressWidgets GetParam(ForceType<ScriptWindow::ScanProgressWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ScanProgressWidgets)tmp; }
|
||||
template <> inline int Return<ScriptWindow::ScanProgressWidgets>(HSQUIRRELVM vm, ScriptWindow::ScanProgressWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
|
||||
template <> inline ScriptWindow::NewsWidgets GetParam(ForceType<ScriptWindow::NewsWidgets>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NewsWidgets)tmp; }
|
||||
|
Reference in New Issue
Block a user