aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/misc.cmake
blob: 0bd2e3fcebe6e0e0bfcd70b759285b45b05d67d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# Random macros
#

# Not used ATM

MACRO (GETDATETIME RESULT)
    IF (WIN32)
		EXECUTE_PROCESS(COMMAND "cmd" /C echo %date% %time% OUTPUT_VARIABLE ${RESULT})
		string(REGEX REPLACE "\n" "" ${RESULT} "${${RESULT}}")
    ELSEIF(UNIX)
        EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d_%H:%M:%S" OUTPUT_VARIABLE ${RESULT})
		string(REGEX REPLACE "\n" "" ${RESULT} "${${RESULT}}")
    ELSE (WIN32)
        MESSAGE(SEND_ERROR "date not implemented")
        SET(${RESULT} "Unknown")
    ENDIF (WIN32)

	string(REGEX REPLACE " " "_" ${RESULT} "${${RESULT}}")
ENDMACRO (GETDATETIME)

span class="hl opt">(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id, IMenuManager *menumgr, const std::string &title, const std::string &formid, bool is_file_select); ~GUIFileSelectMenu(); /* Remove and re-add (or reposition) stuff */ void regenerateGui(v2u32 screensize); void drawMenu(); bool OnEvent(const SEvent &event); void setTextDest(TextDest *dest) { m_text_dst = dest; } protected: std::wstring getLabelByID(s32 id) { return L""; } std::string getNameByID(s32 id) { return ""; } private: void acceptInput(); std::wstring m_title; bool m_accepted = false; gui::IGUIFileOpenDialog *m_fileOpenDialog = nullptr; TextDest *m_text_dst = nullptr; std::string m_formname; bool m_file_select_dialog; };