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