Added more settings and actions to phone version
This commit is contained in:
parent
fd2ce71db6
commit
1b99c64c1b
21 changed files with 388 additions and 179 deletions
|
|
@ -719,6 +719,8 @@ void DrawingProgram::add_file_to_canvas_by_path(const std::filesystem::path& fil
|
|||
CanvasComponentContainer* newContainer = new CanvasComponentContainer(world.netObjMan, CanvasComponentType::IMAGE);
|
||||
ImageCanvasComponent& img = static_cast<ImageCanvasComponent&>(newContainer->get_comp());
|
||||
newContainer->coords = world.drawData.cam.c;
|
||||
if(world.main.g.gui.io.isTouchDevice)
|
||||
newContainer->coords.scale_about_double(world.drawData.cam.c.from_space(dropPos), 1.0 / world.main.get_scale_and_density_factor_gui());
|
||||
float imWidth = imTrueDim.x() / (imTrueDim.x() + imTrueDim.y());
|
||||
float imHeight = imTrueDim.y() / (imTrueDim.x() + imTrueDim.y());
|
||||
Vector2f imDim = Vector2f{world.main.window.size.x() * imWidth, world.main.window.size.x() * imHeight} * display->get_dimension_scale();
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ void TextBoxEditTool::phone_bottom_toolbar_gui(PhoneDrawingProgramScreen& t) {
|
|||
gui.set_z_index(gui.get_z_index() + 1, [&] {
|
||||
dropdown_many_element_popup_layout(gui, "Font Picker Popup", DropDownPopupLayout{
|
||||
.button = fontPickerButton,
|
||||
.isOpen = &fontPickerIsOpen,
|
||||
.clickAwayCallback = [&] { fontPickerIsOpen = false; },
|
||||
.entrySize = {200.0f, BIG_BUTTON_SIZE},
|
||||
.entryCount = FontPicker::sorted_font_list(gui).size(),
|
||||
.entryLayout = [&](size_t i) {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void ScreenshotTool::gui_toolbox(Toolbar& t) {
|
|||
take_screenshot("a" + controls.typeSelections[screenshotConfig.selectedType], screenshotConfig.selectedType);
|
||||
#else
|
||||
// We can't actually use the extension from the callback, so we have to set the extension of choice beforehand
|
||||
Toolbar::ExtensionFilter setExtensionFilter;
|
||||
Screen::ExtensionFilter setExtensionFilter;
|
||||
switch(screenshotConfig.selectedType) {
|
||||
case WorldScreenshotInfo::ScreenshotType::JPG:
|
||||
setExtensionFilter = {"JPEG", "jpg;jpeg"};
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void TextBoxTool::input_mouse_button_on_canvas_callback(const InputManager::Mous
|
|||
newTextBox.d.editing = true;
|
||||
newContainer->coords = drawP.world.drawData.cam.c;
|
||||
if(drawP.world.main.g.gui.io.isTouchDevice)
|
||||
newContainer->coords.scale_about_double(drawP.world.drawData.cam.c.from_space(startAt), 1.0 / drawP.world.main.g.final_gui_scale());
|
||||
newContainer->coords.scale_about_double(drawP.world.drawData.cam.c.from_space(startAt), 1.0 / drawP.world.main.get_scale_and_density_factor_gui());
|
||||
objInfoBeingEdited = drawP.layerMan.add_component_to_layer_being_edited(newContainer);
|
||||
}
|
||||
else if(!button.down && objInfoBeingEdited) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue