void cWindow::update(float elapsedtime, int x, int y) { if (!getShow()) return ; if (isIn(x, y)) _getGui()->setOverWindow(this); updateChildList(elapsedtime, x, y); }
NetmonitorPlugin::NetmonitorPlugin(unsigned base, const char *config) : Plugin(base) { load_data(monitorData, &data, config); if (getLogPackets()){ string packets = getLogPackets(); while (packets.length()){ string v = getToken(packets, ','); setLogType(atol(v.c_str()), true); } } monitor = NULL; CmdNetMonitor = registerType(); IconDef icon; icon.name = "network"; icon.xpm = network; icon.isSystem = false; Event eIcon(EventAddIcon, &icon); eIcon.process(); Command cmd; cmd->id = CmdNetMonitor; cmd->text = I18N_NOOP("Network monitor"); cmd->icon = "network"; cmd->bar_id = ToolBarMain; cmd->menu_id = MenuMain; cmd->menu_grp = 0x8000; cmd->flags = COMMAND_DEFAULT; Event eCmd(EventCommandCreate, cmd); eCmd.process(); string value; CmdParam p = { "-m", I18N_NOOP("Show network monitor"), &value }; Event e(EventArg, &p); if (e.process() || getShow()) showMonitor(); }
void cWindow::render(LPDIRECT3DDEVICE9 device) { if (!getShow()) return ; cWindowRenderData::render(device); renderChildList(device); }