Project Alice
Loading...
Searching...
No Matches
gui_generic_elements.hpp
Go to the documentation of this file.
1
namespace
ui
{
2
class
generic_callback_button
:
public
button_element_base
{
3
public
:
4
std::function<void(
generic_callback_button
&,
sys::state
&)>
on_button_action
=
nullptr
;
5
std::function<void(
generic_callback_button
&,
sys::state
&)>
on_button_update
=
nullptr
;
6
std::function<void(
generic_callback_button
&,
sys::state
&,
text::columnar_layout
&)>
on_tooltip
=
nullptr
;
7
8
void
on_update
(
sys::state
&
state
)
noexcept
override
{
9
on_button_update
(*
this
,
state
);
10
}
11
12
void
button_action
(
sys::state
&
state
)
noexcept
override
{
13
on_button_action
(*
this
,
state
);
14
}
15
16
tooltip_behavior
has_tooltip
(
sys::state
&
state
)
noexcept
override
{
17
return
tooltip_behavior::variable_tooltip
;
18
}
19
20
void
update_tooltip
(
sys::state
&
state
, int32_t x, int32_t y,
text::columnar_layout
& contents)
noexcept
override
{
21
on_tooltip
(*
this
,
state
, contents);
22
}
23
};
24
}
ui::button_element_base
Definition:
gui_element_types.hpp:228
ui::generic_callback_button
Definition:
gui_generic_elements.hpp:2
ui::generic_callback_button::on_button_action
std::function< void(generic_callback_button &, sys::state &)> on_button_action
Definition:
gui_generic_elements.hpp:4
ui::generic_callback_button::update_tooltip
void update_tooltip(sys::state &state, int32_t x, int32_t y, text::columnar_layout &contents) noexcept override
Definition:
gui_generic_elements.hpp:20
ui::generic_callback_button::has_tooltip
tooltip_behavior has_tooltip(sys::state &state) noexcept override
Definition:
gui_generic_elements.hpp:16
ui::generic_callback_button::on_button_update
std::function< void(generic_callback_button &, sys::state &)> on_button_update
Definition:
gui_generic_elements.hpp:5
ui::generic_callback_button::on_tooltip
std::function< void(generic_callback_button &, sys::state &, text::columnar_layout &)> on_tooltip
Definition:
gui_generic_elements.hpp:6
ui::generic_callback_button::on_update
void on_update(sys::state &state) noexcept override
Definition:
gui_generic_elements.hpp:8
ui::generic_callback_button::button_action
void button_action(sys::state &state) noexcept override
Definition:
gui_generic_elements.hpp:12
ui
Definition:
constants.hpp:582
ui::tooltip_behavior
tooltip_behavior
Definition:
gui_graphics.hpp:354
ui::tooltip_behavior::variable_tooltip
@ variable_tooltip
sys::state
Holds important data about the game world, state, and other data regarding windowing,...
Definition:
system_state.hpp:480
text::columnar_layout
Definition:
text.hpp:858
ui::state
Definition:
gui_graphics.hpp:408
src
gui
gui_generic_elements.hpp
Generated by
1.9.5