@@ -62,6 +62,14 @@ HomebrewLaunchWindow::HomebrewLaunchWindow(homebrewButton & thisButton, Homebrew
6262
6363 HomebrewXML metaXml;
6464 bool xmlReadSuccess = metaXml.LoadHomebrewXMLData ((homebrewPath + " /meta.xml" ).c_str ());
65+
66+ // if GET or UDPATE, fetch xml from server
67+ // if (selectedButton->status == GET || selectedButton->status == UPDATE)
68+ // {
69+ // std::string xmlFetchData;
70+ // FileDownloader::getFile(std::string(repoUrl)+"/apps/"+selectedButton->shortname+"/meta.xml", xmlFetchData);
71+ // xmlReadSuccess = metaXml.LoadHomebrewXMLData(xmlFetchData.c_str());
72+ // }
6573
6674 int xOffset = 500 ;
6775 int yOffset = height * 0 .5f - 75 .0f ;
@@ -112,39 +120,44 @@ HomebrewLaunchWindow::HomebrewLaunchWindow(homebrewButton & thisButton, Homebrew
112120 descriptionText.setMaxWidth (width - 200 , GuiText::WRAP);
113121 append (&descriptionText);
114122
115- scaleFactor = 1 .0f ;
116- loadImg.setScale (scaleFactor);
117- loadBtn.setSize (scaleFactor * loadImg.getWidth (), scaleFactor * loadImg.getHeight ());
118- loadBtn.setImage (&loadImg);
119- loadBtn.setLabel (&loadBtnLabel);
120- loadBtn.setAlignment (ALIGN_CENTER | ALIGN_MIDDLE);
121- loadBtn.setPosition (-600 , -310 );
122- loadBtn.setTrigger (&touchTrigger);
123- loadBtn.setTrigger (&wpadTouchTrigger);
124- loadBtn.setEffectGrow ();
125- loadBtn.setSoundClick (buttonClickSound);
126- loadBtn.clicked .connect (this , &HomebrewLaunchWindow::OnLoadButtonClick);
127- append (&loadBtn);
128-
129- delImg.setScale (scaleFactor);
130- delBtn.setSize (scaleFactor * loadImg.getWidth (), scaleFactor * delImg.getHeight ());
131- delBtn.setImage (&delImg);
132- delBtn.setLabel (&delBtnLabel);
133- delBtn.setAlignment (ALIGN_CENTER | ALIGN_MIDDLE);
134- delBtn.setPosition (-200 , -310 );
135- delBtn.setTrigger (&touchTrigger);
136- delBtn.setTrigger (&wpadTouchTrigger);
137- delBtn.setEffectGrow ();
138- delBtn.setSoundClick (buttonClickSound);
139- delBtn.clicked .connect (this , &HomebrewLaunchWindow::OnDeleteButtonClick);
140- append (&delBtn);
123+ if (thisButton.status == GET || thisButton.status == UPDATE)
124+ {
125+ scaleFactor = 1 .0f ;
126+ loadImg.setScale (scaleFactor);
127+ loadBtn.setSize (scaleFactor * loadImg.getWidth (), scaleFactor * loadImg.getHeight ());
128+ loadBtn.setImage (&loadImg);
129+ loadBtn.setLabel (&loadBtnLabel);
130+ loadBtn.setAlignment (ALIGN_CENTER | ALIGN_MIDDLE);
131+ loadBtn.setPosition (-300 , -310 );
132+ loadBtn.setTrigger (&touchTrigger);
133+ loadBtn.setTrigger (&wpadTouchTrigger);
134+ loadBtn.setEffectGrow ();
135+ loadBtn.setSoundClick (buttonClickSound);
136+ loadBtn.clicked .connect (this , &HomebrewLaunchWindow::OnLoadButtonClick);
137+ append (&loadBtn);
138+ }
139+ if (thisButton.status != GET)
140+ {
141+ delImg.setScale (scaleFactor);
142+ delBtn.setSize (scaleFactor * loadImg.getWidth (), scaleFactor * delImg.getHeight ());
143+ delBtn.setImage (&delImg);
144+ delBtn.setLabel (&delBtnLabel);
145+ delBtn.setAlignment (ALIGN_CENTER | ALIGN_MIDDLE);
146+ delBtn.setPosition (0 , -310 );
147+ delBtn.setTrigger (&touchTrigger);
148+ delBtn.setTrigger (&wpadTouchTrigger);
149+ delBtn.setEffectGrow ();
150+ delBtn.setSoundClick (buttonClickSound);
151+ delBtn.clicked .connect (this , &HomebrewLaunchWindow::OnDeleteButtonClick);
152+ append (&delBtn);
153+ }
141154
142155 backImg.setScale (scaleFactor);
143156 backBtn.setSize (scaleFactor * backImg.getWidth (), scaleFactor * backImg.getHeight ());
144157 backBtn.setImage (&backImg);
145158 backBtn.setLabel (&backBtnLabel);
146159 backBtn.setAlignment (ALIGN_CENTER | ALIGN_MIDDLE);
147- backBtn.setPosition (200 , -310 );
160+ backBtn.setPosition (300 , -310 );
148161 backBtn.setTrigger (&touchTrigger);
149162 backBtn.setTrigger (&wpadTouchTrigger);
150163 backBtn.setEffectGrow ();
@@ -225,7 +238,7 @@ void HomebrewLaunchWindow::OnLoadButtonClick(GuiButton *button, const GuiControl
225238 std::string path = " /apps/" +selectedButton->shortname ;
226239 std::string sdPath = " sd:/wiiu" +path;
227240 CreateSubfolder (sdPath.c_str ());
228- std::string repoUrl = " http://192.168.1.104:8000" ;
241+ // std::string repoUrl = "http://192.168.1.104:8000";
229242 FileDownloader::getFile (repoUrl+path+" /" +selectedButton->binary , sdPath+" /" +selectedButton->binary , 0 );
230243 FileDownloader::getFile (repoUrl+path+" /meta.xml" , sdPath+" /meta.xml" , 0 );
231244 FileDownloader::getFile (repoUrl+path+" /icon.png" , sdPath+" /icon.png" , 0 );
0 commit comments