LoadImageFromFile for ui.ImageBox and guild mark list display fixed

This commit is contained in:
d1str4ught
2025-09-22 01:43:32 +02:00
parent eb802c565d
commit f5bfc5e939
2 changed files with 10 additions and 1 deletions

View File

@@ -822,6 +822,13 @@ class ImageBox(Window):
if len(self.eventDict)!=0: if len(self.eventDict)!=0:
print "LOAD IMAGE", self, self.eventDict print "LOAD IMAGE", self, self.eventDict
def LoadImageFromFile(self, imageName):
self.name=imageName
wndMgr.LoadImageFromFile(self.hWnd, imageName)
if len(self.eventDict)!=0:
print "LOAD IMAGE", self, self.eventDict
def SetAlpha(self, alpha): def SetAlpha(self, alpha):
wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha) wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)

View File

@@ -38,7 +38,7 @@ class MarkItem(ui.ListBoxEx.Item):
imgBox.AddFlag("not_pick") imgBox.AddFlag("not_pick")
imgBox.SetParent(self) imgBox.SetParent(self)
imgBox.SetPosition(0, 2) imgBox.SetPosition(0, 2)
imgBox.LoadImage(fileName) imgBox.LoadImageFromFile(fileName)
imgBox.Show() imgBox.Show()
return imgBox return imgBox
else: else:
@@ -221,6 +221,8 @@ class MarkSelectDialog(ui.ScriptWindow):
self.__AppendFileList("bmp") self.__AppendFileList("bmp")
self.__AppendFileList("tga") self.__AppendFileList("tga")
self.__AppendFileList("jpg") self.__AppendFileList("jpg")
self.__AppendFileList("jpeg")
self.__AppendFileList("png")
def __ClearFileList(self): def __ClearFileList(self):
self.markListBox.RemoveAllItems() self.markListBox.RemoveAllItems()