DonationCoder.com Software > Ecaradec's Software
Qatapult
ewemoa:
Perhaps one of the purposes was to attract attention...it seems there was some success in that...
ecaradec:
Looking back again, still there is an issue : the run command looks really bad, so does others.
ecaradec:
After another check, I think this is ok :P . Pray that I don't change my mind in a few minutes.
pigeonlips:
Hi All,
heres an attempt at an Alfred like skin (note i have never used it so its based on the screen shots I've seen)
I wouldn't recommend using it as its far from finished, but i was hoping for a little help (or to find out whats possible)
Any hints on the following:
1 - any way of making the text in the input box a different size and color?
2 -
A) the results box background is white and i don't know how (or if) you can set a background. If i could then the skin could be something more classy than white. The ideal would be if i could make the background color transparent as that way there's less images to load for the skin.
B) is there any way of controlling the size of the results? This way i could fit more into results without the skin being very large.
3 - the text of the type TEXT always appears white at the bottom. I have no idea how to set this.
4 - you'll have to try the skin for this one but it would be nice to set some more properties depending on the type. Any way of finding out whats available by type in qatapult.getArgValue(0, "XXXX")
also Is it a bad idea to use code in the script to get other properties. I was thinking somthing like
if (last bit of filename = "mp3")
show filename.album
show filename.artist
show filename.track
I'm not sure if this is ill advised as performance hit to qatapult is not what i want. I guess i might just have to try that one out.
Spoiler
--- Code: Javascript ---var skin="skins\\alfred-like\\";var SkinWidth=500;var SkinHeight=300;var SkinBorder=10; function draw(ui) { // set the text color ui.textcolor=0x88000000; ui.fontsize=12; // draw the canvas ui.drawBitmap(skin+"background.png", 0, 0, SkinWidth, SkinHeight); // draw the input box // HELP > ---------------------------------------------------------- // HELP > // HELP > ui.fontsize=16; /* doesnt affect the size of the input box below */ // HELP > ---------------------------------------------------------- ui.drawInput(30,42,SkinWidth-((SkinBorder+10)*2),15); // now draw the items - pane one if(qatapult.argscount==1) { drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36); //ui.drawBitmap(skin+"next.png",190,SkinHeight - 37, 15, 15); } // now draw the items - pane two if (qatapult.argscount==2) { drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36); drawItem(ui,1, SkinBorder + 200, SkinHeight - 47, 150, 36); ui.drawBitmap(skin+"next.png",190,SkinHeight - 37, 15, 15); } // now draw the items - pane three if (qatapult.argscount==3) { drawItem(ui,0, SkinBorder + 20, SkinHeight - 47, 150, 36); drawItem(ui,1, SkinBorder + 200, SkinHeight - 47, 150, 36); drawItem(ui,2, SkinBorder + 350, SkinHeight - 47, 150, 36); ui.drawBitmap(skin+"next.png",340,SkinHeight - 37, 15, 15); } // draw results box if(/*qatapult.resultsvisible && */qatapult.resultscount!=0) { var resultscount=Math.min(5,qatapult.resultscount); // HELP > ---------------------------------------------------------- // HELP > can we change the background or color of the results box? // HELP > I have am using a white skin so that it matchs the background of the results // HELP > ---------------------------------------------------------- // HELP > ---------------------------------------------------------- // HELP > can the size of the items be set. If it where smaller i could fit in more results // HELP > ---------------------------------------------------------- ui.drawResults(SkinBorder,65,(SkinWidth/2) - SkinBorder,SkinHeight -(100+SkinBorder)); } if(qatapult.argscount>1) { // whats the type? type = qatapult.getArgValue(0, "type") if (type == "TEXT") { // set text size and color ui.fontsize=8; ui.textcolor=0x88000000; // draw the frame - this can be used for images or something. ui.drawBitmap(skin+"frame.png",320 ,65, 107, 91); // display some info in text status = qatapult.getArgValue(0, "status") email = qatapult.getArgValue(0, "email") text = qatapult.getArgValue(0, "text") ui.drawText("type : "+type, SkinWidth/2 + SkinBorder,160,200,15); // seams static in the wrong position ? ui.drawText("status : "+status, SkinWidth/2 + SkinBorder,180,200,15); // seams centered? ui.drawText("email : "+email, SkinWidth/2 + SkinBorder,200,200,15); // seams static in the wrong position ? ui.drawText("text : "+text, SkinWidth/2 + SkinBorder,220,200,15); // seams centered? ui.fontsize=12; // the first result at the bottom in free text is white. ? Add it here instead. ui.drawText(status, SkinBorder + 20,SkinHeight - 47, 150, 36); } if (type == "FILE") { // set text size and color ui.fontsize=14; ui.textcolor=0x88000000; // draw the Icon drawItem(ui,0,320 ,65, 107, 91); // display some info in text filedir = qatapult.getArgValue(0, "rdirectory") filename = qatapult.getArgValue(0, "rfilename") ui.drawText(filename, SkinWidth/2 + SkinBorder,160,200,25); ui.fontsize=8; ui.drawText("directory : ", SkinWidth/2 + SkinBorder,190,200,15); ui.drawText(filedir, SkinWidth/2 + SkinBorder,205,200,30); ui.fontsize=12; } if (type == "WINDOW") { // set text size and color ui.fontsize=8; ui.textcolor=0x88000000; // draw the frame - this can be used for images or something. ui.drawBitmap(skin+"frame.png",320 ,65, 107, 91); // display some info in text winTitle = qatapult.getArgValue(0, "title") winHWD = qatapult.getArgValue(0, "hwnd") text = qatapult.getArgValue(0, "text") ui.drawText(winTitle, SkinWidth/2 + SkinBorder,160,200,15); // seams static in the wrong position ? ui.drawText("Windows Handle : "+winHWD, SkinWidth/2 + SkinBorder,180,200,15); // seams centered? ui.fontsize=12; } else { drawItem(ui,0,320 ,65, 107, 91); } } // draw the menu button ui.drawBitmap(skin+"ui-radio-button.png", SkinWidth-40, SkinBorder, 16, 16); // drawn index progress ui.fontsize=8; ui.textcolor=0x88000000; if(qatapult.crawlprogress!=0 && qatapult.crawlprogress!=100) ui.drawText("Updating index : "+qatapult.crawlprogress+"%",SkinBorder,SkinBorder,SkinWidth-(SkinBorder*2),15) // this drew status line - opting out of this as i dont know where to put it at the moment /* var focus=qatapult.getFocus(); ui.drawEmphased(qatapult.getArgValue(focus,"status"),qatapult.getQuery(focus),15,SkinHeight-20,SkinWidth-30,10); */ // determine the mode - will add support for this later. /* if(qatapult.textmode) { //ui.drawBitmap(skin+"textbackground.png", 0, 0, 350, 200); //ui.drawInput(25,25,305,138); //height=200; } else { //ui.textcolor=0xFF000000; // draw the background according to the number of current args if(qatapult.argscount<3) { //ui.drawBitmap(skin+"background.png", 0, 0, 350, 120); //height=120; } else { //ui.drawBitmap(skin+"background_3.png", 0, 0, 350, 170); //height=170; } } */} function drawItem(ui,i,x,y,w,h) { if(qatapult.getArgValue(i,"type")=="TEXT") { // HELP > ---------------------------------------------------------- // HELP > free text always appears in white. Dont know how to set the color? // ui.drawItem(i,x+5,y+5,w-10,h-20); } else { // draw the item visual and draw it's label below ui.drawItem(i,x+2,y+2,h-4,h-4); var text=""; //if(qatapult.getArgValue(i,"email")!="") // var text=" <"+qatapult.getArgValue(i,"email")+">"; ui.drawEmphased(qatapult.getArgValue(i,"text")+text,qatapult.getQuery(i),x+h,y+10,w-2*h,30); } } function onClick(x,y) { if(x>SkinWidth-(SkinBorder*2) && x<SkinWidth-(SkinBorder*2)+16 && y>SkinBorder && y<SkinBorder+20) qatapult.showmenu(x,y);}
ecaradec:
For text color you can use textcolor on the UI object. You can also use the fontfamily property to select a different font.
The results have a white background, its actually not a very good idea, I'll give an option to change the colors. Anyways I'll probably give control on the display of the results.
Results are 40 pixels high right now, I use the size given in drawresults to know how much I can fit in.
3. Uuuh ? I'm not sure about what you mean, I'll give a look at the skin tomorrow
4. Don't worry about the performance of getstring it's in memory, you'll run out of place on the skin before it get slow
I've found a little issue with the usage bonus on results. It seems ignored on files. Beyond that, I'm splitting this info so that I get exact number of uses and last data for improving the quality and learning of qatapult
I love the start of that skin ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version