Gerold55 / laptop

Introducing the MineTest Laptop Mod
Other
25 stars 14 forks source link

Themes #126

Open Gerold55 opened 6 years ago

Gerold55 commented 6 years ago

Is there a way to make it so if a theme doesn't have a go button (for the web browser) could we default it to another them like the basic/original theme for the browser?

bell07 commented 6 years ago

The "Go" button uses the new "toolbar" theme prefix. In current implementation all default setings in themes.lua are inherited to all themes as fallback if any parameter is missed. So if your theme does not have the "toolbar" settings, the default settings toolbar_button+toolbar_textcolor are used.

So already implemented. Is there any issue with implementation?

Gerold55 commented 6 years ago

So I'm still unsure how to fully implement it into the code i.e. each theme so could you provide some sample code so I can implement them in?

bell07 commented 6 years ago

I did not understand what you try to implement. In my post above is a link how the settings are set in default theme. Or do you mean the setting?

        -- 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",
Gerold55 commented 6 years ago

For the code below I was wondering if we could make it so that in each theme we can be able to change the buttons if wanted in each theme. If not in theme code then it should default to the original images.

local formspec = "field[.2,.5;13,1;input_field;;"..currentpage.."]field_close_on_enter[input_field;false]".. mtos.theme:get_image_button('12.9,.3;.8,.8', 'toolbar', 'go_button', 'laptop_go_web.png', '', 'Go') .. mtos.theme:get_image_button('13.6,.3;.8,.8', 'toolbar', 'home_button', 'laptop_home_web.png', '', 'Home') .. mtos.theme:get_image_button('14.3,.3;.8,.8', 'toolbar', 'settings_button', 'laptop_settings_web.png', '', 'Settings') return formspec

Gerold55 commented 6 years ago

undersea I think that this is a bug.

bell07 commented 6 years ago

What is wrong?

Gerold55 commented 6 years ago

There's a bug with the button icons when using undersea

Gerold55 commented 6 years ago

I want to properly implement theming for the web browser nav buttons but haven't figured out how to do so.

Gerold55 commented 6 years ago

So I've got the toolbar_button set to the right image but it ain't working though.

bell07 commented 6 years ago

Please upload your current state to the development branch so I can look what is wrong

Gerold55 commented 6 years ago

So undersea theme is in laptop_themes GitHub repo

Gerold55 commented 6 years ago

https://github.com/Gerold55/Laptop_Themes