Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added scroll to Widget and Dialog #419

Merged
merged 5 commits into from
Oct 20, 2023
Merged

Added scroll to Widget and Dialog #419

merged 5 commits into from
Oct 20, 2023

Conversation

p4p1
Copy link
Contributor

@p4p1 p4p1 commented Oct 20, 2023

Changes

  • Dialog and Widget class can now take a Boolean as second argument to allow scroll in case of overflow
  • Buttons can now have an optional thrid argument to change it's style
  • Checkbox also have a third arguement to change it's style
  • Dialog can also have a default width and height set during initialization (default set to 400/300)

New

  • widgets and dialogs can now have dials
  • widgets and dialogs can now have vertical or horizontal sliders
  • Havoc.getlisteners() -> will return an array of listeners (similar to getdemons)

Screenshots

scrollable dialogs

image

scrollable widgets

image

button and checkbox with custom style

image

Dial and sliders

image

Sample code

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Made by papi
# Created on: Fri 20 Oct 2023 09:51:04 AM CEST
# test_scroll.py
# Description:

import havocui

abc = havocui.Widget("it is me!", True)

defi = havocui.Dialog("it is me!", True)

def close_defi():
    defi.close()
def add_text2():
    defi.addLabel("new text!")
defi.addButton("styled add text", add_text2, "background-color: blue; color: white; border: 2px solid black;")
defi.addLabel("Press a button to add text!")
def dial_data(num):
    print(num)
defi.addDial(dial_data)
defi.addSlider(dial_data)
defi.addSlider(dial_data, True)
defi.addButton("close", close_defi)

def add_text():
    abc.addLabel("new text!")
abc.addButton("styled add text", add_text, "background-color: blue; color: white; border: 2px solid black;")
abc.addLabel("Press a button to add text!")
abc.addCheckbox("checkme", add_text, "QCheckBox { background-color: yellow; color: blue; }")
abc.addButton("add text", add_text)
abc.addDial(dial_data)
abc.addSlider(dial_data)
abc.addSlider(dial_data, True)

def show_dialog():
    abc.setSmallTab()
def defi_show():
    defi.exec()

havocui.createtab("scroll", "widget scroll test", show_dialog, "open square dialog", defi_show)

@S4ntiagoP S4ntiagoP merged commit dfabe00 into HavocFramework:dev Oct 20, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants