mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
prevent dropdown from closing when moving to parent or child
This commit is contained in:
@@ -81,22 +81,28 @@ SCRIPT_FUNCTION(set_metadata) {
|
||||
|
||||
SCRIPT_FUNCTION(width_of) {
|
||||
SCRIPT_PARAM(Set*, set);
|
||||
SCRIPT_PARAM(GeneratedImageP, input);
|
||||
Image image = input->generate(GeneratedImage::Options(0, 0, set->stylesheet.get()));
|
||||
SCRIPT_PARAM(CardP, card);
|
||||
SCRIPT_PARAM(GeneratedImageP, input);
|
||||
StyleSheet* stylesheet = card && card->stylesheet ? card->stylesheet.get() : set->stylesheet.get();
|
||||
Image image = input->generate(GeneratedImage::Options(0, 0, stylesheet));
|
||||
SCRIPT_RETURN(image.GetWidth());
|
||||
}
|
||||
|
||||
SCRIPT_FUNCTION(height_of) {
|
||||
SCRIPT_PARAM(Set*, set);
|
||||
SCRIPT_PARAM(GeneratedImageP, input);
|
||||
Image image = input->generate(GeneratedImage::Options(0, 0, set->stylesheet.get()));
|
||||
SCRIPT_PARAM(CardP, card);
|
||||
SCRIPT_PARAM(GeneratedImageP, input);
|
||||
StyleSheet* stylesheet = card && card->stylesheet ? card->stylesheet.get() : set->stylesheet.get();
|
||||
Image image = input->generate(GeneratedImage::Options(0, 0, stylesheet));
|
||||
SCRIPT_RETURN(image.GetHeight());
|
||||
}
|
||||
|
||||
SCRIPT_FUNCTION(dimensions_of) {
|
||||
SCRIPT_PARAM(Set*, set);
|
||||
SCRIPT_PARAM(GeneratedImageP, input);
|
||||
Image image = input->generate(GeneratedImage::Options(0, 0, set->stylesheet.get()));
|
||||
SCRIPT_PARAM(CardP, card);
|
||||
SCRIPT_PARAM(GeneratedImageP, input);
|
||||
StyleSheet* stylesheet = card && card->stylesheet ? card->stylesheet.get() : set->stylesheet.get();
|
||||
Image image = input->generate(GeneratedImage::Options(0, 0, stylesheet));
|
||||
ScriptCustomCollectionP ret(new ScriptCustomCollection());
|
||||
ret->value.push_back(to_script(image.GetWidth()));
|
||||
ret->value.push_back(to_script(image.GetHeight()));
|
||||
|
||||
Reference in New Issue
Block a user