Connexion
S'inscrire
Actualités
Quoi de neuf
Activités générales
Auteurs
Forums
Nouveaux messages
Rechercher un forum
Quoi de neuf
Nouveaux messages
Nouveaux messages de profil
Activités générales
Membres
Membres inscrits
Visiteurs actuels
Nouveaux messages de profil
Rechercher dans les messages des profils
Teams
Créé ton équipe
Quoi de neuf ?
Nouveaux messages
Rechercher un forum
Menu
Connexion
S'inscrire
Install the app
Install
Forums
Plateformes
Xbox
Questions, aides et recherches
Interaction bouton GuideMain.xur
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Vous utilisez un navigateur non à jour ou ancien. Il ne peut pas afficher ce site ou d'autres sites correctement.
Vous devez le mettre à jour ou utiliser un
navigateur alternatif
.
Répondre à la discussion
Message
<blockquote data-quote="kalicem" data-source="post: 7385877" data-attributes="member: 197124"><p>Bonjour, j'ai modifié et ajouté une 5e tab avec des boutons, et je cherche en vain à ajouter des événements lorsque je clique sur ces boutons.</p><p>Voici les morceaux de code que j'ai ajoutés:</p><p></p><p></p><p>[CODE]HRESULT XuiRegisterClassHook(const XUIClass * pClass, HXUICLASS *phClass)</p><p>{</p><p>HRESULT ret = XuiRegisterClass(pClass, phClass);</p><p>aprint("Register");</p><p>ScnGuideInfo::Register(); //GuideInfo</p><p>ScnGuideMain::Register(); //GuideMain</p><p>return ret;</p><p>}</p><p></p><p>HRESULT XuiUnregisterClassHook(LPCWSTR szClassName)</p><p>{</p><p>HRESULT ret = XuiUnregisterClass(szClassName);</p><p>aprint("Unregister");</p><p>ScnGuideInfo::Unregister(); //GuideInfo</p><p>ScnGuideMain::Unregister(); //GuideMain</p><p>return ret;</p><p>}[/CODE]</p><p></p><p>dans ScnGuideMain.h:</p><p></p><p>[CODE]#pragma once</p><p>#include <xtl.h></p><p>#include <xui.h> // XUI Runtime</p><p>#include <xuiapp.h> // XUI Class Library</p><p>#include "pTools.h"</p><p></p><p>class ScnGuideMain : CXuiSceneImpl</p><p>{</p><p>public:</p><p></p><p>CXuiTextElement Hitmanw, ROL, imgControllerBattery, imgHeadsetBattery, btnY, btnX, btnB, txt_gamesSel, txt_Games, txt_SystemSel, txt_Settings, Tabscene, txt_MediaSel, txt_Media;</p><p></p><p></p><p>CXuiControl btnRedeemToken;</p><p>CXuiControl btnReset;</p><p>CXuiControl btnUpdates;</p><p>CXuiControl btnDev;</p><p>CXuiControl btnkvboton;</p><p>CXuiControl btnreboot;</p><p>CXuiControl descargarmodloader;</p><p></p><p>XUI_IMPLEMENT_CLASS(ScnGuideMain, L"GuideMain", XUI_CLASS_SCENE)</p><p>XUI_BEGIN_MSG_MAP()</p><p>XUI_ON_XM_NOTIFY_PRESS(OnNotifyPress)</p><p>XUI_ON_XM_INIT(OnInitGuideMain)</p><p>XUI_ON_XM_RENDER(OnRenderGuideMain)</p><p>XUI_END_MSG_MAP()</p><p></p><p>HRESULT OnInitGuideMain(XUIMessageInit *pInitData, BOOL& bHandled);</p><p>HRESULT OnRenderGuideMain(XUIMessageRender *pRenderData, BOOL& bHandled);</p><p>HRESULT InitializeChildrenGuideMain();</p><p>HRESULT OnNotifyPress(HXUIOBJ hObjPressed, BOOL& bHandled);</p><p></p><p>};</p><p>[/CODE]</p><p></p><p>dans ScnGuideMain.cpp :</p><p></p><p>[CODE]#include "stdafx.h"</p><p>#include "ScnGuideMain.h"</p><p></p><p>HRESULT ScnGuideMain::OnInitGuideMain(XUIMessageInit *pInitData, BOOL& bHandled)</p><p>{</p><p>InitializeChildrenGuideMain();</p><p>aprint("OnInitGuideMain");</p><p>return ERROR_SUCCESS;</p><p>}</p><p></p><p>HRESULT ScnGuideMain::OnNotifyPress(HXUIOBJ hObjPressed, BOOL& bHandled)</p><p>{</p><p>if (hObjPressed == btnRedeemToken)</p><p>{</p><p>XNotifyUI(L"btnRedeemToken");</p><p>bHandled = TRUE;</p><p>return S_OK;</p><p>}</p><p>else if (hObjPressed == btnReset)</p><p>{</p><p>XNotifyUI(L"btnReset");</p><p>bHandled = TRUE;</p><p>return S_OK;</p><p>}</p><p>else if (hObjPressed == btnUpdates)</p><p>{</p><p>XNotifyUI(L"btnUpdates");</p><p>bHandled = TRUE;</p><p>return S_OK;</p><p>}</p><p>else if (hObjPressed == btnDev)</p><p>{</p><p>XNotifyUI(L"btnDev");</p><p>bHandled = TRUE;</p><p>return S_OK;</p><p>}</p><p>else if (hObjPressed == btnkvboton)</p><p>{</p><p>XNotifyUI(L"btnkvboton");</p><p>bHandled = TRUE;</p><p>return S_OK;</p><p>}</p><p>else if (hObjPressed == btnreboot)</p><p>{</p><p>XNotifyUI(L"btnreboot");</p><p>Sleep(300);</p><p>HalReturnToFirmware(HalFatalErrorRebootRoutine);</p><p>bHandled = TRUE;</p><p>return S_OK;</p><p>}</p><p>else if (hObjPressed == descargarmodloader)</p><p>{</p><p>XNotifyUI(L"descargarmodloader");</p><p>bHandled = TRUE;</p><p>return S_OK;</p><p>}</p><p></p><p>return S_OK;</p><p>}</p><p></p><p></p><p>HRESULT ScnGuideMain::OnRenderGuideMain(XUIMessageRender *pRenderData, BOOL& bHandled)</p><p>{</p><p>aprint("OnRenderGuideMain");</p><p>return ERROR_SUCCESS;</p><p></p><p>}</p><p></p><p></p><p>HRESULT ScnGuideMain::InitializeChildrenGuideMain()</p><p>{</p><p>aprint("InitializeChildrenGuideMain");</p><p>return ERROR_SUCCESS;</p><p>}</p><p></p><p>[/CODE]</p><p></p><p>aprint("Register"); et aprint("Unregister"); sont bien écrit</p><p></p><p>ScnGuideInfo::Register(); and ScnGuideInfo::Unregister(); fonctionne, mais pas ScnGuideMain::Register(); and ScnGuideMain::Unregister();</p><p>Toute aide est la bienvenue.</p><p>Merci par avance.[ATTACH=full]123774[/ATTACH]</p></blockquote><p></p>
[QUOTE="kalicem, post: 7385877, member: 197124"] Bonjour, j'ai modifié et ajouté une 5e tab avec des boutons, et je cherche en vain à ajouter des événements lorsque je clique sur ces boutons. Voici les morceaux de code que j'ai ajoutés: [CODE]HRESULT XuiRegisterClassHook(const XUIClass * pClass, HXUICLASS *phClass) { HRESULT ret = XuiRegisterClass(pClass, phClass); aprint("Register"); ScnGuideInfo::Register(); //GuideInfo ScnGuideMain::Register(); //GuideMain return ret; } HRESULT XuiUnregisterClassHook(LPCWSTR szClassName) { HRESULT ret = XuiUnregisterClass(szClassName); aprint("Unregister"); ScnGuideInfo::Unregister(); //GuideInfo ScnGuideMain::Unregister(); //GuideMain return ret; }[/CODE] dans ScnGuideMain.h: [CODE]#pragma once #include <xtl.h> #include <xui.h> // XUI Runtime #include <xuiapp.h> // XUI Class Library #include "pTools.h" class ScnGuideMain : CXuiSceneImpl { public: CXuiTextElement Hitmanw, ROL, imgControllerBattery, imgHeadsetBattery, btnY, btnX, btnB, txt_gamesSel, txt_Games, txt_SystemSel, txt_Settings, Tabscene, txt_MediaSel, txt_Media; CXuiControl btnRedeemToken; CXuiControl btnReset; CXuiControl btnUpdates; CXuiControl btnDev; CXuiControl btnkvboton; CXuiControl btnreboot; CXuiControl descargarmodloader; XUI_IMPLEMENT_CLASS(ScnGuideMain, L"GuideMain", XUI_CLASS_SCENE) XUI_BEGIN_MSG_MAP() XUI_ON_XM_NOTIFY_PRESS(OnNotifyPress) XUI_ON_XM_INIT(OnInitGuideMain) XUI_ON_XM_RENDER(OnRenderGuideMain) XUI_END_MSG_MAP() HRESULT OnInitGuideMain(XUIMessageInit *pInitData, BOOL& bHandled); HRESULT OnRenderGuideMain(XUIMessageRender *pRenderData, BOOL& bHandled); HRESULT InitializeChildrenGuideMain(); HRESULT OnNotifyPress(HXUIOBJ hObjPressed, BOOL& bHandled); }; [/CODE] dans ScnGuideMain.cpp : [CODE]#include "stdafx.h" #include "ScnGuideMain.h" HRESULT ScnGuideMain::OnInitGuideMain(XUIMessageInit *pInitData, BOOL& bHandled) { InitializeChildrenGuideMain(); aprint("OnInitGuideMain"); return ERROR_SUCCESS; } HRESULT ScnGuideMain::OnNotifyPress(HXUIOBJ hObjPressed, BOOL& bHandled) { if (hObjPressed == btnRedeemToken) { XNotifyUI(L"btnRedeemToken"); bHandled = TRUE; return S_OK; } else if (hObjPressed == btnReset) { XNotifyUI(L"btnReset"); bHandled = TRUE; return S_OK; } else if (hObjPressed == btnUpdates) { XNotifyUI(L"btnUpdates"); bHandled = TRUE; return S_OK; } else if (hObjPressed == btnDev) { XNotifyUI(L"btnDev"); bHandled = TRUE; return S_OK; } else if (hObjPressed == btnkvboton) { XNotifyUI(L"btnkvboton"); bHandled = TRUE; return S_OK; } else if (hObjPressed == btnreboot) { XNotifyUI(L"btnreboot"); Sleep(300); HalReturnToFirmware(HalFatalErrorRebootRoutine); bHandled = TRUE; return S_OK; } else if (hObjPressed == descargarmodloader) { XNotifyUI(L"descargarmodloader"); bHandled = TRUE; return S_OK; } return S_OK; } HRESULT ScnGuideMain::OnRenderGuideMain(XUIMessageRender *pRenderData, BOOL& bHandled) { aprint("OnRenderGuideMain"); return ERROR_SUCCESS; } HRESULT ScnGuideMain::InitializeChildrenGuideMain() { aprint("InitializeChildrenGuideMain"); return ERROR_SUCCESS; } [/CODE] aprint("Register"); et aprint("Unregister"); sont bien écrit ScnGuideInfo::Register(); and ScnGuideInfo::Unregister(); fonctionne, mais pas ScnGuideMain::Register(); and ScnGuideMain::Unregister(); Toute aide est la bienvenue. Merci par avance.[ATTACH type="full"]123774[/ATTACH] [/QUOTE]
Insérer les citations…
Vérification
Publier la réponse
Forums
Plateformes
Xbox
Questions, aides et recherches
Interaction bouton GuideMain.xur
Ce site utilise des cookies. En continuant à utiliser ce site, vous acceptez l'utilisation des cookies.
Acceptez
En savoir plus.…
Haut