mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
prevent dropdown from closing when moving to parent or child
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ endif()
|
||||
|
||||
# You will most likely get a message about being unable to open hunspell-1.7.lib because pkgconf forgets to add the actual path to
|
||||
# HUNSPELL_LIBRARIES. If so, uncomment the below line and point it to the correct vcpkg root folder/library.
|
||||
#set(HUNSPELL_LIBRARIES "C:\\PATH\\TO\\ROOT\\vcpkg\\installed\\${VCPKG_TARGET_TRIPLET}\\lib\\hunspell-1.7.lib")
|
||||
set(HUNSPELL_LIBRARIES "C:\\src\\vcpkg\\installed\\${VCPKG_TARGET_TRIPLET}\\lib\\hunspell-1.7.lib")
|
||||
message("-- Does this have a full path? If not, and it's just a file name, it's broken: Found Hunspell at ${HUNSPELL_LIBRARIES}")
|
||||
|
||||
include_directories("${PROJECT_BINARY_DIR}/src")
|
||||
|
||||
@@ -1129,7 +1129,8 @@ error:
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: 坐标混合重叠
|
||||
images used for blending must have the same size: 边框用图像必须使用相同大小
|
||||
#TODO: Localize
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -1127,7 +1127,8 @@ error:
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: 坐標混合重疊
|
||||
images used for blending must have the same size: 邊框用圖像必須使用相同大小
|
||||
#TODO: Localize
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -1152,9 +1152,9 @@ error:
|
||||
|
||||
# image stuff
|
||||
#TODO: Localize
|
||||
coordinates for blending overlap: Coordinates for blending overlap
|
||||
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
||||
#TODO: Localize
|
||||
images used for blending must have the same size: Images used for blending must have the same size
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -1046,8 +1046,8 @@ error:
|
||||
im Reminder-Text der Fähigkeit '%s'
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: Koordinaten zum Blenden überlappen sich
|
||||
images used for blending must have the same size: Bilder müssen zum Mischen die selbe Größe haben.
|
||||
coordinates for blending overlap: Die Koordinaten für die Überblendung überlappen sich.
|
||||
blending different sizes: Die für die Überblendung verwendeten Bilder müssen in der Funktion '%s' die gleiche Größe haben.
|
||||
negative image width: Bild mit Breite Null oder negativer Breite, erstellt in der Funktion '%s'
|
||||
negative image height: Bild mit Höhe Null oder negativer Höhe, erstellt in der Funktion '%s'
|
||||
can't load image: Bild konnte nicht geladen werden. Stelle sicher, dass das tatsächliche Format des Bildes mit der gespeicherten Dateiendung übereinstimmt.
|
||||
|
||||
@@ -1047,8 +1047,8 @@ error:
|
||||
in reminder text of keyword '%s'
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: Coordinates for blending overlap
|
||||
images used for blending must have the same size: Images used for blending must have the same size
|
||||
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
negative image height: Image with zero or negative height created in function '%s'
|
||||
can't load image: Failed to load image. Ensure the image's actual format matches its saved extension.
|
||||
|
||||
@@ -1130,7 +1130,8 @@ error:
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: Coordenadas para la mezcla (blending) solapada
|
||||
images used for blending must have the same size: Las imagenes utilizadas para la mezcla (blending) deben tener el mismo tamaño
|
||||
#TODO: Localize
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -1046,8 +1046,8 @@ error:
|
||||
dans le texte de rappel du mot-clef '%s'
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: Coordonnées pour la superposition du mélange
|
||||
images used for blending must have the same size: Les images utilisées pour le mélange doivent avoir la même taille
|
||||
coordinates for blending overlap: Les coordonnées pour le mélange sont superposées. Espacez-les.
|
||||
blending different sizes: Les images utilisées pour le mélange doivent avoir la même taille dans la fonction '%s'.
|
||||
negative image width: Image de largeur nulle ou négative créée par la fonction '%s'
|
||||
negative image height: Image de hauteur nulle ou négative créée par la fonction '%s'
|
||||
can't load image: Échec du chargement de l'image. Assurez-vous que le format réel de l'image corresponde à son extension enregistrée.
|
||||
|
||||
@@ -1046,10 +1046,10 @@ error:
|
||||
in promemoria della parola-chiave '%s'
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: Coordinate per sovrapposizione
|
||||
images used for blending must have the same size: Le immagini sovrapposte devono avere le stesse misure
|
||||
negative image width: Immagine con larghezza zero o negativa creata nella funzione '%s'
|
||||
negative image height: Immagine con altezza zero o negativa creata nella funzione '%s'
|
||||
coordinates for blending overlap: Le coordinate per la fusione si sovrappongono.
|
||||
blending different sizes: Le immagini utilizzate per la fusione devono avere le stesse dimensioni nella funzione '%s'.
|
||||
negative image width: Immagine con larghezza zero o negativa creata nella funzione '%s'.
|
||||
negative image height: Immagine con altezza zero o negativa creata nella funzione '%s'.
|
||||
can't load image: Impossibile caricare l'immagine. Assicurarsi che il formato effettivo dell'immagine corrisponda all'estensione salvata.
|
||||
symbol image has alpha: Per ottenere risultati ottimali, l'immagine dovrebbe essere in bianco e nero, senza trasparenza.
|
||||
|
||||
|
||||
@@ -1130,7 +1130,8 @@ error:
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: オーバーラップを混ぜることのための座標
|
||||
images used for blending must have the same size: 混ざることのために使われたイメージは同じサイズを持たなければなりません
|
||||
#TODO: Localize
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -1136,7 +1136,8 @@ error:
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: 블렌딩 오버랩을 위한 좌표
|
||||
images used for blending must have the same size: 블렌딩에 사용되는 이미지의 크기는 동일해야 합니다.
|
||||
#TODO: Localize
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -1186,7 +1186,8 @@ error:
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: Współrzędne scalania (blending) nachodzą na siebie
|
||||
images used for blending must have the same size: Obrazy użyte do scalania (blending) muszą mieć ten sam rozmiar
|
||||
#TODO: Localize
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -1047,8 +1047,8 @@ error:
|
||||
lembrete de palavra-chave no texto '%s'
|
||||
|
||||
# image stuff
|
||||
coordinates for blending overlap: Cordenadas para mistura sobreposição
|
||||
images used for blending must have the same size: Imagens utilizados para a mistura deve ter o mesmo tamanho
|
||||
coordinates for blending overlap: As coordenadas para a mistura se sobrepõem.
|
||||
blending different sizes: As imagens usadas para mesclagem devem ter o mesmo tamanho na função '%s'.
|
||||
negative image width: Imagem com largura zero ou negativa criada na função '%s'
|
||||
negative image height: Imagem com altura zero ou negativa criada na função '%s'
|
||||
can't load image: Falha ao carregar a imagem. Verifique se o formato real da imagem corresponde à extensão salva.
|
||||
|
||||
@@ -1180,9 +1180,9 @@ error:
|
||||
|
||||
# image stuff
|
||||
#TODO: Localize
|
||||
coordinates for blending overlap: Coordinates for blending overlap
|
||||
coordinates for blending overlap: Coordinates for blending overlap. Space them out.
|
||||
#TODO: Localize
|
||||
images used for blending must have the same size: Images used for blending must have the same size
|
||||
blending different sizes: Images used for blending must have the same size in function '%s'
|
||||
#TODO: Localize
|
||||
negative image width: Image with zero or negative width created in function '%s'
|
||||
#TODO: Localize
|
||||
|
||||
@@ -61,7 +61,7 @@ IMPLEMENT_REFLECTION(WrappedCards) {
|
||||
}
|
||||
|
||||
|
||||
wxDataFormat CardsDataObject::format = _("application/x-mse-cards");
|
||||
wxDataFormat CardsDataObject::format(wxString("application/x-mse-cards"));
|
||||
|
||||
CardsDataObject::CardsDataObject(const SetP& set, const String id, const vector<CardP>& cards) {
|
||||
// set the stylesheet, so when deserializing we know whos style options we are reading
|
||||
@@ -121,7 +121,7 @@ IMPLEMENT_REFLECTION(WrappedKeyword) {
|
||||
}
|
||||
|
||||
|
||||
wxDataFormat KeywordDataObject::format = _("application/x-mse-keyword");
|
||||
wxDataFormat KeywordDataObject::format(wxString("application/x-mse-keyword"));
|
||||
|
||||
KeywordDataObject::KeywordDataObject(const SetP& set, const KeywordP& keyword) {
|
||||
WrappedKeyword data = { set->game.get(), set->game->name(), keyword };
|
||||
|
||||
@@ -19,7 +19,7 @@ template <typename T> inline T sqr(T x) { return x * x; }
|
||||
void linear_blend(Image& img1, const Image& img2, double x1,double y1, double x2,double y2) {
|
||||
int width = img1.GetWidth(), height = img1.GetHeight();
|
||||
if (img2.GetWidth() != width || img2.GetHeight() != height) {
|
||||
throw Error(_ERROR_("images used for blending must have the same size"));
|
||||
throw Error(_ERROR_1_("blending different sizes", "linear_blend"));
|
||||
}
|
||||
|
||||
const int fixed = 1<<16; // fixed point multiplier
|
||||
|
||||
@@ -439,7 +439,7 @@ void combine_image_do(Image& a, Image b) {
|
||||
void combine_image(Image& a, const Image& b, ImageCombine combine) {
|
||||
// Images must have same size
|
||||
if (a.GetWidth() != b.GetWidth() || a.GetHeight() != b.GetHeight()) {
|
||||
throw Error(_ERROR_("images used for combine blending must have the same size"));
|
||||
throw Error(_ERROR_1_("blending different sizes", "combine_blend"));
|
||||
}
|
||||
// Copy alpha channel?
|
||||
if (b.HasAlpha()) {
|
||||
|
||||
@@ -471,9 +471,13 @@ void DropDownList::onMotion(wxMouseEvent& ev) {
|
||||
}
|
||||
|
||||
void DropDownList::onMouseLeave(wxMouseEvent& ev) {
|
||||
if (close_on_mouse_out) {
|
||||
wxSize cs = GetClientSize();
|
||||
if (ev.GetX() < 0 || ev.GetY() < 0 || ev.GetX() >= cs.x || ev.GetY() >= cs.y) {
|
||||
if (close_on_mouse_out) {
|
||||
wxPoint screen_pos = ClientToScreen(ev.GetPosition());
|
||||
bool in_parent = parent_menu ? parent_menu->isInRect(screen_pos) : false;
|
||||
bool in_child = open_sub_menu ? open_sub_menu->isInRect(screen_pos) : false;
|
||||
wxSize cs = GetClientSize();
|
||||
bool in_self = !(ev.GetX() < 0 || ev.GetY() < 0 || ev.GetX() >= cs.x || ev.GetY() >= cs.y);
|
||||
if (!(in_parent || in_child || in_self)) {
|
||||
hide(false); // outside box; hide it
|
||||
ev.Skip();
|
||||
return;
|
||||
@@ -481,6 +485,14 @@ void DropDownList::onMouseLeave(wxMouseEvent& ev) {
|
||||
}
|
||||
}
|
||||
|
||||
bool DropDownList::isInRect(wxPoint screen_pos) {
|
||||
wxRect rect = GetRect();
|
||||
if (screen_pos.x < rect.x || screen_pos.y < rect.y || screen_pos.x > rect.x+rect.width || screen_pos.y > rect.y+rect.height) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void DropDownList::onMouseWheel(wxMouseEvent& ev) {
|
||||
scrollTo(visible_start - item_size.height * ev.GetWheelRotation() / ev.GetWheelDelta());
|
||||
}
|
||||
|
||||
@@ -116,9 +116,12 @@ private:
|
||||
void onMouseLeave(wxMouseEvent&);
|
||||
void onMouseWheel(wxMouseEvent& ev);
|
||||
void onScroll(wxScrollWinEvent&);
|
||||
|
||||
|
||||
// --------------------------------------------------- : Privates
|
||||
|
||||
|
||||
/// Is the given screen coordinate inside this menu's rect?
|
||||
bool isInRect(wxPoint screen_pos);
|
||||
|
||||
/// Return the y coordinate of an item (in scrolled coordinates)
|
||||
int itemPosition(size_t item) const;
|
||||
|
||||
|
||||
@@ -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