Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [PHP]function createSkillWindow() {
- new GuiControl("Skill_Window") {
- useownprofile = true;
- profile.border = 0;
- width = 376;
- height = 428;
- x = (screenwidth - 376) / 2;
- y = 89;
- //thiso.catchevent(this, "onMouseLeave", "mouseLeftGUI");
- new GuiShowImgCtrl("Skill_Window_BG") {
- image = "roak_guiwindow_skills.png";
- width = 376;
- height = 428;
- x = y = 0;
- }
- // show multiline text box for images to allow scroll
- new GuiScrollCtrl("Skill_Window_Scroll") {
- profile = "";
- useownprofile = true;
- profile.border = 0;
- hscrollbar = "alwaysOff";
- vscrollbar = "dynamic";
- width = 310;
- height = 361;
- x = 48;
- y = 45;
- }
- // show the selected weapon
- new GuiShowImgCtrl("Skill_Window_Close") {
- useownprofile = true;
- image = "roak_guiwindow_x.png";
- width = 29;
- height = 30;
- x = 344;
- y = 16;
- //bringtofront();
- }
- }
- }
- [/PHP]
- The image that eventually gets shown up
- [PHP]new GuiShowImgCtrl("Skill_Image_"@search_list[i]) {
- x = setX + 4;
- y = setY + 5;
- image = search_list[i].image;
- hint = search_list[i];
- width = 65;
- height = getimgheight(search_list[i].image) + 30;
- zoom = 1;
- alpha = 1;
- layer = 7;
- thiso.catchevent(this, "onMouseEnter", "playHoverSnd");
- thiso.catchevent(this, "onMouseDragged", "dragItem");
- }[/PHP]
- then it adds to the skill window scroll ctrl
- [PHP]// add the image to the scroll window
- Skill_Window_Scroll.addcontrol(@"Skill_Image_"@search_list[i]);[/PHP]
- then the function for the zoom and sound on hover to be played.
- [PHP]function playHoverSnd(keymodifier, mousescreenx, mousescreeny) {
- // play the sound
- if (getOptionsVariable("sound")) play(this.clickSound);
- echo(keymodifier);
- // reset the hover img, so mouse over overrides
- (@this.holdBtn).zoom = 1;
- // set the new active btn
- this.holdBtn = keymodifier;
- this.holdBtnImg = keymodifier.hint;
- // set the alpha image to true
- (@this.holdBtn).zoom = 0.7;
- }[/PHP]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement