Skip to content

Commit

Permalink
Update Studio.osl
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistium authored Jul 31, 2024
1 parent 6ec5d28 commit e9fc93b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions OSL Programs/apps/System/Studio.osl
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ window_colour = user.theme.background
def "draw_buttons"
loc -2 2 -20 -20

square 20 20 10 : c#c_seco hover_size#1.1
square 20 20 10 : c#c_prim hover_size#1.1
icon "close" 0.6 : c#c_text
if clicked (
window "stop"
)

square 20 20 10 : c#c_seco chx#-40
square 20 20 10 : c#c_prim chx#-40
if mouse_touching "square 20 20 12"
icon "down" 0.6 : c#c_text
if clicked (
window "minimise"
)

square 20 20 10 : c#c_seco chx#-40
square 20 20 10 : c#c_prim chx#-40
if mouse_touching "square 20 20 12"
icon "maximise" 0.6 : c#c_text
if onclick (
Expand All @@ -63,21 +63,21 @@ if current_studio_page == "Recent Files" (

loc 2 2 25 -25
square 30 30 15 1 : c#c_prim
square 30 30 10 1 : c#c_seco hover_c#c_prim
square 30 30 10 1 : c#c_prim hover_c#c_seco
if onclick (
current_studio_page = "Home"
)
icon "left-arrow" 0.7 : c#c_text hover_size#1.2

c c_prim
frame window."left" window."top" - 50 window."right" window."bottom" recent.len * 60
frame window.left window.top - 50 window.right window.bottom recent.len * 60
w = frame_width - 20
count = (scroll_y / 60).round
loop (frame_height / 60).round (
count ++
y = count * -60 + 30 + scroll_y
loc 999 2 0 y
square w 40 10 1 : c#c_seco cursor#pointer
square w 40 10 1 : c#c_prim cursor#pointer
cur = recent[count]
if mouse_touching (
square w 40 15 1 : c#global_accent
Expand Down Expand Up @@ -117,15 +117,15 @@ if current_studio_page == "Home" (
text "Recent Files" 8

loc 2 2 w / 2 - 5 -290
square w2 30 10 : c#c_seco
square w2 30 10 : c#c_prim
if onclick (
file "pick"
)
change_x w2 / -2 + 10
text "Open File" 9 : c#c_text

loc 2 2 w / 2 - 5 -125
square w2 30 10 : c#c_seco
square w2 30 10 : c#c_prim
input w2 - 10 25 "name" "hello world.txt" 10 c_text
change_y -55
if input_name.matchregex("/[^.]+\.[^.]+/gm") (
Expand All @@ -140,9 +140,8 @@ if current_studio_page == "Home" (
change_x w2 / -2 + 15 : c#c_text
) else (
square w2 30 10 1 : c#c_seco
change_x w2 / -2 + 15 : c#c_prim
change_x w2 / -2 + 15 : c#c_tert
)
c c_text
icon "Add" 0.5
text "Create New File" 8 : chx#20

Expand All @@ -152,10 +151,10 @@ if current_studio_page == "Home" (
for count recent_2.len (
y = count * -55 + 25 + scroll_y
loc 999 2 0 y
square w 30 10 1 : c#c_seco cursor#pointer
square w 30 10 1 : c#c_prim cursor#pointer
cur = recent_2[count]
if mouse_touching (
square frame_width - 20 30 15 1 : c#c_prim
square frame_width - 20 30 15 1 : c#c_seco
if onclick (
current_studio_page = cur.str
)
Expand Down

0 comments on commit e9fc93b

Please sign in to comment.