feat: port native AVA2 chest preview and CG235 pickup flows

This commit is contained in:
shen
2026-10-18 04:01:56 -07:00
parent b61140b8f4
commit 83809631ed
24 changed files with 872 additions and 614 deletions
@@ -0,0 +1,25 @@
// PORT: AVA2 ui.py additions shared by native feature windows; keep base scripts unchanged.
static const char c_szAva2UICompatScript[] = R"PY(# -*- coding: utf-8 -*-
import ui
# AVA2 Button.SetListText / PythonScriptLoader.LoadElementButton text_x branch.
def SetListText(self,text,x=8):
if not self.ButtonText:
textLine=ui.TextLine()
textLine.SetParent(self)
textLine.Show()
self.ButtonText=textLine
self.ButtonText.SetPosition(x,self.GetHeight()/2)
self.ButtonText.SetVerticalAlignCenter()
self.ButtonText.SetHorizontalAlignLeft()
self.ButtonText.SetWindowHorizontalAlignLeft()
self.ButtonText.SetText(text)
ui.Button.SetListText=SetListText
_loadButton=ui.PythonScriptLoader.LoadElementButton
def LoadElementButton(self,window,value,parent):
result=_loadButton(self,window,value,parent)
if 'text' in value and 'text_x' in value and 'text_height' not in value:
window.SetListText(value['text'],value['text_x'])
return result
ui.PythonScriptLoader.LoadElementButton=LoadElementButton
)PY";