mirror of
https://github.com/acemod/arma3-wiki.git
synced 2025-12-22 05:37:06 +00:00
remove on from user interface events
This commit is contained in:
@@ -142,7 +142,16 @@ pub async fn event_handlers(
|
||||
"https://community.bistudio.com/wiki/User_Interface_Event_Handlers?action=raw",
|
||||
"ui",
|
||||
)
|
||||
.await,
|
||||
.await
|
||||
.into_iter()
|
||||
.map(|eh| match eh {
|
||||
EventHandler::Parsed(mut eh) => {
|
||||
eh.set_id(eh.id().trim_start_matches("on").to_string());
|
||||
EventHandler::Parsed(eh)
|
||||
}
|
||||
EventHandler::Failed(name, e) => EventHandler::Failed(name, e),
|
||||
})
|
||||
.collect(),
|
||||
);
|
||||
event_handlers.insert(
|
||||
EventHandlerNamespace::Mission,
|
||||
|
||||
@@ -40,11 +40,19 @@ impl ParsedEventHandler {
|
||||
&self.id
|
||||
}
|
||||
|
||||
pub fn set_id(&mut self, id: String) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn description(&self) -> &str {
|
||||
&self.description
|
||||
}
|
||||
|
||||
pub fn set_description(&mut self, description: String) {
|
||||
self.description = description;
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn params(&self) -> &[Param] {
|
||||
&self.params
|
||||
|
||||
Reference in New Issue
Block a user