Add files via upload

master
Gerold55 2018-07-02 13:22:03 -04:00 committed by GitHub
parent 69191b1f4c
commit 0930480dc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 4 deletions

24
API.md
View File

@ -94,6 +94,7 @@
- `os_max_version` - maximum version to be used (CS-BOS, optional)
- `fullscreen` - (boolean) Do not add app-background and window buttons
- `view` - (boolean) The definition is a view. That means the app/view is not visible in launcher
- `browser_page` - (boolean) This view is shown in browser app as available page
- `formspec_func(app, mtos)` - Function, should return the app formspec (mandatory) During definition the "app" and the "mtos" are available
- `appwindow_formspec_func(launcher_app, app, mtos)`- Only custom launcher app: App background / Window decorations and buttons
- `receive_fields_func(app, mtos, sender, fields)` Function for input processing. The "app" and the "mtos" are available inside the call
@ -114,7 +115,6 @@ same as register_app, but the view flag is set. app_name and app_icon not necess
- `app:exit_app()` - Delete call stack and return to launcher
- `app:get_timer()` - Get timer for this app (based on nodetimer)
## Themes
### Theme definition
`laptop.register_theme(name, definitiontable)` - add a new theme. All parameters optional, if missed, the default is used
@ -159,6 +159,10 @@ The most colors are grouped by "prefixes". Each prefix means a specific content
- `contrast_bgcolor` dark background as RGB
- `contrast_textcolor` some labels are placed on contrast background. This color is used to colorize them
- toolbar - Toolbar buttons
`toolbar_button` Button unterlay
`toolbar_textcolor` Toolbar buttons textcolor
- status_online - Used to show status information "online / green"
- `status_online_textcolor` - Sets "online" text color for peripherals
- status_disabled - Used to show status information "disabled / yellow"
@ -178,6 +182,18 @@ The most colors are grouped by "prefixes". Each prefix means a specific content
- monochrome - Optimized for monochrome output (old computers). Some elements will be colorized using this color
- `monochrome_textcolor` - default is nil. if set to RGB, colorization is applied on some textures (like tetris shapes)
- url - Browser URL's for default background
`url_textcolor`
`url_button`
- url_dark - Browser URL's for dark background
`url_dark_textcolor`
`url_dark_button`
- url_bright - Browser URL's for white background
`url_bright_textcolor`
`url_bright_button`
- fallback - without prefix (obsolete)
- `textcolor` Default text color for buttons and labels. Each "prefix" can have own textcolor, like major_textcolor and minor_textcolor for major/minor buttons or labels
@ -234,3 +250,9 @@ Can be used for non-data and/or system tasks. For usual data store please use th
There is no own compatible items registrator. The item needs to match the item group to be usable with the laptops
- `laptop_removable_floppy = 1` - The item is a floppy
- `laptop_removable_usb = 1` - The item is usb storage disk
## Browser app specific functions
- `laptop.browser_api.navigate(app, mtos, pagename)` Check the "pagename" and start if the app have browser_page setting
- `formspec = laptop.browser_api.header_formspec_func(app, mtos)` Contains the formspec for navigation bar. Needs to be included to all pages
- `laptop.browser_api.header_receive_fields_func(app, mtos, sender, fields)` Process the navigation bar buttons. Needs to be included to all pages

View File

@ -1,4 +1,4 @@
The Laptop mod is a group collaboration between Bell07, Toby109tt, veNext, Cross_over and Yours truly lol. We aim to make a working laptop inside of MineTest. There is multiple different computers to choose from and to use. There is multiple different apps to run on computers There is multiple different media to store data There is multiple different themes to personalize computers
The Laptop mod is a group collaboration between Bell07, Toby109tt, veNext, Cross_over and Yours truly lol. We aim to make a working laptop inside of MineTest. There is multiple different computers to choose from and to use. There is multiple different apps to run on comupters There is multiple different media to store data There is multiple different themes to personalize computers
Apps Included So Far:
@ -15,4 +15,4 @@ Email
TNTSweeper
Tetris
V.0.39
V.0.38

View File

@ -74,4 +74,4 @@ The mod includes next components:
| snow pines | | by Grizzly Adam |
V.0.39
V.0.38

View File

@ -86,3 +86,11 @@ for _, file in ipairs(app_list) do
dofile(app_path..file)
end
end
dofile(app_path..'browser_app.lua')
for _, file in ipairs(app_list) do
if file:sub(-8) == '_app.lua' and file ~= 'browser_app.lua'
then
dofile(app_path..file)
end
end

View File

@ -18,6 +18,8 @@ laptop.themes = {
contrast_background = "gui_formbg.png",
contrast_bgcolor = "#000000",
contrast_textcolor = "#FFFFFF",
toolbar_button = "laptop_theme_basic_button.png",
toolbar_textcolor = "#000000",
status_online_textcolor = "#00FF00",
status_disabled_textcolor = "#FF0000",
status_off_textcolor = "#888888",
@ -36,6 +38,12 @@ laptop.themes = {
texture_replacements = {}, -- No replacements in default theme
-- os_min_version = nil,
-- os_max_version = nil,
-- used in browser app
url_dark_textcolor = "#6495ED",
url_dark_button = "laptop_theme_desktop_icon_label_button_black.png",
url_bright_textcolor = "#000080",
url_bright_button = "laptop_fruit_base.png",
},
}