public void Init(OpenAPI api, MenuAPI menuAPI, HUDAPI hudAPI) { _api = api; _menuAPI = menuAPI; InitMenuItems(); _root.Enabled += OnEnabled; }
public virtual void AddAPIButtons(string name) { foreach (var ctlInfo in MenuAPI.GetAPICtls(name)) { RegisterControl(ctlInfo); } }
public void Init(OpenAPI api, MenuAPI menuAPI, HUDAPI hudAPI) { _api = api; _menuAPI = menuAPI; _hudAPI = hudAPI; _userId = _api.User.UserId.Value; _chatBlock = new ChatMessageBlockCtrl(api); _chatBlock.MessageSend += OnMessageSend; _recentBlock = new RecentBlockCtrl(api); _recentBlock.ChatSelected += OnChatSelected; _friendsBlock = new FriendsBlockCtrl(api); _friendsBlock.FriendSelected += OnFriendSelected; InitMenuItems(); _root.Enabled += OnEnabled; _root.Disabled += OnDisabled; RenderFriends(); }
public static void Setup() { ThemeManager.SetTheme(PreferencesManager.Get(PrefNames.ThemeName)); // load fonts string mainFont = string.Empty; if (AssetManager.AssetExists(ThemeManager.GetThemeAsset("ui/fonts/Regular.otf"))) { mainFont = ThemeManager.GetThemeAsset("ui/fonts/Regular.otf"); } else { mainFont = ThemeManager.GetThemeAsset("ui/fonts/Regular.ttf"); } MainFont = FontManager.LoadFont(mainFont); string boldFont = string.Empty; if (AssetManager.AssetExists(ThemeManager.GetThemeAsset("ui/fonts/Bold.otf"))) { boldFont = ThemeManager.GetThemeAsset("ui/fonts/Bold.otf"); } else { boldFont = ThemeManager.GetThemeAsset("ui/fonts/Bold.ttf"); } BoldFont = FontManager.LoadFont(ThemeManager.GetThemeAsset(boldFont)); FontManager.DefaultFont = MainFont; LoadStandardMenus(); MenuAPI.CallSetupMenus(); GUIManager.PushCanvas(Main); Main.Activate(); }
public virtual void Activate() { Active = true; MenuAPI.CallMenuChanged(Name); }
public MenuItem GetMenuTree(long RootId) { var menuApi = new MenuAPI(); return(menuApi.GetMenuTree(RootId, 1033)); }
public MenuItem GetMenuTree(long RootId) { var menuApi = new MenuAPI(); return(menuApi.GetMenuTree(RootId, Common.Configuration.LanguageId)); }
public void Init(OpenAPI api, MenuAPI menuAPI, HUDAPI hudAPI) { this._menuAPI = menuAPI; this._api = VrLifeCore.GetClosedAPI(_info); CreateMenuItems(); }