Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
guiOpenURL.h
Go to the documentation of this file.
1/*
2Part of Minetest
3Copyright (C) 2023 rubenwardy
4
5Permission to use, copy, modify, and distribute this software for any
6purpose with or without fee is hereby granted, provided that the above
7copyright notice and this permission notice appear in all copies.
8
9THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*/
17
18#pragma once
19
21#include "modalMenu.h"
22#include <string>
23
24class Client;
26
28{
29public:
30 GUIOpenURLMenu(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
31 IMenuManager *menumgr,
32 ISimpleTextureSource *tsrc, const std::string &url);
33
34 /*
35 Remove and re-add (or reposition) stuff
36 */
37 void regenerateGui(v2u32 screensize);
38
39 void drawMenu();
40
41 bool OnEvent(const SEvent &event);
42
43protected:
44 std::wstring getLabelByID(s32 id) { return L""; }
45 std::string getNameByID(s32 id) { return ""; }
46
47private:
49 std::string url;
50};
Definition client.h:105
Definition modalMenu.h:36
Definition guiOpenURL.h:28
std::string url
Definition guiOpenURL.h:49
void drawMenu()
Definition guiOpenURL.cpp:145
bool OnEvent(const SEvent &event)
Definition guiOpenURL.cpp:161
ISimpleTextureSource * m_tsrc
Definition guiOpenURL.h:48
GUIOpenURLMenu(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id, IMenuManager *menumgr, ISimpleTextureSource *tsrc, const std::string &url)
Definition guiOpenURL.cpp:35
void regenerateGui(v2u32 screensize)
Definition guiOpenURL.cpp:60
std::string getNameByID(s32 id)
Definition guiOpenURL.h:45
std::wstring getLabelByID(s32 id)
Definition guiOpenURL.h:44
Definition modalMenu.h:25
Definition texturesource.h:25
core::vector2d< u32 > v2u32
Definition irr_v2d.h:14