SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-12-10, 03:13 PM   #1
AOTD_Rhonen
A-ganger
 
Join Date: May 2006
Posts: 76
Downloads: 31
Uploads: 0
Default [REQ] How Add an Event in Python

Hi guys,

anyone can help me by adding an Event on a Button?
Code:
def InitializeScript():
    
    Show = False
    Pagerecognitionmanual_Recmanual_Unit.Visible=False
    Pagerecognitionmanual_Recmanual_Criticalzones.Visible=False
    Pagerecognitionmanual_Recmanual_Cover.Visible=False
    Pagerecognitionmanual_Recmanual_Openbook.Visible= True
    SetReconEvents()
    
    #pass

def SetReconEvents():
    ScriptManagerManaged.ShowPythonError("SETEVENTs")
    Pagerecognitionmanual_Recmanual_Cover_Close.MouseLeftButtonClicked += OpenCloseManual
    Pagerecognitionmanual_Recmanual_Openbook_BtnOpen.MouseLeftButtonClicked += OpenCloseManual
    #pass

def OpenCloseManual():
    ScriptManagerManaged.ShowPythonError("EVENT")
So i get my Initialize and i get my Message on SetReconEvents()

But if i click on the BtnOpen ingame, nothing happens... so OpenCloseManual() is not handled ... Any Ideas?

And yes, i am working on the Reconitionmanual.
Both, Pagerecognitionmanual_Recmanual_Cover_Close.MouseL eftButtonClicked and Pagerecognitionmanual_Recmanual_Openbook_BtnOpen are Buttons
__________________

Member of A.O.T.D


Es gibt zwei Arten von Bugs
1. Programmfehler
2. Fehler zwischen Monitor und Sitzlehne

Die 2. sind die schlimmeren, denn die kann man nicht beheben.
AOTD_Rhonen is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.