00001 /* 00002 * Ui.h 00003 * 00004 * Part of Fly! Legacy project 00005 * 00006 * Copyright 2003 Chris Wallace 00007 * 00008 * Fly! Legacy is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Fly! Legacy is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Fly! Legacy; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 */ 00023 00029 #ifndef UI_H 00030 #define UI_H 00031 00032 00033 #include "FlyLegacy.h" 00034 #include "KeyMap.h" 00035 #include <plib/pu.h> 00036 00037 00038 // 00039 // Main initialization function. This MUST be called before any user message 00040 // is displayed. 00041 // 00042 void init_ui (void); 00043 void cleanup_ui (void); 00044 00045 // 00046 // Debug messaging functions. Three lines of debugging information are continuously 00047 // displayed on-screen for use by applications. 00048 // 00049 void DebugMessage1 (const char* fmt, ...); 00050 void DebugMessage2 (const char* text, ...); 00051 void DebugMessage3 (const char* text, ...); 00052 00053 00054 // 00055 // User message function. The user message is a short, timed message that is displayed 00056 // in the lower-right hand corner of the screen. 00057 // 00058 void DrawNoticeToUser (const char* text, float timeout); 00059 00060 00061 // 00062 // Draw all UI components (menus, popups, dialogs, etc.). This function should be 00063 // called on every screen redraw 00064 // 00065 void DrawUi (float dT); 00066 00067 // 00068 // Keyboard functions 00069 // 00070 void init_keyboard (void); 00071 void BindAllKeys (CKeyMap *keymap); 00072 EKeyboardModifiers glutModifiersToFlyLegacyModifiers (int glutmod); 00073 bool glutKeyToFlyLegacyKey (int glutkey, EKeyboardKeys *flykey); 00074 bool glutSpecialToFlyLegacyKey (int glutkey, EKeyboardKeys *flykey); 00075 #ifdef WIN32 00076 EKeyboardKeys VirtualKeyToLegacyKey (BYTE vk); 00077 int VirtualKeyToGlutKey (BYTE vk, bool shift, bool ctrl, bool alt); 00078 #endif //WIN32 00079 00080 // 00081 // Menu functions 00082 // 00083 void init_menu (void); 00084 void cleanup_menu (void); 00085 void hide_menu (void); 00086 void show_menu (void); 00087 void toggle_menu (void); 00088 00089 // 00090 // Options->Date/Time Dialog 00091 // 00092 void date_time_dlg_kill (void); 00093 void date_time_dlg_create (void); 00094 00095 // 00096 // Options->Keys/Buttons Dialog 00097 // 00098 void keys_buttons_dlg_kill (void); 00099 void keys_buttons_dlg_create (void); 00100 00101 // 00102 // Options->Scenery Dialog 00103 // 00104 void scenery_options_dlg_kill (void); 00105 void scenery_options_dlg_create (void); 00106 00107 // 00108 // Weather->Sky Tweaker Dialog 00109 // 00110 void sky_tweaker_dlg_create (void); 00111 00112 // 00113 // Aircraft-> Teleport Dialog 00114 // 00115 void teleport_dlg_kill (void); 00116 void teleport_dlg_create (void); 00117 00118 // 00119 // Debug->Messaging Dialog 00120 // 00121 void msg_debug_dlg_create (void); 00122 00123 #endif // UI_H
|
|
Documentation generated by
|