Thread: OSRS Poll interface

Results 1 to 3 of 3
  1. #1 OSRS Poll interface 
    Registered Member
    rebecca's Avatar
    Join Date
    Aug 2017
    Posts
    1,071
    Thanks given
    862
    Thanks received
    915
    Rep Power
    5000
    This is really just a base with placeholders atm, a lot of the core features that's done with cs2 aren't included as the snippet would be huge. 317 lol

    Things to add on your end:
    Managing scrollbar with bigger lists
    Adding more components to suit your polled items and setting component visibility
    Text wrapping
    Component positioning/resizing

    Attached image

    Code:
    public static void pollTab(GameFont[] tda) {
    		Widget parent = addTabInterface(47000);
    		addSprite(47001, 106);
    		addText(47002, "Mikanscape Content Poll #1: Test Vote", tda, 2, 0xff981f, true, true);
    		addHoverButton_sprite_loader(47003, 107, 172, 20, "Close", -1, 47004, 1);
    		addHoveredButton_sprite_loader(47004, 108, 172, 20, 47005);
    		addText(47006, "You have not yet voted in this poll.", tda, 1, 0xFFFFFF, false, true);
    		addText(47007, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor \\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis \\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
    				tda
    				, 1,
    				0xff981f,
    				false,
    				true);
    		addHoverButton_sprite_loader(47100, 487, 85, 22, "Submit", -1, 47101, 1);
    		addHoveredButton_sprite_loader(47101, 488, 85, 22, 47102);
    		addHoverButton_sprite_loader(47103, 487, 85, 22, "Cancel", -1, 47104, 1);
    		addHoveredButton_sprite_loader(47104, 488, 85, 22, 47105);
    		addText(47106, "Submit", tda, 0, 0xff981f, false, true);
    		addText(47107, "Results", tda, 0, 0xff981f, false, true);
    		Widget questionParent = addTabInterface(47008);
    		questionParent.width = 472;
    		questionParent.height = 262;
    		questionParent.scrollMax = 315;
    		addQuestion(47009, 1, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \\ntempor incididunt ut labore et dolore magna aliqua?", tda, false);
    		addQuestion(47023, 2, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \\ntempor incididunt ut labore et dolore magna aliqua?", tda, false);
    		addQuestion(47037, 3, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \\ntempor incididunt ut labore et dolore magna aliqua?", tda, false);
    		int parentChild = 0;
    		int questions = 3;
    		parent.totalChildren(12);
    		parent.child(parentChild++, 47001, 10, 2);
    		parent.child(parentChild++, 47002, 250, 12);
    		parent.child(parentChild++, 47003, 470, 9);
    		parent.child(parentChild++, 47004, 470, 9);
    		parent.child(parentChild++, 47006, 23, 42);
    		parent.child(parentChild++, 47100, 315, 38);
    		parent.child(parentChild++, 47101, 315, 38);
    		parent.child(parentChild++, 47103, 400, 38);
    		parent.child(parentChild++, 47104, 400, 38);
    		parent.child(parentChild++, 47107, 425, 43 );
    		parent.child(parentChild++, 47106, 340, 43);
    		parent.child(parentChild++, 47008, 0, 62);
    		int questionChild = 0;
    		int y = 60;
    		int id = 0;
    		questionParent.totalChildren(37);
    		questionParent.child(questionChild++, 47007, 23, 2);
    		for(int i = 0; i < questions; i++) {
    			questionParent.child(questionChild++, 47009 + 1 + id, 22, y + 2);
    			questionParent.child(questionChild++, 47009 + 2 + id, 20, y);
    			questionParent.child(questionChild++, 47009 + 3 + id, 24, y + 3);
    			questionParent.child(questionChild++, 47009 + 4 + id, 24, y + 14);
    			questionParent.child(questionChild++, 47009 + 5 + id, 24, y + 42);
    			questionParent.child(questionChild++, 47009 + 6 + id, 44, y + 46);
    			questionParent.child(questionChild++, 47009 + 7 + id, 24, y + 60);
    			questionParent.child(questionChild++, 47009 + 8 + id, 44, y + 64);
    			questionParent.child(questionChild++, 47009 + 9 + id, 70, y + 42);
    			questionParent.child(questionChild++, 47009 + 10 + id, 70, y + 60);
    			questionParent.child(questionChild++, 47009 + 11 + id, 260, y + 45);
    			questionParent.child(questionChild++, 47009 + 12 + id, 260, y + 63);
    			id += 14;
    			y += 85;
    		}
    
    
    	}
    
    	private static void addQuestion(int id, int i, String s, GameFont[] tda, boolean inactive) {
    		addBox(id + 1, 442, 80, 0xffffff, (byte)240, true);
    		addBox(id + 2, 446, 82, 0xffffff, (byte)190, false);
    		addText(id + 3, "Question " + i, tda, 0, 0xff981f, false, true);
    		addText(id + 4, s, tda, 1, 0xFFFFFF, false, true);
    		addButton(id + 5, 490, "Select");
    		addText(id + 6, "Yes", tda, 0, 0xff981f, false, true);
    		addButton(id + 7, 490, "Select");
    		addText(id + 8, "No", tda, 0, 0xff981f, false, true);
    		addBox(id + 9, 380, 17, 0x000000, (byte)180, true);
    		addBox(id + 10, 380, 17, 0x000000, (byte)200, true);
    		addText(id + 11, "100%", tda, 0, 0xffffff, true, true);
    		addText(id + 12, "100%", tda, 0, 0xffffff, true, true);
    	}
    
            public static void addBox(int ID, int w, int h, int color, byte alpha, boolean filled) {
    		Widget t = interfaceCache[ID] = new Widget();
    		t.id = ID;
    		t.parent = ID;
    		t.type = 3;
    		t.atActionType = 1;
    		t.contentType = 0;
    		t.width = w;
    		t.height = h;
    		t.opacity = alpha;
    		t.textColor = color;
    		t.filled = filled;
    		t.drawsTransparent = true;
    	}
    Sprites
    Reply With Quote  
     

  2. #2  
    COMMING SOON

    Fluxious's Avatar
    Join Date
    Jan 2019
    Posts
    388
    Thanks given
    195
    Thanks received
    198
    Rep Power
    502
    Thanks ! Will make use out of this
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2020
    Posts
    25
    Thanks given
    1
    Thanks received
    2
    Rep Power
    6
    Where do I add this? Thank you for the release
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. OSRS Shop interface
    By George in forum Snippets
    Replies: 13
    Last Post: 08-17-2016, 05:27 PM
  2. [OSRS] Client Interface unpacking
    By 3pic f4il in forum Help
    Replies: 0
    Last Post: 04-26-2016, 11:09 PM
  3. Replies: 2
    Last Post: 10-21-2015, 11:28 PM
  4. OSRS bh interface
    By _Sean in forum Graphics
    Replies: 2
    Last Post: 07-14-2015, 10:58 PM
  5. OSRS Bank Interface
    By CrazyPanda in forum Selling
    Replies: 14
    Last Post: 04-02-2015, 06:57 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •