45 lines
884 B
Python
Executable File
45 lines
884 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from src.dariuino import *
|
|
|
|
|
|
class Argument:
|
|
INTEGER = 1
|
|
STRING = 2
|
|
|
|
def __init__(self, name, type):
|
|
self.name = name
|
|
self.type = type
|
|
|
|
|
|
class Statement:
|
|
def __init__(self, name):
|
|
self.arguments = []
|
|
|
|
def add_argument(self, argument):
|
|
self.arguments.append(argument)
|
|
|
|
|
|
def main():
|
|
resources = gui.ResourceContainer.from_json_file('res/resources.json')
|
|
|
|
container = gui.Container(gui.Position(0, 0), gui.Dimensions(600, 600))
|
|
|
|
c = gui.Dragable(resources.get_image('icon-for-32'), gui.Position(100, 300))
|
|
c.on_click = lambda : print('Hello world')
|
|
|
|
a = gui.Dragable(resources.get_image('icon-while-32'), gui.Position(150, 350))
|
|
|
|
container.add_clickable(c)
|
|
container.add_clickable(a)
|
|
|
|
ui = gui.UI('Dariuino IDE', gui.Dimensions(1920, 1080))
|
|
ui.add_container(container)
|
|
ui.init()
|
|
ui.update()
|
|
ui.main()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|