MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / OnButton

Method OnButton

NetStream/source/option_menu.cpp:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25const float k_minBtLen = 202.0f;
26
27void OptionMenu::OnButton(ui::Widget *wdg)
28{
29 uint32_t hash = wdg->GetName().GetIDHash();
30 Plugin *plugin = m_plugin;
31 delete this;
32
33 if (hash == button_option_menu_close)
34 {
35 event::BroadcastGlobalEvent(plugin, OptionMenuEvent, OptionMenuEvent_Close);
36 }
37 else
38 {
39 event::BroadcastGlobalEvent(plugin, OptionMenuEvent, OptionMenuEvent_Button, hash - OPTION_MENU_BUTTON_MAGIC);
40 }
41}
42
43void OptionMenu::OnSizeAdjust(int32_t type, ui::Handler *self, ui::Event *e, void *userdata)
44{

Callers 1

OptionMenuMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected